Context7-ChatGPT-Bridge
A bridge that allows ChatGPT to access up-to-date programming documentation through the Context7 MCP server. Implements ChatGPT's required search and fetch tools while using Context7's documentation database internally.
Install / Use
claude mcp add salah9003 -- npx -y github:salah9003/Context7-ChatGPT-BridgeIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Skill content
View source on GitHubContext7 ChatGPT Bridge
Why This Exists
ChatGPT needs access to current programming documentation but requires specific search and fetch tools. Context7 provides excellent up-to-date docs but uses different tools (resolve-library-id and get-library-docs). This bridge translates between them, giving ChatGPT access to Context7's documentation database.
What It Does
A bridge that allows ChatGPT to access up-to-date programming documentation through the Context7 MCP server. Implements ChatGPT's required search and fetch tools while using Context7's documentation database internally.
Requirements
- Node.js >= 18.0.0
- Python >= 3.8
- ngrok (for ChatGPT access)
Quick Start
-
Install dependencies:
pip install -r requirements.txt -
Start the bridge:
python context7_bridge.pyThe script automatically starts ngrok and displays the ChatGPT-ready URL.
-
Add to ChatGPT: Copy the displayed URL to ChatGPT's MCP connectors:
https://abc123.ngrok-free.app/sse
Available Tools
search
Search for programming libraries and frameworks. Supports both library names (e.g., "React", "MongoDB") and direct Context7 library IDs (e.g., "/reactjs/react.dev").
fetch
Fetch comprehensive documentation for specific libraries. Supports advanced parameters:
- Basic:
library_id - Topic-focused:
library_id|topic:hooks - Custom tokens:
library_id|tokens:15000 - Combined:
library_id|topic:authentication|tokens:12000
Example Topics
hooks- React hooks, useEffect, useStaterouting- Navigation, route setupauthentication- Login, security, JWTinstallation- Setup, configurationapi- API reference, methodsexamples- Code examples, tutorials
How It Works
ChatGPT → ngrok → Bridge → Context7 MCP Server → Documentation Database
- ChatGPT sends search/fetch requests to your bridge
- Bridge translates these to Context7's resolve-library-id/get-library-docs calls
- Context7 returns current documentation
- Bridge formats responses for ChatGPT
Configuration
Command-line options:
python context7_bridge.py --help
--port- Port to run on (default: 8000)--host- Host to bind to (default: 127.0.0.1)--no-ngrok- Disable automatic ngrok tunnel
Environment variables:
LOG_LEVEL- Logging level (default: INFO)
Manual Setup
If you prefer manual ngrok control:
# Start without ngrok
python context7_bridge.py --no-ngrok
# In another terminal
ngrok http 8000
Testing
Test without ChatGPT:
# Health check
curl http://localhost:8000/health
# Test search
curl -X POST http://localhost:8000/sse \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search","arguments":{"query":"react"}}}'
Troubleshooting
"Could not get response from Context7 server"
- Ensure Node.js and npx are installed and in PATH
"Unknown document ID"
- Always call
searchbeforefetchto get valid IDs - Or use direct Context7 library IDs (starting with
/) - Note: Tool descriptions may need refinement for ChatGPT to better understand the search-first workflow - currently works but ChatGPT occasionally has hiccups with the sequence
Debug mode:
LOG_LEVEL=DEBUG python context7_bridge.py
Related Skills
caveman
107.2k🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
claude-mem
94.4kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
84.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
83.6kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
