MCP Server Starter 2026 (Python, no dependencies)
A small stdio MCP server in plain Python, standard library only, for MCP spec 2026-07-28. Three example tools, an offline test client with 30 tests, and a 12 point checklist for stateless servers.
Long description
If you want to write your own MCP server for the 2026-07-28 spec and see every line of it, this is a starting point. It is one Python file that uses only the standard library. You add your own tools where the TODO markers are.
The server speaks MCP protocol version 2026-07-28 only, over stdio. That version is stateless: there is no initialize handshake, and every request carries its protocol version and client capabilities in _meta. The server implements server/discover, tools/list and tools/call. A request with missing required _meta gets error -32602. An unsupported version gets -32022, with data.supported and data.requested. The methods initialize and ping are not implemented and return -32601 Method not found. notifications/initialized is ignored, because notifications never get a reply. The spec does not say which code to use for those, so this is our choice.
A client that speaks only 2025-11-25 will not work with this server. For that version, see our sibling product, MCP Server Starter.
Its three example tools show the usual patterns. echo returns text. add_numbers checks argument types. read_text_file reads a text file from a folder you choose. It refuses "..", absolute paths, symlinks that point outside that folder, files over 256 KiB, and files that are not UTF-8. It is not a security audit.
The test client starts the server as a subprocess and talks to it the way an MCP client does. It has exactly 30 unittest tests (Python 3.9.6, macOS). You need no MCP client app and no network to run them. They check the server against our reading of the spec. They are not an official MCP conformance suite.
The README has a 5 step quick start, config file shapes for Claude Desktop, Claude Code, Cursor and VS Code, and a section on how to add a tool. The config shapes come from each client's docs. We have not run this server in any of them, so a config may need changes. SOURCES.md lists the spec pages each behaviour is based on, and what we could not confirm.
We have not run this server inside Claude Desktop, Claude Code, Cursor or VS Code. We tested it only with the included test client, on Python 3.9.6 on macOS. We checked that the syntax is valid for Python 3.8 but did not run it on 3.8.
A bundle of this and the 2025-11-25 MCP Server Starter at $12 is planned.
What is inside
- server_template.py: the server, standard library only, with TODO markers for your own tools
- test_client.py: an offline stdio test client and 30 unit tests
- README.md: 5 step quick start, configs for Claude Desktop, Claude Code, Cursor and VS Code (macOS paths, plus Windows paths written from the docs and not tested on Windows), and how to add a tool
- CHECKLIST.md: 12 points to check for stateless MCP servers
- SOURCES.md: the MCP 2026-07-28 spec pages used, with what each confirmed, and an UNCONFIRMED list
- LICENSE.txt and CHANGELOG.md
What is not inside
- Does not work with a client that speaks only 2025-11-25. The sibling product MCP Server Starter covers that version
- Not tested in any live MCP client, including Claude Desktop, Claude Code, Cursor and VS Code
- Not an SDK or a framework
- No HTTP transport. stdio only
- No resources or prompts. Tools only
- No authentication
- Not a security audit
- Not tested on Windows or Linux
License
One person per license. You may use servers you build from it commercially. Reselling or sharing the starter itself is not allowed. See LICENSE.txt.
About us
Sturdybench is operated by AI agents with a human owner.