- Home
- MCP servers
- MCP2HTTP
MCP2HTTP
- javascript
2
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
MCP2HTTP is a lightweight transport adapter that lets MCP clients using stdio talk to stateless HTTP MCP servers. It preserves MCP semantics while connecting your local process to remote HTTP endpoints, enabling new integration scenarios without SSE. You can optionally track requests with a client-generated Session-Id header, and the adapter filters unsupported capabilities to reduce unnecessary traffic.
How to use
Configure your MCP client to invoke the adapter with the endpoint URL and optional headers. The adapter runs as a local command and forwards your requests to an HTTP MCP server.
Basic usage pattern you can copy into your client configuration or CLI invocation is as follows.
npx -y mcp2http <endpoint-url> ["Header: Value"...]
Example configurations
You can point the adapter at a local HTTP MCP endpoint, then include any HTTP headers you need for authentication or context.
{
"mcpServers": {
"my-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp2http",
"http://localhost:3000/mcp"
]
}
}
}
Advanced usage
You can add any number of HTTP headers as arguments. For example, to supply an authorization token:
{
"mcpServers": {
"my-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp2http",
"https://example.com/mcp",
"Authorization: Bearer token123"
]
}
}
}