Truto MCP Stdio Proxy
A CLI program that bridges stdio-based MCP clients to HTTP Streamable MCP servers. It reads newline-delimited JSON-RPC messages from stdin, forwards them to a specified MCP server endpoint via HTTP POST, handles SSE streaming responses, and writes the responses to stdout.
Implements the MCP Streamable HTTP transport (spec version 2025-11-25).
Features
- Streamable HTTP transport -- full support for both
application/jsonandtext/event-streamresponses - Session management -- automatically tracks
MCP-Session-Idacross requests - Protocol version negotiation -- extracts
protocolVersionfrom the initialize handshake and sendsMCP-Protocol-Versionon subsequent requests - Server-initiated messages -- opens a background GET SSE stream for server-to-client notifications and requests, with automatic reconnection
- Session cleanup -- sends HTTP DELETE on shutdown to cleanly terminate the session
Requirements
- Go 1.24.2 or later (for building from source)
Installation
Download Pre-built Binaries
Download the latest release from the GitHub releases page. Choose the appropriate binary for your platform:
- Linux (amd64):
truto-mcp-stdio-linux-amd64-v<version> - macOS (Intel):
truto-mcp-stdio-darwin-amd64-v<version> - macOS (Apple Silicon):
truto-mcp-stdio-darwin-arm64-v<version> - Windows (amd64):
truto-mcp-stdio-windows-amd64-v<version>.exe
After downloading, make the binary executable (on Unix-like systems):
chmod +x truto-mcp-stdio-<platform>-v<version>
Building from Source
go build -o truto-mcp-stdio
Usage
./truto-mcp-stdio <API_URL>
Arguments
<API_URL>: The MCP server HTTP endpoint URL (required)
Example
echo '{"jsonrpc": "2.0", "method": "initialize", "params": {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}, "id": 1}' | ./truto-mcp-stdio https://api.truto.one/mcp/<your-mcp-id>
Client Setup
Below are setup instructions for all major MCP clients. Replace /path/to/truto-mcp-stdio with the actual path to the binary and <your-mcp-id> with your Truto MCP endpoint ID.
Cursor
Config file: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-scoped)
{
"mcpServers": {
"truto": {
"command": "/path/to/truto-mcp-stdio",
"args": ["https://api.truto.one/mcp/<your-mcp-id>"]
}
}
}
Cursor hot-reloads config changes -- no restart needed.
Claude Desktop
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\\Claude\\claude_desktop_config.json
{
"mcpServers": {
"truto": {
"command": "/path/to/truto-mcp-stdio",
"args": ["https://api.truto.one/mcp/<your-mcp-id>"]
}
}
}
Requires a full restart of Claude Desktop after editing.
Claude Code (CLI)
Add via the CLI:
claude mcp add truto -- /path/to/truto-mcp-stdio https://api.truto.one/mcp/<your-mcp-id>
Or create .mcp.json at your project root:
{
"mcpServers": {
"truto": {
"type": "stdio",
"command": "/path/to/truto-mcp-stdio",
"args": ["https://api.truto.one/mcp/<your-mcp-id>"]
}
}
}
VS Code (GitHub Copilot)
Create .vscode/mcp.json in your project:
{
"servers": {
"truto": {
"type": "stdio",
"command": "/path/to/truto-mcp-stdio",
"args": ["https://api.truto.one/mcp/<your-mcp-id>"]
}
}
}
Note: VS Code uses
"servers"as the root key, not"mcpServers".
Windsurf
Config file locations:
- macOS/Linux:
~/.codeium/windsurf/mcp_config.json - Windows:
%USERPROFILE%\\.codeium\\windsurf\\mcp_config.json
{
"mcpServers": {
"truto": {
"command": "/path/to/truto-mcp-stdio",
"args": ["https://api.truto.one/mcp/<your-mcp-id>"]
}
}
}
Requires a restart of Windsurf after editing.
Cline (VS Code Extension)
Add via the MCP Servers panel in the Cline sidebar, or edit the config file directly:
- macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Windows:
%APPDATA%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json
{
"mcpServers": {
"truto": {
"command": "/path/to/truto-mcp-stdio",
"args": ["https://api.truto.one/mcp/<your-mcp-id>"]
}
}
}
Development
go run truto-mcp-stdio.go <API_URL>
How It Works
- Reads JSON-RPC messages line-by-line from stdin
- Sends each message as an HTTP POST to the MCP endpoint with the required
Accept,MCP-Session-Id, andMCP-Protocol-Versionheaders - Handles responses in both
application/jsonandtext/event-stream(SSE) formats - Extracts
MCP-Session-Idfrom the server's initialize response and includes it on all subsequent requests - Extracts the negotiated
protocolVersionand sends it as theMCP-Protocol-Versionheader - Opens a background GET SSE stream after initialization for server-initiated messages, with automatic reconnection
- On shutdown (stdin close or signal), sends HTTP DELETE to cleanly terminate the session
- Errors and diagnostics are written to stderr
Recommend MCP Servers 💡
mcp-matlab-executor
MCP tool enabling secure execution of MATLAB code with user approval prompts
jfx
An MCP server built with Quarkus and JavaFX, enabling LLMs to generate drawings using JavaFX primitives.
yfinance-trader
An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for Claude Desktop.
@jetbrains/mcp-proxy
A model context protocol server to work with JetBrains IDEs: IntelliJ, PyCharm, WebStorm, etc. Also, works with Android Studio
defold-mcp
An open-source Model Context Protocol (MCP) server bridging the Defold game engine with AI-powered tools like Cursor for automated project management and workflow integration
paulsmith/tailscale-mcp-server
A simple MCP server providing read-only access to Tailscale CLI for MCP-compatible clients like Claude Desktop