MCP Tool Server
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 Tool Serverwhat's the current UTC time?"
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 Tool Server
A Model Context Protocol (MCP) server implemented from scratch over stdio using JSON-RPC 2.0 — plus a tiny client to drive it. No SDK, no dependencies: ~350 lines that show exactly how MCP handshakes and tool calls work on the wire.
Why MCP
MCP is the emerging standard for connecting LLM agents to external tools and
data. This repo demonstrates the protocol mechanics — initialize,
notifications/initialized, tools/list, tools/call, ping — so an agent
(Claude, Copilot, custom) can discover and invoke tools over a pipe.
Related MCP server: MCP Boilerplate
Architecture
MCP client ──JSON-RPC over stdio──▶ mcp_server
(client.py) newline-delimited ├── protocol.py (errors, envelopes)
{jsonrpc,id,method} ├── server.py (dispatch + stdio loop)
└── tools.py (echo, add, sqrt, now_utc)Quickstart
# run the demo client against a live server subprocess
PYTHONPATH=src python3 client.py
# run the server directly (speak JSON-RPC on stdin)
PYTHONPATH=src python3 -m mcp_server
# tests (in-process dispatch + a real spawned-subprocess handshake)
python3 tests/test_mcp_server.pyProtocol coverage
Method | Behaviour |
| Negotiates protocol version, returns capabilities + serverInfo |
| Marked initialized; no response (correct notification semantics) |
| Returns each tool's |
| Runs the handler; tool errors return in-band ( |
| Liveness check |
Malformed JSON → -32700 parse error; unknown method → -32601; bad params →
-32602. Notifications never get a reply, as the spec requires.
Design notes
Handler errors never kill the server — they're converted to JSON-RPC errors or in-band tool results, so one bad call can't take the transport down.
Injectable streams (
serve(lines=..., stdout=...)) make the stdio loop unit-testable without spawning processes; a separate test does the real spawn.Tool schemas are JSON Schema, matching MCP's
inputSchemacontract.
Skills demonstrated
Model Context Protocol (MCP) · JSON-RPC 2.0 · stdio transport · tool schemas
· protocol error handling · subprocess integration testing · Python packaging
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseCqualityCmaintenanceA minimal Node.js Model Context Protocol server that exposes two simple tools ('add' and 'getTime') that can be called from AI assistants like Claude Desktop or Cursor.259 npmMIT
- AlicenseNot gradedqualityDmaintenanceA minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.8 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA Python-based demonstration server showcasing multiple Model Context Protocol transport mechanisms, including stdio, SSE, and HTTP. It provides a functional reference for tool discovery and execution using a sample number addition tool.-
- FlicenseNot gradedqualityDmaintenanceA model-agnostic MCP server exposing example tools (add1, multiply2, greet) for learning purposes, working with any LLM through stdio transport.-