tmcproxy
tmcproxy
OpenAI Secure MCP Tunnel / ChatGPT 커넥터를 레거시 stdio MCP 서버에 연결하는 최소한의 MCP stdio 호환성 프록시입니다.
이 프록시가 해결하는 문제
ChatGPT 커넥터(OpenAI Secure MCP Tunnel을 통해)는 server/discover로 stdio MCP 서버를 프로브합니다. 이 메서드는 MCP 2026-07-28에서 도입되었습니다. codex mcp-server 및 local-mcp mcp와 같은 레거시 서버는 2025-06-18만 지원하며 server/discover에 대해 method not found를 반환하여 커넥터 생성을 실패하게 합니다.
tmcproxy는 그 사이에 위치하여 다운스트림을 대신해 server/discover에 응답하고, 다른 모든 요청은 그대로 전달합니다.
ChatGPT → tunnel-client → tmcproxy → codex mcp-server (or local-mcp mcp)
↑
answers server/discover here,
forwards everything else straight throughRelated MCP server: MCP SSE Proxy
요구 사항
Node.js >= 23.6.0 (네이티브 TypeScript strip-mode 실행을 위해 — 빌드 단계 불필요)
사용법
독립 실행
node src/tmcproxy.ts -- codex mcp-server
node src/tmcproxy.ts -- local-mcp mcp또는 환경 변수를 통해:
TMCPROXY_DOWNSTREAM="codex mcp-server" node src/tmcproxy.tstunnel-client와 함께 사용
tunnel-client 프로필 YAML을 편집하세요 (예: ~/.config/tunnel-client/<profile>.yaml):
mcp:
commands:
- channel: main
command: "node /path/to/tmcproxy/src/tmcproxy.ts -- codex mcp-server"그런 다음:
tunnel-client run --profile <profile>다운스트림 전환은 -- 뒤의 명령만 변경하면 됩니다:
command: "node /path/to/tmcproxy/src/tmcproxy.ts -- local-mcp mcp"작동 방식
요청 | 동작 |
| 프록시가 사양에 맞는 |
| 다운스트림에 그대로 전달됩니다. 프록시는 자체적으로 |
| JSON-RPC id를 유지한 채 그대로 전달됩니다. |
알림 (id 없음) | 전달됨; 응답이 예상되지 않습니다. |
잘못된 형식의 JSON |
|
알 수 없는 메서드 | 전달됨; 다운스트림 오류가 다시 흘러갑니다. |
supportedVersions에 2026-07-28이 포함된 이유
ChatGPT는 2026-07-28로 프로브합니다. 응답에 2025-06-18만 나열되면 ChatGPT는 이를 "요청한 버전이 지원되지 않음"으로 간주하고 무한히 재시도하여 initialize 또는 tools/list에 도달하지 못합니다. 2026-07-28을 나열함으로써 ChatGPT는 최신 모드로 진입하여 상태 비저장 요청(tools/list, tools/call)을 직접 보냅니다. 레거시 다운스트림은 사전 initialize 없이도 이에 응답하므로(codex mcp-server 및 local-mcp mcp 모두 확인됨), 투명한 전달이 작동합니다.
디버깅
디버그 로그
TMCPROXY_DEBUG=1을 설정하여 server/discover 요청 및 응답을 stderr에 기록합니다:
TMCPROXY_DEBUG=1 tunnel-client run --profile local-codexstderr에 출력 (stdout은 깨끗하게 유지 — MCP 채널입니다):
[tmcproxy] downstream: ["codex","mcp-server"]
[tmcproxy] discover request: {"jsonrpc":"2.0","id":"openai-mcp-discover",...}
[tmcproxy] discover response: {"resultType":"complete","supportedVersions":["2026-07-28","2025-06-18"],...}로컬 종단 간 테스트 (API 키 불필요)
tunnel-client dev proxy는 ChatGPT가 사용하는 것과 동일한 MCP 프로브 흐름을 재현하는 로컬 인메모리 제어 플레인을 실행합니다:
tunnel-client dev proxy \
--mcp-command "command=node /path/to/tmcproxy/src/tmcproxy.ts -- codex mcp-server,channel=main" \
--url-file /tmp/url.json \
--duration 30s
MCP_URL=$(node -e "console.log(JSON.parse(require('fs').readFileSync('/tmp/url.json','utf8')).mcp_url)")
curl -sS -X POST "$MCP_URL" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2026-07-28' \
-H 'Mcp-Method: server/discover' \
-d '{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}'기준 비교
프록시가 필요한지 확인하려면 다운스트림을 dev proxy를 통해 직접 실행하고 server/discover 실패를 관찰하세요:
tunnel-client dev proxy \
--mcp-command "command=codex mcp-server,channel=main" \
--url-file /tmp/url.json --duration 30s
# server/discover → -32601 method not found테스트
pnpm install
pnpm test # unit + integration
pnpm test:unit # mock downstream only
pnpm test:integration # real codex / local-mcp (auto-skipped if not installed)
pnpm typecheck단위 테스트는 모의 다운스트림(test/fixtures/mock-downstream.js)을 사용하며 다음을 포함합니다: discover 응답 형태, 기능 프로빙, initialize 전달, tools/list, tools/call id 보존, ping, 알 수 없는 메서드, 잘못된 형식의 JSON, 알림, stderr 미러링, 다운스트림 종료 처리, stdout 누수 감지.
통합 테스트는 PATH에서 사용 가능한 경우 실제 codex mcp-server 및 local-mcp mcp 바이너리를 실행합니다.
보안
진단 정보는 stderr로만 전송됩니다; stdout은 MCP 트래픽용으로 예약됩니다.
자격 증명, API 키 또는 비밀은 기록되지 않습니다.
다운스트림은 argv를 통해 생성됩니다 (셸 사용 안 함).
프록시는
server/discover만 처리합니다; 다른 모든 요청은 변경 없이 통과합니다.프록시는 다운스트림의 권한을 확장하지 않습니다.
라이선스
Apache-2.0
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA lightweight bridge that wraps OpenAI's built-in tools (like web search and code interpreter) as Model Context Protocol servers, enabling their use with Claude and other MCP-compatible models.412MIT
- Flicense-quality-maintenanceBridges STDIO-based MCP clients with SSE-based MCP servers, allowing applications like Claude Desktop to connect to remote MCP servers that use SSE transport.9
- Flicense-qualityDmaintenanceEnables LLMs to use llama.cpp models via MCP protocol by bridging MCP requests to an OpenAI-compatible API.
- AlicenseAqualityBmaintenanceBridges OpenAI Codex CLI to any MCP client, allowing headless Codex sessions via tools like codex and codex-reply.229MIT
Related MCP Connectors
MCP server bridging holepunchto/keet-identity-key to the Hive agentic identity network
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mkusaka/tmcproxy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server