Overview
This tool is an adapter for situations where your MCP client only supports the STDIO protocol, but the target MCP server speaks StreamableHTTP.
Usage
Install
uv add mcp-transcoder
Example MCP client configuration
{
"mcpServers": {
"lf-agents": {
"command": "uvx",
"args": [
"mcp-transcoder",
"--insecure",
"--timeout",
"300",
"--headers",
"x-api-key",
"YOUR_API_KEY",
"https://your_mcp_domain/mcp"
]
}
}
}
Prerequisites
- The MCP server must support StreamableHTTP.
- Server-Sent Events (SSE) is not supported.
Notes
- If the server requires an API key, you can pass
--headers KEY VALUEmultiple times. - If a custom CA certificate is required, specify
--ssl-cert-file /path/to/cacert.pem(applies only to the MCP connection). For quick testing, you can set--insecureto skip HTTPS verification. The environment variableSSL_CERT_FILEis also supported, but--ssl-cert-fileis recommended so the setting does not affect the entire process.
Timeout settings
- The overall timeout for each request (initialize / list_tools / call_tool, etc.) is 120 seconds by default.
- To change it, specify
--timeout SECONDS.- Example:
uvx mcp-transcoder --timeout 300 https://example/mcp
- Example:
- The same value is applied to the HTTP client (httpx) timeouts to improve stability for long-running operations.
Command-line options
| Option | Description | Default | Example |
|---|---|---|---|
url |
The target StreamableHTTP MCP endpoint (required) | none (required) | https://your_mcp_streamable_http_endpoint/mcp |
-H KEY VALUE / --headers KEY VALUE |
Add extra HTTP headers (e.g., API keys) | none | --headers x-api-key YOUR_API_KEY, --headers Authorization "Bearer YOUR_TOKEN" |
--insecure / --no-insecure |
Disable/enable TLS certificate verification | verification enabled (--no-insecure) |
Disable: --insecure / Recommended: SSL_CERT_FILE=/path/to/cacert.pem uvx mcp-transcoder ... |
--timeout SECONDS |
Overall timeout per request (initialize/list_tools/call_tool, etc.) | 120 (or MCP_PROXY_TIMEOUT env var) |
--timeout 300, MCP_PROXY_TIMEOUT=300 uvx mcp-transcoder ... |
--ssl-cert-file PATH |
CA bundle used only for MCP connections | system/default trust store | --ssl-cert-file /path/to/cacert.pem |
--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL} |
Log verbosity | INFO |
--log-level DEBUG |
TLS verification (enterprise CA / self-signed)
- Adding
--insecuredisables certificate verification to the remote server.- Example:
uvx mcp-transcoder --insecure --headers x-api-key YOUR_API_KEY https://example/mcp
- Example:
- Recommended: Keep verification enabled and provide a CA certificate instead.
- Example:
uvx mcp-transcoder --ssl-cert-file /path/to/cacert.pem https://example/mcp - Note:
--ssl-cert-fileis applied only to the httpx client used for the MCP connection. It does not affectuvxdependency resolution (e.g., connections to PyPI).
- Example:
Tests
uv run pytest -q
uvx cache precautions
To avoid issues caused by stale caches, pass --isolated --no-cache to the uvx command when testing.
URLs
PyPI
https://pypi.org/project/mcp-transcoder/
GitHub
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcp_transcoder-0.1.1.tar.gz
(11.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_transcoder-0.1.1.tar.gz.
File metadata
- Download URL: mcp_transcoder-0.1.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4fd814a3d07f020b4b99747afe62edfa49632d3e48864b87cb477651202507e
|
|
| MD5 |
3f3435780a2e62d3d2beb5bfa466983a
|
|
| BLAKE2b-256 |
5a60f25ecf27482743f5270c7e437bccbdb768a4d4c9af589a540136baae6639
|
File details
Details for the file mcp_transcoder-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcp_transcoder-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48c872a6a2dfd5f888177b7c062669563fee00fa53ef6c6cdb06398806288d86
|
|
| MD5 |
ef6184b9d8bbd49fda5388d43d22a96c
|
|
| BLAKE2b-256 |
b42b0c16a0bac0f67f1fa1e2a641466f084f903da10ccfe4c35e1c8e7df84513
|