Command Palette

Search for a command to run...

UnylyUnyly
Unyly▸ Q&A

How do I write my own MCP server?

▸ TL;DR

Use the official SDK in your language (TypeScript, Python, Go), define tools with JSON Schema, expose them via stdio or HTTP. Submit to unyly.org/submit so other users can discover it.

Read MCP explainer

Full answer

The MCP spec defines a JSON-RPC dialect over stdio or HTTP/SSE. Official SDKs exist for TypeScript, Python and Go (github.com/modelcontextprotocol). Pattern: 1) implement the Server interface, 2) register tools with name, description, input schema, 3) handle tool calls by returning results. For TypeScript: `npm install @modelcontextprotocol/sdk` and use the StdioServerTransport. Test locally with Claude Desktop by pointing claude_desktop_config.json at your binary. When ready, submit to unyly.org/submit — the catalog auto-verifies and lists your MCP.

Related questions