mcp-proxy
Verified Safeby punkpeye
Overview
A TypeScript streamable HTTP and SSE proxy for MCP servers that use stdio transport.
Installation
npx mcp-proxy --port 8080 --shell -- tsx server.jsEnvironment Variables
- MCP_PROXY_API_KEY
Security Notes
The MCP Proxy itself demonstrates robust implementation for its core functionality and configurable security features. It supports API key authentication via `X-API-Key` headers and custom stateless OAuth 2.0 JWT Bearer token authentication through a user-provided callback. HTTPS/SSL is supported for encrypted communication. CORS is configurable with sensible defaults, allowing users to fine-tune origin, methods, and headers. The `/ping` and `OPTIONS` endpoints are exempt from authentication. However, as a proxy, its overall security posture heavily depends on the trustworthiness and security of the underlying MCP server it spawns and communicates with over stdio. The use of `child_process.spawn` (especially with the `--shell` option) means that executing untrusted commands via the proxy could lead to arbitrary code execution on the host. The `--tunnel` feature, while convenient, exposes the local server to the public internet, requiring careful consideration of the proxied application's vulnerabilities. No obvious hardcoded secrets, `eval` usage on untrusted input, or malicious patterns were found within the proxy's source code itself.
Similar Servers
mcp-proxy
Acts as a transparent proxy for Model Context Protocol (MCP) servers, allowing switching between stdio, Server-Sent Events (SSE), and Streamable HTTP transports.
mcphub
An orchestration hub that aggregates, manages, and routes Model Context Protocol (MCP) servers and their tools, providing a centralized interface, user management, OAuth 2.0 authorization server capabilities, and AI-powered tool discovery and routing.
frontmcp
The CodeCall plugin provides AgentScript-based meta-tools for orchestrating MCP tools, enabling programmatic discovery, description, execution, and invocation of server capabilities within a sandboxed JavaScript environment.
mcp-typescript-template
This project provides a foundational TypeScript template for developing remote Model Context Protocol (MCP) servers with robust tooling and best practices.