π¦
Gate
OAuth 2.1 reverse proxy for MCP servers β RFC 9728 metadata + JWT validation
0 installs
Trust: 37 β Low
Ai
Ask AI about Gate
Powered by Claude Β· Grounded in docs
I know everything about Gate. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
MCP Gate
A transparent stdio gate that fixes the LLM parameter serialization bug in LLM-based agent CLI tools (Amp, Claude Code, Cursor, etc.) where tool parameters are sent as strings instead of their correct JSON types.
The Problem
LLMs non-deterministically serialize MCP parameters as strings:
"true"instead oftrue(boolean)"5"instead of5(number)"[\"markdown\"]"instead of["markdown"](array)
How It Works
Amp β [gate] β MCP Server
β
1. Caches tool schemas from tools/list
2. Intercepts tools/call requests
3. Coerces string params β correct types
4. Forwards to real server
Usage
Wrap any MCP server command with the gate. Works with Amp, Claude Code, Cursor, and other agent CLI tools:
Before (breaks)
{
"amp.mcpServers": {
"firecrawl": {
"command": "npx",
"args": ["-y", "firecrawl-mcp"]
}
}
}
After (fixed with mcp-gate)
{
"amp.mcpServers": {
"firecrawl": {
"command": "mcp-gate",
"args": ["npx", "-y", "firecrawl-mcp"]
}
}
}
Brave Search example
{
"brave-search": {
"command": "mcp-gate",
"args": ["npx", "-y", "@nicepkg/brave-search-mcp"]
}
}
Cursor config.json example
{
"mcpServers": {
"github": {
"command": "mcp-gate",
"args": ["npx", "-y", "github-mcp"]
}
}
}
What It Coerces
| From (string) | To (native) | Schema type |
|---|---|---|
"true" / "false" | true / false | boolean |
"42" / "3.14" | 42 / 3.14 | number / integer |
"[\"a\",\"b\"]" | ["a","b"] | array |
"{\"k\":\"v\"}" | {"k":"v"} | object |
Also recurses into nested object properties and array items.
Zero Dependencies
Pure Node.js (>=18), no npm install needed.
