{"_id":"@agents-skills/mcp-gate","name":"@agents-skills/mcp-gate","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@agents-skills/mcp-gate","version":"1.0.0","description":"Stdio gate that fixes LLM parameter serialization in agent CLI tools (Amp, Claude Code, Cursor) - coerces string parameters to correct JSON types","type":"module","bin":{"mcp-gate":"gate.mjs"},"repository":{"type":"git","url":"git+https://github.com/agents-skills/mcp-gate.git"},"keywords":["mcp","gate","type-coercion","ampcode","claude-code","cursor","agent-cli"],"license":"MIT","gitHead":"8ec46c960a4a3c5def5672074baf79f430459e2d","_id":"@agents-skills/mcp-gate@1.0.0","bugs":{"url":"https://github.com/agents-skills/mcp-gate/issues"},"homepage":"https://github.com/agents-skills/mcp-gate#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-YOdWitndiMwWphurWUrc6twj+MsK5V/pBtBI3HXpLCx6b3wQhHKt5fHXHN7RRDb2ng6iQ76y0QLHDuBGGMehYA==","shasum":"ba3b3e942d33f9b79ae6ccd8a9c4a1d0eec8b4c6","tarball":"https://registry.npmjs.org/@agents-skills/mcp-gate/-/mcp-gate-1.0.0.tgz","fileCount":5,"unpackedSize":15613,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDmVJbYkiax0hvAgL0Wf8dgkWNEGfZwfRNOwx6dYPiwdwIgJJ7vlpIjFnqx+o2wb59O/8epduljyBuhu7ajrm3d7iE="}]},"_npmUser":{"name":"caocuong2404","email":"officialcuong@gmail.com"},"directories":{},"maintainers":[{"name":"caocuong2404","email":"officialcuong@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-gate_1.0.0_1773115834224_0.02263404136895275"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T04:10:34.143Z","1.0.0":"2026-03-10T04:10:34.367Z","modified":"2026-03-10T04:10:34.557Z"},"maintainers":[{"name":"caocuong2404","email":"officialcuong@gmail.com"}],"description":"Stdio gate that fixes LLM parameter serialization in agent CLI tools (Amp, Claude Code, Cursor) - coerces string parameters to correct JSON types","homepage":"https://github.com/agents-skills/mcp-gate#readme","keywords":["mcp","gate","type-coercion","ampcode","claude-code","cursor","agent-cli"],"repository":{"type":"git","url":"git+https://github.com/agents-skills/mcp-gate.git"},"bugs":{"url":"https://github.com/agents-skills/mcp-gate/issues"},"license":"MIT","readme":"# MCP Gate\n\nA transparent stdio gate that fixes the [LLM parameter serialization bug](https://github.com/modelcontextprotocol/servers/issues/3428) in LLM-based agent CLI tools (Amp, Claude Code, Cursor, etc.) where tool parameters are sent as strings instead of their correct JSON types.\n\n## The Problem\n\nLLMs non-deterministically serialize MCP parameters as strings:\n- `\"true\"` instead of `true` (boolean)\n- `\"5\"` instead of `5` (number)\n- `\"[\\\"markdown\\\"]\"` instead of `[\"markdown\"]` (array)\n\n## How It Works\n\n```\nAmp → [gate] → MCP Server\n        ↓\n1. Caches tool schemas from tools/list\n2. Intercepts tools/call requests\n3. Coerces string params → correct types\n4. Forwards to real server\n```\n\n## Usage\n\nWrap any MCP server command with the gate. Works with Amp, Claude Code, Cursor, and other agent CLI tools:\n\n### Before (breaks)\n```json\n{\n  \"amp.mcpServers\": {\n    \"firecrawl\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"firecrawl-mcp\"]\n    }\n  }\n}\n```\n\n### After (fixed with mcp-gate)\n```json\n{\n  \"amp.mcpServers\": {\n    \"firecrawl\": {\n      \"command\": \"mcp-gate\",\n      \"args\": [\"npx\", \"-y\", \"firecrawl-mcp\"]\n    }\n  }\n}\n```\n\n### Brave Search example\n```json\n{\n  \"brave-search\": {\n    \"command\": \"mcp-gate\",\n    \"args\": [\"npx\", \"-y\", \"@nicepkg/brave-search-mcp\"]\n  }\n}\n```\n\n### Cursor config.json example\n```json\n{\n  \"mcpServers\": {\n    \"github\": {\n      \"command\": \"mcp-gate\",\n      \"args\": [\"npx\", \"-y\", \"github-mcp\"]\n    }\n  }\n}\n```\n\n## What It Coerces\n\n| From (string) | To (native) | Schema type |\n|---|---|---|\n| `\"true\"` / `\"false\"` | `true` / `false` | `boolean` |\n| `\"42\"` / `\"3.14\"` | `42` / `3.14` | `number` / `integer` |\n| `\"[\\\"a\\\",\\\"b\\\"]\"` | `[\"a\",\"b\"]` | `array` |\n| `\"{\\\"k\\\":\\\"v\\\"}\"` | `{\"k\":\"v\"}` | `object` |\n\nAlso recurses into nested object properties and array items.\n\n## Zero Dependencies\n\nPure Node.js (>=18), no npm install needed.\n","readmeFilename":"README.md","_rev":"1-488cb051dee5ba873e0e997a60c82992"}