You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve HTTP 404 and COINCAP_API_KEY not applied when connecting via query params (#140)
* fix: resolve 404 and missing API key when connecting via query params
Route matching used req.url (which includes the query string), so
/mcp?coincapApiKey=xxx never matched the literal '/mcp' check, causing
a 404. Also, handleMcp always read COINCAP_API_KEY from the environment
instead of the query parameter Smithery passes per-session.
Fix: parse req.url with new URL() and route on pathname; extract
coincapApiKey from URLSearchParams and fall back to env var.
Closes#138
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: rename config key to COINCAP_API_KEY to match query param convention
Aligns the configSchema property name, Smithery YAML, and HTTP query
parameter parsing to use COINCAP_API_KEY instead of coincapApiKey,
matching the environment variable name and the expected connection URL
format: /mcp?COINCAP_API_KEY={key}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: update README and CLAUDE.md for correct build paths and HTTP query param
- Fix build output path (.smithery/ → dist/) in both files
- Remove nonexistent build:stdio script reference
- Document COINCAP_API_KEY query parameter for HTTP connections
- Add get-top-assets tool to both docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+25-5Lines changed: 25 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ npm run dev
64
64
- Build and run the HTTP server:
65
65
66
66
```bash
67
-
# Build the HTTP bundle (outputs to .smithery/)
67
+
# Build (outputs to dist/)
68
68
npm run build
69
69
70
70
# Start the HTTP server
@@ -74,21 +74,33 @@ npm run start:http
74
74
- Build and run the STDIO server:
75
75
76
76
```bash
77
-
# Build the STDIO bundle (outputs to dist/)
78
-
npm run build:stdio
77
+
# Build (outputs to dist/)
78
+
npm run build
79
79
80
80
# Start the STDIO server
81
81
npm run start:stdio
82
82
```
83
83
84
-
The dev/build commands will print the server address to the console. Use that URL in clients that support MCP over HTTP (for example, Smithery). You must provide an API key via `COINCAP_API_KEY` (see below).
84
+
The server listens on port 3000 by default (override with `PORT`). For clients that connect over HTTP (e.g. Smithery, Claude.ai), pass your API key as a query parameter:
0 commit comments