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