Commit Graph

9 Commits

Author SHA1 Message Date
Lee Hanken
020d324edb Add readOnlyHint and openWorldHint annotations to all MCP tools
This fixes ChatGPT's "MCP write action is temporarily disabled" error by explicitly marking all tools as read-only operations. ChatGPT's Developer Mode was misinterpreting the tools as write actions without these annotations.

Changes:
- Added annotations to all 5 tools in both index.js and server-http.js
- All tools now have: annotations: { readOnlyHint: true, openWorldHint: true }
- Added test-annotations.js to verify annotations are correctly returned

Tools updated:
- search_episodes
- get_episode
- search_transcripts
- get_host_info
- get_series_info

🤖 Generated with Claude Code
2025-10-27 14:45:11 +00:00
Lee Hanken
98177f3fd5 Enhance transcript search tooling with flexible matching 2025-10-26 14:46:24 +00:00
Lee Hanken
36aa12acb5 Allow SSE POST routing via query session ids 2025-10-26 14:24:12 +00:00
Lee Hanken
931ef0335f Fix SSE transport setup and trust proxy configuration 2025-10-26 14:09:01 +00:00
Lee Hanken
43590c1778 remove custom post handler 2025-10-26 13:11:41 +00:00
Lee Hanken
eef88341f7 include better error handling for the /sse route 2025-10-26 13:06:03 +00:00
Lee Hanken
41464a1244 manually send the initial SSE headers before the main server connection starts and add a background process to send keep-alive pings 2025-10-26 12:50:18 +00:00
Lee Hanken
d37a9aca4e Fix rate limiting behind reverse proxy (trust proxy headers)
Critical Fix:
- Added app.set('trust proxy', true) to server-http.js
- Fixes ValidationError about X-Forwarded-For headers
- Allows rate limiting to work correctly on Render/Heroku/etc

Problem:
- Without trust proxy, Express doesn't recognize real client IPs
- All users appear to have the same IP (the proxy's IP)
- Rate limiting applied to ALL users as a single entity
- One user hitting limit blocks everyone

Solution:
- Trust X-Forwarded-For headers from reverse proxies
- Each user now has their own rate limit bucket
- Rate limiting works as designed (50 req/min per IP)

Documentation:
- Added troubleshooting section in DEPLOYMENT.md
- Explains the error and impact
- Shows how to verify the fix

This is required for any deployment behind a reverse proxy
(Render, Heroku, AWS ELB, nginx, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 11:32:42 +00:00
Lee Hanken
d68885cff8 Add HTTP/SSE transport with graceful degradation for public deployment
New Features:
- HTTP/SSE server (server-http.js) for network access
- Express-based web server with MCP SSE transport
- Rate limiting (50 req/min per IP)
- Request timeouts (30s)
- Concurrent request limiting (max 10)
- Circuit breaker pattern for failure handling
- Memory monitoring (450MB threshold)
- Gzip compression for responses
- CORS support for cross-origin requests
- Health check endpoint (/health)

Infrastructure:
- Updated package.json with new dependencies (express, cors, compression, rate-limit)
- New npm script: start:http for HTTP server
- Comprehensive deployment guide (DEPLOYMENT.md)
- Updated README with deployment instructions

Graceful Degradation:
- Automatically rejects requests when at capacity
- Circuit breaker opens after 5 failures
- Memory-aware request handling
- Per-IP rate limiting to prevent abuse

The original stdio server (index.js) remains unchanged for local use.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:57:39 +00:00