mcp-cage
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-cage use the echo tool to return the text hello world"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-cage
A hand-rolled Model Context Protocol server. No SDK: the JSON-RPC handshake, framing, and dispatch are implemented directly from the protocol spec, with zero runtime dependencies. The eventual goal is a server that exposes sandboxed shell/file tools behind a declarative policy file — scoping paths, rate-limiting calls, and redacting secrets from tool results — with every request, policy decision, and response logged to a replayable JSONL audit trail.
Status
This project is built autonomously, one milestone at a time, and gated on a
passing test suite — no change ships unless npm test is green.
Current milestone: protocol core. The server implements the MCP stdio
handshake (initialize, notifications/initialized, tools/list,
tools/call) with one demo tool. Sandboxed shell/file tools, the policy
engine, secret redaction, and the audit trail are not implemented yet and will
land in later milestones.
Related MCP server: MPC-PoC-1-EchoServerToolsbasicas
Install
Requires Node.js 18 or later. No external packages are installed.
npm installUsage
Run the server directly; it speaks newline-delimited JSON-RPC 2.0 over stdin/stdout, per the MCP stdio transport:
npm startOr point any MCP-compatible client at the binary:
node ./bin/mcp-cage.jsExample session (one JSON object per line on stdin, one back on stdout):
// -> initialize
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"example"}}}
// <- result with serverInfo and the protocol version the server supports
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"serverInfo":{"name":"mcp-cage","version":"0.1.0"}}}
// -> tell the server the client is ready (no response expected)
{"jsonrpc":"2.0","method":"notifications/initialized"}
// -> list tools
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
{"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"echo","description":"Returns the given text back unchanged.","inputSchema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false}}]}}
// -> call a tool
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"echo","arguments":{"text":"hello"}}}
{"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"hello"}]}}Run the test suite:
npm testDependencies
None. Node's built-in node:test, node:assert, and node:child_process
modules cover everything this milestone needs — a line-delimited JSON codec
and a JSON-RPC dispatcher are both small enough to not justify pulling in a
package.
What this demonstrates
Model Context Protocol — a server that speaks MCP's JSON-RPC handshake and exposes a tool over it, built directly from the spec rather than an SDK. The line-framed JSON-RPC codec is in
src/jsonrpc.js; theinitialize/notifications/initialized/tools/list/tools/callmethod dispatch and the handshake state machine are increateDispatcherinsrc/protocol.js; the stdio wiring that turns stdin lines into dispatcher calls and writes responses back to stdout isstartServerinsrc/server.js.Safety and guardrails — not yet implemented. This milestone only builds the protocol core; the policy engine, path scoping, rate limiting, secret redaction, and audit trail described above are planned for upcoming milestones and will be documented here once they land.
Available Tools
1 toolechoA
Returns the given text back unchanged.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusing it with another tool. However, the lack of any other tools means there is no meaningful set to disambiguate.
The single tool name 'echo' is clear and verb-like, with no inconsistent conventions to violate. There is no broader pattern to evaluate, so consistency is trivially satisfied but not demonstrated.
A single tool is far too thin for a general-purpose MCP server; it feels like a placeholder rather than a usable tool surface. The count is well below the typical 3-15 range for a coherent server.
The surface consists solely of an echo utility, with no create/read/update/delete or lifecycle operations for any identifiable domain. It is severely incomplete for any practical purpose.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Open-source MCP gateway with per-agent tool permissions, call approvals and tool-change review.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA model-agnostic MCP server exposing example tools (add1, multiply2, greet) for learning purposes, working with any LLM through stdio transport.-
- FlicenseAqualityDmaintenanceA learning-oriented MCP server that exposes basic tools (echo, add, reverse) over stdio transport to validate MCP handshake and tool calls.3-
- AlicenseAqualityCmaintenanceExposes a verified tool registry (calculator, sandboxed file read, web fetch) over MCP stdio, enabling any MCP-capable client to reuse the same tools from the inspectable ReAct loop.3MIT
- AlicenseNot gradedqualityDmaintenanceProvides a runnable local stdio Python server scaffold that coding agents extend into custom tool integrations by describing an idea and letting the agent investigate, build, test, and install it. Ships with no prebuilt tools, so it enables guided, agent-assisted creation of MCP tools connected to external APIs, databases, or websites while writes stay disabled until explicitly agreed.1MIT