Skip to content
Back to the catalog
Project mcp-serverNetworkingIntermediateBeta

Build an MCP server

Build a Model Context Protocol server from scratch with JSON-RPC, tools, and resources.

Build it in your language

The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.

Guide language

The stage guides read in this language. Only languages this project is fully translated into show up here; the interface language does not change.

What this project is about

MCP lets applications and agents discover capabilities through a common protocol. In this project you will implement the server rather than integrate an SDK.

You will process one JSON message per stdin line and emit compact JSON responses on stdout. You will progress from the handshake to tools, resources, and reproducible protocol errors.

Roadmap

5 stages across 3 phases. Every stage comes with its guide and its tests: you move on when they pass.

  1. Phase 12 stages

    Protocol core

    Establish NDJSON transport, JSON-RPC, and the initial MCP negotiation.

    1. 01Speak JSON-RPC
    2. 02Negotiate the MCP session
  2. Phase 22 stages

    Useful capabilities

    Publish tools and resources a client can discover and use.

    1. 01Publish and invoke tools
    2. 02Expose resources
  3. Phase 31 stage

    Robust server

    Complete the server with validation, notifications, and standard errors.

    1. 01Harden the protocol

Before you start

A local MCP server that negotiates its version, advertises capabilities, lists and invokes tools, exposes text resources, and returns well-formed JSON-RPC errors.

  • bittorrent
    Beta

    A BitTorrent client

    Bencode, trackers and the peer-to-peer protocol. Download a real file by talking to real peers.

    Advanced12 stages~20 hNetworking
    bencodep2pprotocolos+1

    Go · Python · Java

  • dns-resolver
    Beta

    A DNS resolver

    Build and parse UDP packets bit by bit. Resolve names by walking the hierarchy from the root servers.

    Intermediate8 stages~9 hNetworking
    udpbinarioprotocolos

    Go · Rust · Python

  • http-server
    Beta

    An HTTP server from the socket up

    From raw bytes to a 200 response. Parse requests, manage connections and serve concurrent traffic.

    Intermediate10 stages~12 hNetworking
    socketstcphttp+1

    Go · Python · C · Rust