Build and Publish MCP Servers
Everything from your first working server to a published, authorized, remote one. Each guide uses complete code that we run before publishing, in both Python and TypeScript where the SDKs support it.
- Build your first MCP server
- Test it with MCP Inspector
- Decide between local and remote
- Deploy it as a remote server
- Add authorization
- Publish it to the MCP Registry
Build an MCP server
Build a working MCP server in Python or TypeScript with the official SDKs, test it with MCP Inspector, and connect it to Claude Desktop.
Tools, resources, prompts
Learn what MCP tools, resources and prompts are, who controls each one, and how to build and test all three in Python or TypeScript.
Test with MCP Inspector
Test an MCP server with MCP Inspector's web UI or CLI, over stdio and Streamable HTTP, in both protocol eras, and fix the errors you'll see.
FastMCP
Build an MCP server in Python with FastMCP, test it in code and with MCP Inspector, and see what FastMCP adds over the official SDK.
Local vs remote
Local MCP servers run on your machine over stdio. Remote ones run over Streamable HTTP. Compare reach, security and which AI apps support each.
Deploy a remote server
Serve an MCP server over Streamable HTTP, test it over HTTP with MCP Inspector, and run it in a container behind HTTPS so AI apps can reach it.
Authorization
Protect a remote MCP server with OAuth 2.1 bearer tokens. Covers discovery, audience and scope checks, and working Python and TypeScript code tested with MCP Inspector.
Package as .mcpb
Package a local MCP server as an .mcpb file with a manifest.json, check it with the MCPB CLI, and install it in Claude Desktop with one click.
Publish to the MCP Registry
Publish your MCP server to the official MCP Registry with mcp-publisher, using an npm package, a server.json file and GitHub login, then automate new versions.
List in directories
Get your MCP server listed correctly in MCP directories. Set the package name, tool annotations, icons, README and version, check them, then publish to the MCP Registry.
Publish to MCPBundles
Publish a remote MCP server to the MCPBundles directory, claim the listing, score it, and manage its MCP App badge and archive status.
Build an MCP client
Build an MCP client in Python or TypeScript with the official SDKs, connect it over stdio and Streamable HTTP, and hand its tool list to a model.
Build in Java
Build a working MCP server in Java with the official MCP Java SDK, test it over stdio with MCP Inspector, and connect it to Claude Desktop.
Test in CI
Test an MCP server in CI with pytest and node:test, a tool contract check, MCP Inspector in CLI mode, and a GitHub Actions matrix over both protocol eras.
Build in Go
Build the bookmarks MCP server in Go with the official Go SDK, test it with MCP Inspector in both protocol eras, and run it over stdio.
Build in C#
Build a working MCP server in C# with the official ModelContextProtocol NuGet package, test it with MCP Inspector and connect it to Claude Desktop.
Build an MCP server in Rust
Build a working MCP server in Rust with the official rmcp SDK, test it with MCP Inspector in both protocol eras, and connect it to an AI app.
Write, generate or host
Compare hand-writing an MCP server, generating one from an OpenAPI spec and using a vendor's official hosted server, before you write any code.
Run in production
After deploy, log to stderr, time each request, set deadlines on tool calls, add health checks, and change tools without breaking connected clients.