allye-mcp 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- allye_mcp-1.0.2/PKG-INFO +345 -0
- allye_mcp-1.0.2/README.md +322 -0
- allye_mcp-1.0.2/allye_mcp/__init__.py +11 -0
- allye_mcp-1.0.2/allye_mcp/application/formatters/__init__.py +40 -0
- allye_mcp-1.0.2/allye_mcp/application/formatters/api_catalog.py +169 -0
- allye_mcp-1.0.2/allye_mcp/application/formatters/board.py +21 -0
- allye_mcp-1.0.2/allye_mcp/application/formatters/doc.py +301 -0
- allye_mcp-1.0.2/allye_mcp/application/formatters/skill.py +174 -0
- allye_mcp-1.0.2/allye_mcp/application/formatters/sprint.py +31 -0
- allye_mcp-1.0.2/allye_mcp/application/formatters/work.py +73 -0
- allye_mcp-1.0.2/allye_mcp/application/presenters.py +24 -0
- allye_mcp-1.0.2/allye_mcp/application/prompt_base.py +76 -0
- allye_mcp-1.0.2/allye_mcp/application/prompt_registry.py +39 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/__init__.py +57 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/api.py +64 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/bug.py +44 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/docs.py +39 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/docs_create.py +42 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/docs_search.py +37 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/feature.py +44 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/memory.py +67 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/mine.py +37 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/task.py +42 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/todo.py +42 -0
- allye_mcp-1.0.2/allye_mcp/application/prompts/todo_add.py +38 -0
- allye_mcp-1.0.2/allye_mcp/application/tool_base.py +242 -0
- allye_mcp-1.0.2/allye_mcp/application/tool_registry.py +39 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/__init__.py +41 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/api_catalog.py +148 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/boards.py +124 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/docs.py +395 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/health.py +28 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/initialize.py +195 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/intelligence.py +441 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/productivity.py +336 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/skills.py +363 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/sprints.py +123 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/team.py +173 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/user_config.py +183 -0
- allye_mcp-1.0.2/allye_mcp/application/tools/work_items.py +590 -0
- allye_mcp-1.0.2/allye_mcp/domain/_service_base.py +81 -0
- allye_mcp-1.0.2/allye_mcp/domain/api_catalog.py +44 -0
- allye_mcp-1.0.2/allye_mcp/domain/boards.py +182 -0
- allye_mcp-1.0.2/allye_mcp/domain/docs.py +153 -0
- allye_mcp-1.0.2/allye_mcp/domain/initialization.py +80 -0
- allye_mcp-1.0.2/allye_mcp/domain/intelligence.py +119 -0
- allye_mcp-1.0.2/allye_mcp/domain/productivity.py +212 -0
- allye_mcp-1.0.2/allye_mcp/domain/skills.py +104 -0
- allye_mcp-1.0.2/allye_mcp/domain/sprints.py +155 -0
- allye_mcp-1.0.2/allye_mcp/domain/team.py +65 -0
- allye_mcp-1.0.2/allye_mcp/domain/user_config.py +80 -0
- allye_mcp-1.0.2/allye_mcp/domain/work_items.py +265 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/allye_api/client.py +1341 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/auth/__init__.py +26 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/auth/jwks_client.py +78 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/auth/jwt_validator.py +150 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/auth/oauth_client_credentials.py +98 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/auth/strategies.py +126 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/config.py +90 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/context.py +85 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/http_client.py +101 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/logging.py +93 -0
- allye_mcp-1.0.2/allye_mcp/infrastructure/request_context.py +113 -0
- allye_mcp-1.0.2/allye_mcp/interface/mcp_server.py +340 -0
- allye_mcp-1.0.2/allye_mcp/interface/transports.py +394 -0
- allye_mcp-1.0.2/allye_mcp/main.py +123 -0
- allye_mcp-1.0.2/allye_mcp.egg-info/PKG-INFO +345 -0
- allye_mcp-1.0.2/allye_mcp.egg-info/SOURCES.txt +72 -0
- allye_mcp-1.0.2/allye_mcp.egg-info/dependency_links.txt +1 -0
- allye_mcp-1.0.2/allye_mcp.egg-info/entry_points.txt +2 -0
- allye_mcp-1.0.2/allye_mcp.egg-info/requires.txt +16 -0
- allye_mcp-1.0.2/allye_mcp.egg-info/top_level.txt +1 -0
- allye_mcp-1.0.2/pyproject.toml +88 -0
- allye_mcp-1.0.2/setup.cfg +4 -0
allye_mcp-1.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: allye-mcp
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: Fênix Cloud MCP server implemented in Python
|
|
5
|
+
Author: Allye Inc
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: pydantic>=2.5
|
|
9
|
+
Requires-Dist: requests>=2.31
|
|
10
|
+
Requires-Dist: urllib3>=2.0
|
|
11
|
+
Requires-Dist: aiohttp>=3.9
|
|
12
|
+
Requires-Dist: pydantic-settings>=2.0
|
|
13
|
+
Requires-Dist: python-json-logger>=2.0
|
|
14
|
+
Requires-Dist: PyJWT[crypto]>=2.8
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
17
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
18
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
19
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
20
|
+
Requires-Dist: flake8>=6.0; extra == "dev"
|
|
21
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
22
|
+
Requires-Dist: twine>=4.0; extra == "dev"
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<img src="https://allye.devshire.app/logos/logo_allye.png" alt="Allye MCP" width="200" />
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<strong>Allye MCP Server</strong><br/>
|
|
30
|
+
Python MCP server for Allye Cloud API integration
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<a href="https://pypi.org/project/allye-mcp/"><img src="https://img.shields.io/pypi/v/allye-mcp.svg" alt="PyPI"></a>
|
|
35
|
+
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python"></a>
|
|
36
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>
|
|
37
|
+
<a href="https://codecov.io/gh/allye-devshire/allye-mcp-py"><img src="https://codecov.io/gh/allye-devshire/allye-mcp-py/branch/main/graph/badge.svg" alt="codecov"></a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="#quick-start">Quick Start</a> •
|
|
42
|
+
<a href="#installation">Installation</a> •
|
|
43
|
+
<a href="#configuration">Configuration</a> •
|
|
44
|
+
<a href="#project-structure">Structure</a> •
|
|
45
|
+
<a href="./TESTING.md">Testing</a>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Overview
|
|
51
|
+
|
|
52
|
+
Allye MCP connects MCP-compatible clients (Claude Code, Cursor, Windsurf, VS Code, etc.) directly to the Allye Cloud APIs. Every tool invocation hits the live backend—no outdated snapshots or hallucinated IDs.
|
|
53
|
+
|
|
54
|
+
**Available Tools:**
|
|
55
|
+
- `knowledge` — Documentation CRUD, work items, modes, rules
|
|
56
|
+
- `productivity` — TODO management
|
|
57
|
+
- `intelligence` — Memories and smart operations
|
|
58
|
+
- `user_config` — User configuration documents
|
|
59
|
+
- `initialize` — Personalized setup
|
|
60
|
+
- `health` — Backend health check
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Quick Start
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pipx install allye-mcp # Install
|
|
68
|
+
allye-mcp --pat <your-token> # Run (STDIO mode)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Requirements
|
|
74
|
+
|
|
75
|
+
| Requirement | Version |
|
|
76
|
+
|-------------|---------|
|
|
77
|
+
| Python | 3.10+ |
|
|
78
|
+
| Allye PAT Token | Required |
|
|
79
|
+
| MCP Client | Claude Code, Cursor, Windsurf, VS Code, etc. |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Installation
|
|
84
|
+
|
|
85
|
+
### With pipx (recommended)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pipx install allye-mcp
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### With pip
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pip install --user allye-mcp
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Upgrade
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pipx upgrade allye-mcp
|
|
101
|
+
# or
|
|
102
|
+
pip install --upgrade allye-mcp
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Configuration
|
|
108
|
+
|
|
109
|
+
### MCP Client Setup
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary><strong>Claude Code</strong> — ~/.claude/config.toml</summary>
|
|
113
|
+
|
|
114
|
+
```toml
|
|
115
|
+
[mcp_servers.allye]
|
|
116
|
+
command = "allye-mcp"
|
|
117
|
+
args = ["--pat", "your-token"]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
</details>
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary><strong>Cursor</strong> — ~/.cursor/mcp.json</summary>
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"mcpServers": {
|
|
128
|
+
"allye": {
|
|
129
|
+
"command": "allye-mcp",
|
|
130
|
+
"args": ["--pat", "your-token"],
|
|
131
|
+
"disabled": false
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
</details>
|
|
138
|
+
|
|
139
|
+
<details>
|
|
140
|
+
<summary><strong>VS Code / Windsurf</strong> — settings.json</summary>
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"modelContextProtocol.mcpServers": {
|
|
145
|
+
"allye": {
|
|
146
|
+
"command": "allye-mcp",
|
|
147
|
+
"args": ["--pat", "your-token"]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
</details>
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
<details>
|
|
158
|
+
<summary><strong>Environment Variables</strong></summary>
|
|
159
|
+
|
|
160
|
+
| Variable | Description | Default |
|
|
161
|
+
|----------|-------------|---------|
|
|
162
|
+
| `ALLYE_API_URL` | Allye Cloud API base URL | `https://allye-api.devshire.app` |
|
|
163
|
+
| `ALLYE_PAT_TOKEN` | Token (alternative to `--pat`) | empty |
|
|
164
|
+
| `ALLYE_TRANSPORT_MODE` | `stdio`, `http`, or `both` | `stdio` |
|
|
165
|
+
| `ALLYE_HTTP_HOST` | HTTP transport host | `127.0.0.1` |
|
|
166
|
+
| `ALLYE_HTTP_PORT` | HTTP transport port | `5003` |
|
|
167
|
+
| `ALLYE_LOG_LEVEL` | Log level (`DEBUG`, `INFO`, etc.) | `INFO` |
|
|
168
|
+
|
|
169
|
+
See [`.env.example`](./.env.example) for reference.
|
|
170
|
+
|
|
171
|
+
</details>
|
|
172
|
+
|
|
173
|
+
<details>
|
|
174
|
+
<summary><strong>HTTP Transport</strong></summary>
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
export ALLYE_TRANSPORT_MODE=http
|
|
178
|
+
export ALLYE_HTTP_PORT=5003
|
|
179
|
+
allye-mcp --pat <your-token>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
JSON-RPC endpoint: `http://127.0.0.1:5003/jsonrpc`
|
|
183
|
+
|
|
184
|
+
Run both STDIO and HTTP:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
export ALLYE_TRANSPORT_MODE=both
|
|
188
|
+
allye-mcp --pat <your-token>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
</details>
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Project Structure
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
allye-mcp-py/
|
|
199
|
+
├── allye_mcp/ # Main package
|
|
200
|
+
│ ├── main.py # Entry point (CLI)
|
|
201
|
+
│ ├── application/ # Use cases and services
|
|
202
|
+
│ ├── domain/ # Business entities
|
|
203
|
+
│ ├── infrastructure/ # External integrations (API, transport)
|
|
204
|
+
│ └── interface/ # MCP protocol handlers
|
|
205
|
+
├── tests/ # Test suite
|
|
206
|
+
├── docs/ # Documentation
|
|
207
|
+
├── pyproject.toml # Project configuration
|
|
208
|
+
└── .env.example # Environment template
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
<details>
|
|
212
|
+
<summary><strong>allye_mcp/</strong> — Package Structure</summary>
|
|
213
|
+
|
|
214
|
+
| Directory | Responsibility |
|
|
215
|
+
|-----------|----------------|
|
|
216
|
+
| `main.py` | CLI entry point, argument parsing, server bootstrap |
|
|
217
|
+
| `application/` | Use cases, handlers for each MCP tool |
|
|
218
|
+
| `domain/` | Business entities, DTOs, validation |
|
|
219
|
+
| `infrastructure/` | API client, HTTP transport, logging |
|
|
220
|
+
| `interface/` | MCP protocol implementation, tool registration |
|
|
221
|
+
|
|
222
|
+
### Architecture
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
MCP Client → interface/ → application/ → infrastructure/ → Allye API
|
|
226
|
+
↓
|
|
227
|
+
domain/
|
|
228
|
+
(entities)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
</details>
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Tech Stack
|
|
236
|
+
|
|
237
|
+
| Layer | Technology |
|
|
238
|
+
|-------|------------|
|
|
239
|
+
| Runtime | Python 3.10+ |
|
|
240
|
+
| Validation | Pydantic 2 |
|
|
241
|
+
| HTTP | aiohttp, requests |
|
|
242
|
+
| Config | pydantic-settings |
|
|
243
|
+
| Testing | pytest, pytest-asyncio |
|
|
244
|
+
| Linting | flake8, black, mypy |
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Development
|
|
249
|
+
|
|
250
|
+
### Setup
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# Clone and install
|
|
254
|
+
git clone <repo>
|
|
255
|
+
cd allye-mcp-py
|
|
256
|
+
pip install -e .[dev]
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Scripts
|
|
260
|
+
|
|
261
|
+
| Command | Description |
|
|
262
|
+
|---------|-------------|
|
|
263
|
+
| `pytest` | Run tests |
|
|
264
|
+
| `pytest --cov=allye_mcp` | Run with coverage |
|
|
265
|
+
| `black allye_mcp/ tests/` | Format code |
|
|
266
|
+
| `flake8 allye_mcp/ tests/` | Lint |
|
|
267
|
+
| `mypy allye_mcp/` | Type check |
|
|
268
|
+
|
|
269
|
+
### Commit Convention
|
|
270
|
+
|
|
271
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
272
|
+
|
|
273
|
+
| Prefix | Description | Version Bump |
|
|
274
|
+
|--------|-------------|--------------|
|
|
275
|
+
| `fix:` | Bug fixes | Patch |
|
|
276
|
+
| `feat:` | New features | Minor |
|
|
277
|
+
| `BREAKING CHANGE:` | Breaking changes | Major |
|
|
278
|
+
| `chore:` | Maintenance | None |
|
|
279
|
+
| `docs:` | Documentation | None |
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## CI/CD
|
|
284
|
+
|
|
285
|
+
| Platform | Usage |
|
|
286
|
+
|----------|-------|
|
|
287
|
+
| GitHub Actions | Tests, lint, build on push/PR to main |
|
|
288
|
+
| Semantic Release | Auto-version based on commits |
|
|
289
|
+
| PyPI | Package distribution |
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Troubleshooting
|
|
294
|
+
|
|
295
|
+
<details>
|
|
296
|
+
<summary><code>command not found: allye-mcp</code></summary>
|
|
297
|
+
|
|
298
|
+
Add scripts directory to PATH:
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
# macOS/Linux
|
|
302
|
+
export PATH="$PATH:~/.local/bin"
|
|
303
|
+
|
|
304
|
+
# Windows
|
|
305
|
+
# Add %APPDATA%\Python\Python311\Scripts to PATH
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
</details>
|
|
309
|
+
|
|
310
|
+
<details>
|
|
311
|
+
<summary><code>401 Unauthorized</code></summary>
|
|
312
|
+
|
|
313
|
+
1. Check `--pat` or `ALLYE_PAT_TOKEN` is set correctly
|
|
314
|
+
2. Regenerate token in Allye Cloud if expired
|
|
315
|
+
|
|
316
|
+
</details>
|
|
317
|
+
|
|
318
|
+
<details>
|
|
319
|
+
<summary>Run HTTP and STDIO simultaneously</summary>
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
export ALLYE_TRANSPORT_MODE=both
|
|
323
|
+
allye-mcp --pat <your-token>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
</details>
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Security
|
|
331
|
+
|
|
332
|
+
- Store tokens securely (keychain, `pass`, `.env`)
|
|
333
|
+
- Never commit secrets to git
|
|
334
|
+
- Revoke tokens when no longer needed
|
|
335
|
+
- Use `pipx` to isolate from global Python
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Useful Links
|
|
340
|
+
|
|
341
|
+
| Resource | URL |
|
|
342
|
+
|----------|-----|
|
|
343
|
+
| PyPI | https://pypi.org/project/allye-mcp/ |
|
|
344
|
+
| Allye Cloud | https://allye.devshire.app |
|
|
345
|
+
| MCP Protocol | https://modelcontextprotocol.io |
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://allye.devshire.app/logos/logo_allye.png" alt="Allye MCP" width="200" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Allye MCP Server</strong><br/>
|
|
7
|
+
Python MCP server for Allye Cloud API integration
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://pypi.org/project/allye-mcp/"><img src="https://img.shields.io/pypi/v/allye-mcp.svg" alt="PyPI"></a>
|
|
12
|
+
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python"></a>
|
|
13
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>
|
|
14
|
+
<a href="https://codecov.io/gh/allye-devshire/allye-mcp-py"><img src="https://codecov.io/gh/allye-devshire/allye-mcp-py/branch/main/graph/badge.svg" alt="codecov"></a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="#quick-start">Quick Start</a> •
|
|
19
|
+
<a href="#installation">Installation</a> •
|
|
20
|
+
<a href="#configuration">Configuration</a> •
|
|
21
|
+
<a href="#project-structure">Structure</a> •
|
|
22
|
+
<a href="./TESTING.md">Testing</a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Overview
|
|
28
|
+
|
|
29
|
+
Allye MCP connects MCP-compatible clients (Claude Code, Cursor, Windsurf, VS Code, etc.) directly to the Allye Cloud APIs. Every tool invocation hits the live backend—no outdated snapshots or hallucinated IDs.
|
|
30
|
+
|
|
31
|
+
**Available Tools:**
|
|
32
|
+
- `knowledge` — Documentation CRUD, work items, modes, rules
|
|
33
|
+
- `productivity` — TODO management
|
|
34
|
+
- `intelligence` — Memories and smart operations
|
|
35
|
+
- `user_config` — User configuration documents
|
|
36
|
+
- `initialize` — Personalized setup
|
|
37
|
+
- `health` — Backend health check
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pipx install allye-mcp # Install
|
|
45
|
+
allye-mcp --pat <your-token> # Run (STDIO mode)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Requirements
|
|
51
|
+
|
|
52
|
+
| Requirement | Version |
|
|
53
|
+
|-------------|---------|
|
|
54
|
+
| Python | 3.10+ |
|
|
55
|
+
| Allye PAT Token | Required |
|
|
56
|
+
| MCP Client | Claude Code, Cursor, Windsurf, VS Code, etc. |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
### With pipx (recommended)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pipx install allye-mcp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### With pip
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install --user allye-mcp
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Upgrade
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pipx upgrade allye-mcp
|
|
78
|
+
# or
|
|
79
|
+
pip install --upgrade allye-mcp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Configuration
|
|
85
|
+
|
|
86
|
+
### MCP Client Setup
|
|
87
|
+
|
|
88
|
+
<details>
|
|
89
|
+
<summary><strong>Claude Code</strong> — ~/.claude/config.toml</summary>
|
|
90
|
+
|
|
91
|
+
```toml
|
|
92
|
+
[mcp_servers.allye]
|
|
93
|
+
command = "allye-mcp"
|
|
94
|
+
args = ["--pat", "your-token"]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
<details>
|
|
100
|
+
<summary><strong>Cursor</strong> — ~/.cursor/mcp.json</summary>
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"mcpServers": {
|
|
105
|
+
"allye": {
|
|
106
|
+
"command": "allye-mcp",
|
|
107
|
+
"args": ["--pat", "your-token"],
|
|
108
|
+
"disabled": false
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
</details>
|
|
115
|
+
|
|
116
|
+
<details>
|
|
117
|
+
<summary><strong>VS Code / Windsurf</strong> — settings.json</summary>
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"modelContextProtocol.mcpServers": {
|
|
122
|
+
"allye": {
|
|
123
|
+
"command": "allye-mcp",
|
|
124
|
+
"args": ["--pat", "your-token"]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
</details>
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
<details>
|
|
135
|
+
<summary><strong>Environment Variables</strong></summary>
|
|
136
|
+
|
|
137
|
+
| Variable | Description | Default |
|
|
138
|
+
|----------|-------------|---------|
|
|
139
|
+
| `ALLYE_API_URL` | Allye Cloud API base URL | `https://allye-api.devshire.app` |
|
|
140
|
+
| `ALLYE_PAT_TOKEN` | Token (alternative to `--pat`) | empty |
|
|
141
|
+
| `ALLYE_TRANSPORT_MODE` | `stdio`, `http`, or `both` | `stdio` |
|
|
142
|
+
| `ALLYE_HTTP_HOST` | HTTP transport host | `127.0.0.1` |
|
|
143
|
+
| `ALLYE_HTTP_PORT` | HTTP transport port | `5003` |
|
|
144
|
+
| `ALLYE_LOG_LEVEL` | Log level (`DEBUG`, `INFO`, etc.) | `INFO` |
|
|
145
|
+
|
|
146
|
+
See [`.env.example`](./.env.example) for reference.
|
|
147
|
+
|
|
148
|
+
</details>
|
|
149
|
+
|
|
150
|
+
<details>
|
|
151
|
+
<summary><strong>HTTP Transport</strong></summary>
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
export ALLYE_TRANSPORT_MODE=http
|
|
155
|
+
export ALLYE_HTTP_PORT=5003
|
|
156
|
+
allye-mcp --pat <your-token>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
JSON-RPC endpoint: `http://127.0.0.1:5003/jsonrpc`
|
|
160
|
+
|
|
161
|
+
Run both STDIO and HTTP:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
export ALLYE_TRANSPORT_MODE=both
|
|
165
|
+
allye-mcp --pat <your-token>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
</details>
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Project Structure
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
allye-mcp-py/
|
|
176
|
+
├── allye_mcp/ # Main package
|
|
177
|
+
│ ├── main.py # Entry point (CLI)
|
|
178
|
+
│ ├── application/ # Use cases and services
|
|
179
|
+
│ ├── domain/ # Business entities
|
|
180
|
+
│ ├── infrastructure/ # External integrations (API, transport)
|
|
181
|
+
│ └── interface/ # MCP protocol handlers
|
|
182
|
+
├── tests/ # Test suite
|
|
183
|
+
├── docs/ # Documentation
|
|
184
|
+
├── pyproject.toml # Project configuration
|
|
185
|
+
└── .env.example # Environment template
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
<details>
|
|
189
|
+
<summary><strong>allye_mcp/</strong> — Package Structure</summary>
|
|
190
|
+
|
|
191
|
+
| Directory | Responsibility |
|
|
192
|
+
|-----------|----------------|
|
|
193
|
+
| `main.py` | CLI entry point, argument parsing, server bootstrap |
|
|
194
|
+
| `application/` | Use cases, handlers for each MCP tool |
|
|
195
|
+
| `domain/` | Business entities, DTOs, validation |
|
|
196
|
+
| `infrastructure/` | API client, HTTP transport, logging |
|
|
197
|
+
| `interface/` | MCP protocol implementation, tool registration |
|
|
198
|
+
|
|
199
|
+
### Architecture
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
MCP Client → interface/ → application/ → infrastructure/ → Allye API
|
|
203
|
+
↓
|
|
204
|
+
domain/
|
|
205
|
+
(entities)
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
</details>
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Tech Stack
|
|
213
|
+
|
|
214
|
+
| Layer | Technology |
|
|
215
|
+
|-------|------------|
|
|
216
|
+
| Runtime | Python 3.10+ |
|
|
217
|
+
| Validation | Pydantic 2 |
|
|
218
|
+
| HTTP | aiohttp, requests |
|
|
219
|
+
| Config | pydantic-settings |
|
|
220
|
+
| Testing | pytest, pytest-asyncio |
|
|
221
|
+
| Linting | flake8, black, mypy |
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Development
|
|
226
|
+
|
|
227
|
+
### Setup
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Clone and install
|
|
231
|
+
git clone <repo>
|
|
232
|
+
cd allye-mcp-py
|
|
233
|
+
pip install -e .[dev]
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Scripts
|
|
237
|
+
|
|
238
|
+
| Command | Description |
|
|
239
|
+
|---------|-------------|
|
|
240
|
+
| `pytest` | Run tests |
|
|
241
|
+
| `pytest --cov=allye_mcp` | Run with coverage |
|
|
242
|
+
| `black allye_mcp/ tests/` | Format code |
|
|
243
|
+
| `flake8 allye_mcp/ tests/` | Lint |
|
|
244
|
+
| `mypy allye_mcp/` | Type check |
|
|
245
|
+
|
|
246
|
+
### Commit Convention
|
|
247
|
+
|
|
248
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
249
|
+
|
|
250
|
+
| Prefix | Description | Version Bump |
|
|
251
|
+
|--------|-------------|--------------|
|
|
252
|
+
| `fix:` | Bug fixes | Patch |
|
|
253
|
+
| `feat:` | New features | Minor |
|
|
254
|
+
| `BREAKING CHANGE:` | Breaking changes | Major |
|
|
255
|
+
| `chore:` | Maintenance | None |
|
|
256
|
+
| `docs:` | Documentation | None |
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## CI/CD
|
|
261
|
+
|
|
262
|
+
| Platform | Usage |
|
|
263
|
+
|----------|-------|
|
|
264
|
+
| GitHub Actions | Tests, lint, build on push/PR to main |
|
|
265
|
+
| Semantic Release | Auto-version based on commits |
|
|
266
|
+
| PyPI | Package distribution |
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Troubleshooting
|
|
271
|
+
|
|
272
|
+
<details>
|
|
273
|
+
<summary><code>command not found: allye-mcp</code></summary>
|
|
274
|
+
|
|
275
|
+
Add scripts directory to PATH:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# macOS/Linux
|
|
279
|
+
export PATH="$PATH:~/.local/bin"
|
|
280
|
+
|
|
281
|
+
# Windows
|
|
282
|
+
# Add %APPDATA%\Python\Python311\Scripts to PATH
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
</details>
|
|
286
|
+
|
|
287
|
+
<details>
|
|
288
|
+
<summary><code>401 Unauthorized</code></summary>
|
|
289
|
+
|
|
290
|
+
1. Check `--pat` or `ALLYE_PAT_TOKEN` is set correctly
|
|
291
|
+
2. Regenerate token in Allye Cloud if expired
|
|
292
|
+
|
|
293
|
+
</details>
|
|
294
|
+
|
|
295
|
+
<details>
|
|
296
|
+
<summary>Run HTTP and STDIO simultaneously</summary>
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
export ALLYE_TRANSPORT_MODE=both
|
|
300
|
+
allye-mcp --pat <your-token>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
</details>
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Security
|
|
308
|
+
|
|
309
|
+
- Store tokens securely (keychain, `pass`, `.env`)
|
|
310
|
+
- Never commit secrets to git
|
|
311
|
+
- Revoke tokens when no longer needed
|
|
312
|
+
- Use `pipx` to isolate from global Python
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Useful Links
|
|
317
|
+
|
|
318
|
+
| Resource | URL |
|
|
319
|
+
|----------|-----|
|
|
320
|
+
| PyPI | https://pypi.org/project/allye-mcp/ |
|
|
321
|
+
| Allye Cloud | https://allye.devshire.app |
|
|
322
|
+
| MCP Protocol | https://modelcontextprotocol.io |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
"""Formatter helpers extracted from legacy monolithic tool."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from .api_catalog import _format_api_detail, _format_api_item, _format_api_search_result
|
|
7
|
+
from .board import _format_board
|
|
8
|
+
from .doc import (
|
|
9
|
+
_extract_name_count,
|
|
10
|
+
_format_doc,
|
|
11
|
+
_format_doc_analytics,
|
|
12
|
+
_format_doc_tree_flat,
|
|
13
|
+
_format_doc_tree_nested,
|
|
14
|
+
)
|
|
15
|
+
from .skill import (
|
|
16
|
+
_export_skill_format,
|
|
17
|
+
_export_skills_merged_format,
|
|
18
|
+
_format_marketplace_skill,
|
|
19
|
+
_format_skill,
|
|
20
|
+
)
|
|
21
|
+
from .sprint import _format_sprint
|
|
22
|
+
from .work import _format_work
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"_format_work",
|
|
26
|
+
"_format_board",
|
|
27
|
+
"_format_sprint",
|
|
28
|
+
"_format_doc",
|
|
29
|
+
"_format_doc_tree_flat",
|
|
30
|
+
"_format_doc_tree_nested",
|
|
31
|
+
"_extract_name_count",
|
|
32
|
+
"_format_doc_analytics",
|
|
33
|
+
"_format_skill",
|
|
34
|
+
"_format_marketplace_skill",
|
|
35
|
+
"_export_skill_format",
|
|
36
|
+
"_export_skills_merged_format",
|
|
37
|
+
"_format_api_search_result",
|
|
38
|
+
"_format_api_item",
|
|
39
|
+
"_format_api_detail",
|
|
40
|
+
]
|