geneva-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.
@@ -0,0 +1,89 @@
1
+ # ─── Secrets & credentials ─────────────────────────────────────────
2
+ .env
3
+ .env.*
4
+ !.env.example
5
+ admin_key.txt
6
+
7
+ # ─── Databases ─────────────────────────────────────────────────────
8
+ *.db
9
+ *.db-journal
10
+ *.sqlite
11
+ *.sqlite3
12
+
13
+ # ─── Python ────────────────────────────────────────────────────────
14
+ venv/
15
+ .venv/
16
+ batch-venv/
17
+ __pycache__/
18
+ *.py[cod]
19
+ *.egg-info/
20
+ dist/
21
+ build/
22
+ *.egg
23
+ .pytest_cache/
24
+
25
+ # ─── Node.js ───────────────────────────────────────────────────────
26
+ node_modules/
27
+ .next/
28
+ .vite/
29
+ dist-ssr/
30
+ *.local
31
+ *.tsbuildinfo
32
+
33
+ # ─── Compiled binaries & static libraries ──────────────────────────
34
+ *.a
35
+ *.o
36
+ *.so
37
+ *.dylib
38
+ testintel
39
+ testsparc
40
+
41
+ # ─── Build & output ───────────────────────────────────────────────
42
+ out/
43
+
44
+ # ─── Benchmark output (generated images & logs) ───────────────────
45
+ benchmarks/single_forecast_benchmarks/
46
+ benchmarks/batch_benchmarks/
47
+ benchmarks/logs/
48
+ benchmarks/forecast_visualization.png
49
+
50
+ # ─── Engine output files (generated during local runs) ────────────
51
+ engine/genfit.txt
52
+ engine/genhist.txt
53
+ engine/genparam.txt
54
+ engine/genplan.txt
55
+ engine/genseas.txt
56
+ engine/load_data.txt
57
+
58
+ # ─── OS files ──────────────────────────────────────────────────────
59
+ .DS_Store
60
+ Thumbs.db
61
+
62
+ # ─── Editor & IDE ─────────────────────────────────────────────────
63
+ .vscode/*
64
+ !.vscode/extensions.json
65
+ !.vscode/settings.json
66
+ .idea/
67
+ *.suo
68
+ *.ntvs*
69
+ *.njsproj
70
+ *.sln
71
+ *.sw?
72
+
73
+ # ─── Docker ────────────────────────────────────────────────────────
74
+ # Keep Dockerfiles, ignore runtime artifacts
75
+ *.log
76
+
77
+ # ─── On-Prem Engine ────────────────────────────────────────────────
78
+ # Ed25519 private keys — NEVER commit these
79
+ on-prem-engine/private/keys/*.pem
80
+ # License key files (generated per-client)
81
+ on-prem-engine/client/license.key
82
+ # On-prem venvs
83
+ on-prem-engine/client/venv/
84
+ on-prem-engine/private/venv/
85
+ # On-prem benchmark logs
86
+ benchmarks/on-prem-bench/logs/
87
+
88
+ # ─── Misc ──────────────────────────────────────────────────────────
89
+ *.docx
@@ -0,0 +1,307 @@
1
+ # Geneva MCP Server — Production Deployment Guide
2
+
3
+ > **Goal:** Make `geneva-mcp` available to the world via PyPI, `uvx`, and the official MCP ecosystem.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ 1. [Current Status & What's Done](#1-current-status--whats-done)
10
+ 2. [Code Fixes Required Before Publishing](#2-code-fixes-required-before-publishing)
11
+ 3. [Publish to PyPI](#3-publish-to-pypi)
12
+ 4. [Register in the MCP Ecosystem](#4-register-in-the-mcp-ecosystem)
13
+ 5. [Post-Publish Checklist](#5-post-publish-checklist)
14
+
15
+ ---
16
+
17
+ ## 1. Current Status & What's Done
18
+
19
+ ### ✅ Already Production-Ready
20
+
21
+ | Area | Status |
22
+ |---|---|
23
+ | Core `forecast` tool | ✅ Complete — full Expert System + Holt-Winters fallback |
24
+ | Multimodal output | ✅ Text (markdown) + Image (base64 PNG) |
25
+ | Error handling | ✅ Connection errors, API errors (429/403), generic fallback |
26
+ | Headless charting | ✅ `matplotlib.use("Agg")` — safe for stdio |
27
+ | Agent compatibility | ✅ Claude, ChatGPT, Cursor, Windsurf documented |
28
+ | Security model | ✅ API key via env var, never in chat context |
29
+ | Lazy client singleton | ✅ Thread-safe, no startup cost |
30
+ | README documentation | ✅ Comprehensive with all agent configs |
31
+
32
+ ### ⚠️ Needs Work Before Publishing
33
+
34
+ | Issue | Impact | Section |
35
+ |---|---|---|
36
+ | Missing `LICENSE` file | PyPI won't include license text | [§2a](#2a-add-license-file) |
37
+ | Missing `[project.scripts]` entry point | `uvx geneva-mcp` won't work | [§2b](#2b-add-cli-entry-point) |
38
+ | `__main__.py` needs `main()` function | Required for script entry point | [§2b](#2b-add-cli-entry-point) |
39
+ | `forecast_horizon` param in server.py | Should use `horizon` to match SDK | [§2c](#2c-fix-parameter-name) |
40
+ | `pyproject.toml` URLs point to `geneva.ai` | Domain doesn't exist | [§2d](#2d-fix-urls-and-metadata) |
41
+ | `geneva-forecast` dependency too loose | Should pin `>=1.0.0` | [§2d](#2d-fix-urls-and-metadata) |
42
+ | Version should be `1.0.0` | First public release | [§2d](#2d-fix-urls-and-metadata) |
43
+ | No `py.typed` marker | Breaks type checking for consumers | [§2e](#2e-add-typing-marker) |
44
+
45
+ ---
46
+
47
+ ## 2. Code Fixes Required Before Publishing
48
+
49
+ ### 2a. Add LICENSE File
50
+
51
+ Create `mcp-server/LICENSE` — identical MIT license as the SDK:
52
+
53
+ ```
54
+ MIT License
55
+ Copyright (c) 2026 RoadMap Technologies, Inc.
56
+ ...
57
+ ```
58
+
59
+ ### 2b. Add CLI Entry Point
60
+
61
+ The `[project.scripts]` entry in `pyproject.toml` lets users run the server with `uvx geneva-mcp` — the **standard way** MCP servers are launched.
62
+
63
+ **Update `pyproject.toml`:**
64
+
65
+ ```toml
66
+ [project.scripts]
67
+ geneva-mcp = "geneva_mcp.__main__:main"
68
+ ```
69
+
70
+ **Update `__main__.py`:**
71
+
72
+ ```python
73
+ """Entry point for `python -m geneva_mcp` and `geneva-mcp` CLI."""
74
+
75
+ from .server import mcp
76
+
77
+ def main():
78
+ mcp.run()
79
+
80
+ if __name__ == "__main__":
81
+ main()
82
+ ```
83
+
84
+ ### 2c. Fix Parameter Name
85
+
86
+ The `forecast` tool exposes `forecast_horizon` as its parameter name, but the SDK now uses `horizon`. The MCP server also passes `forecast_horizon` directly to the client, which is the raw API field name — this works but is inconsistent with the SDK's public interface.
87
+
88
+ **In `server.py`:** Change the tool parameter from `forecast_horizon` to `horizon`, and update the kwarg passed to the client:
89
+
90
+ ```python
91
+ # Tool parameter
92
+ def forecast(
93
+ data: list[float],
94
+ horizon: int | None = None, # ← renamed
95
+ ...
96
+ ```
97
+
98
+ ```python
99
+ # Inside the function body
100
+ if horizon is not None:
101
+ base_kwargs["horizon"] = horizon # ← SDK handles translation
102
+ ```
103
+
104
+ ### 2d. Fix URLs and Metadata
105
+
106
+ **Update `pyproject.toml`:**
107
+
108
+ ```toml
109
+ [project]
110
+ name = "geneva-mcp"
111
+ version = "1.0.0"
112
+ ...
113
+ dependencies = [
114
+ "mcp>=1.0",
115
+ "geneva-forecast>=1.0.0",
116
+ "matplotlib>=3.7",
117
+ ]
118
+ classifiers = [
119
+ "Development Status :: 4 - Beta",
120
+ ...
121
+ ]
122
+
123
+ [project.urls]
124
+ Homepage = "https://portal.roadmap-tech.com"
125
+ Documentation = "https://portal.roadmap-tech.com/docs"
126
+ ```
127
+
128
+ ### 2e. Add Typing Marker
129
+
130
+ Create `geneva_mcp/py.typed`:
131
+
132
+ ```
133
+ # Marker file for PEP 561.
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 3. Publish to PyPI
139
+
140
+ Once all fixes from §2 are applied:
141
+
142
+ ### 3a. Build
143
+
144
+ ```bash
145
+ cd geneva/mcp-server
146
+ rm -rf dist/
147
+ python3 -m build
148
+ twine check dist/*
149
+ ```
150
+
151
+ ### 3b. Upload to PyPI
152
+
153
+ ```bash
154
+ twine upload dist/*
155
+ # Username: __token__
156
+ # Password: your PyPI API token (same one used for geneva-forecast)
157
+ ```
158
+
159
+ ### 3c. Verify
160
+
161
+ ```bash
162
+ # Test pip install
163
+ pip install geneva-mcp
164
+
165
+ # Test uvx (zero-install launch — this is how most users will run it)
166
+ uvx geneva-mcp
167
+ ```
168
+
169
+ Your package will be live at: **https://pypi.org/project/geneva-mcp/**
170
+
171
+ ---
172
+
173
+ ## 4. Register in the MCP Ecosystem
174
+
175
+ There are **three channels** to get discovered, in order of impact:
176
+
177
+ ### 4a. Official MCP Server Registry (High Priority)
178
+
179
+ The official registry at [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io) is where tools like Claude Desktop and other clients discover MCP servers programmatically.
180
+
181
+ **Steps:**
182
+
183
+ - [ ] Install the publisher CLI: `npm install -g @anthropic/mcp-publisher`
184
+ - [ ] Run `mcp-publisher init` in the `mcp-server/` directory to generate `server.json`
185
+ - [ ] Authenticate: `mcp-publisher login github`
186
+ - [ ] Publish: `mcp-publisher publish`
187
+
188
+ > **Important:** The registry requires your tool to have `readOnlyHint` annotations. Since `forecast` only reads data and returns results (no side effects), add this annotation to the tool registration when the `mcp` SDK supports it.
189
+
190
+ ### 4b. Anthropic Connectors Directory (High Priority)
191
+
192
+ The curated directory on `claude.ai/integrations` is Anthropic's reviewed catalog shown to Claude users.
193
+
194
+ **Steps:**
195
+
196
+ - [ ] Fill out the **Connectors Directory review form** at [claude.com/connectors](https://claude.com/connectors)
197
+ - [ ] Provide:
198
+ - Package name: `geneva-mcp`
199
+ - Install command: `pip install geneva-mcp` or `uvx geneva-mcp`
200
+ - Category: **Data Analysis / Forecasting**
201
+ - Security docs: API key via env var, read-only operations
202
+ - Support channel: your support email
203
+ - [ ] Wait for Anthropic review (they manually review all submissions)
204
+
205
+ ### 4c. Community Lists & Smithery (Medium Priority)
206
+
207
+ **awesome-mcp-servers (GitHub):**
208
+
209
+ - [ ] Fork [github.com/modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers)
210
+ - [ ] Add Geneva to the appropriate category in `README.md`
211
+ - [ ] Submit a PR with: name, description, link to PyPI/repo
212
+
213
+ **Smithery.ai:**
214
+
215
+ Smithery is a community MCP server registry with a web UI. However, it requires **HTTP transport** (your server uses stdio), so this is lower priority unless you add an HTTP adapter later.
216
+
217
+ ### 4d. Update Developer Portal Docs
218
+
219
+ - [ ] Add an "MCP Server" section to the SDK docs page
220
+ - [ ] Show `pip install geneva-mcp` install command
221
+ - [ ] Show `uvx geneva-mcp` as the zero-install option
222
+ - [ ] Include agent config examples for Claude, Cursor, Windsurf, ChatGPT
223
+
224
+ ---
225
+
226
+ ## 5. Post-Publish Checklist
227
+
228
+ ### Pre-Publish (Code)
229
+
230
+ - [x] `LICENSE` file created
231
+ - [x] `[project.scripts]` entry point added
232
+ - [x] `__main__.py` updated with `main()` function
233
+ - [x] `forecast_horizon` → `horizon` in server.py
234
+ - [x] `pyproject.toml` URLs fixed to `portal.roadmap-tech.com`
235
+ - [x] `geneva-forecast>=1.0.0` dependency pinned
236
+ - [x] Version bumped to `1.0.0`
237
+ - [x] `py.typed` marker added
238
+ - [x] `__init__.py` version synced
239
+
240
+ ### Build & Upload
241
+
242
+ - [ ] `python -m build` succeeds
243
+ - [ ] `twine check dist/*` passes
244
+ - [ ] Uploaded to PyPI
245
+ - [ ] `pip install geneva-mcp` works from clean env
246
+ - [ ] `uvx geneva-mcp` launches the server
247
+
248
+ ### Ecosystem
249
+
250
+ - [ ] MCP Registry (`mcp-publisher publish`)
251
+ - [ ] Anthropic Connectors Directory (review form submitted)
252
+ - [ ] awesome-mcp-servers PR submitted
253
+ - [ ] Developer portal docs updated
254
+
255
+ ---
256
+
257
+ ## Architecture Note — No Dev/Prod Split Needed
258
+
259
+ The MCP server is a **single lightweight package** that works identically in development and production. The only difference is the environment variables:
260
+
261
+ | Setting | Local Dev | Production |
262
+ |---|---|---|
263
+ | `GENEVA_API_URL` | `http://localhost:8000` | `https://api.roadmap-tech.com` |
264
+ | `GENEVA_API_KEY` | Local dev key | Production API key |
265
+
266
+ The server itself is stateless, produces no side effects beyond temp chart files in `/tmp/geneva-mcp-charts/`, and has no build step or environment-specific code paths.
267
+
268
+ ---
269
+
270
+ ## Troubleshooting
271
+
272
+ ### `No module named geneva_mcp`
273
+
274
+ **Cause:** The Python binary in your MCP config doesn't have `geneva_mcp` installed.
275
+
276
+ **Fix:**
277
+ ```bash
278
+ # Find which Python your config points to
279
+ # Install into that specific environment:
280
+ /path/to/your/.venv/bin/pip install geneva-mcp
281
+ ```
282
+
283
+ ### `GENEVA_API_KEY environment variable is not set`
284
+
285
+ **Cause:** The `env` block in your MCP config is missing or the key is empty.
286
+
287
+ **Fix:** Add a valid API key to the `env` section of your agent's config.
288
+
289
+ ### `Server transport closed unexpectedly`
290
+
291
+ **Cause:** The Python process crashed on startup before the MCP handshake.
292
+
293
+ **Debug:**
294
+ ```bash
295
+ # Run the server manually to see the error:
296
+ GENEVA_API_KEY=gva_test GENEVA_API_URL=http://localhost:8000 \
297
+ python -m geneva_mcp
298
+ ```
299
+
300
+ ### Chart generation fails
301
+
302
+ **Cause:** `matplotlib` backend issue.
303
+
304
+ **Fix:** The server hard-codes `matplotlib.use("Agg")` (headless). If you see display errors:
305
+ ```bash
306
+ pip install matplotlib --force-reinstall
307
+ ```
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RoadMap Technologies, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.