Skip to the workspace
Pebellslearn by building
Tools and the Model Context Protocol  ›  Capstone Project

Creating MCP Servers — Local or Remote

Local Desktop 15 minAn MCP server can run locally beside the user over standard input and output, or remotely as an HTTP service that must authenticate users, and the choice depends on whose data it serves and how many people use it.

ai agents / Creating MCP Servers — Local or Remote

Explore each scene at your own pace.

01 · The rule

The rule

Creating MCP Servers — Local or Remote

Asha keeps her tickets and itineraries as PDFs in a folder on her laptop. Tripmate's railway timetable, on the other hand, lives on the railway company's servers and is used by thousands of people. Both can be offered as MCP servers, but they are built and run very differently. The first question when creating a server is where it should run.

The rule

Local servers live beside the user; remote servers live on the network and must authenticate.

A local server runs on the user's own machine. The host usually starts it as a child process and talks to it through standard input and output — no network port at all. It suits anything tied to that machine: local files, a local database, desktop apps. It runs with the user's own permissions, and it only serves that one user.

A remote server runs as a web service. Hosts connect to it over HTTP from anywhere. It suits shared services — a timetable, a company knowledge base, a payments system. Because anyone on the network could try to connect, it needs authentication (commonly an OAuth sign-in flow), per-user permissions, rate limits and the usual care of running a web service.

A host's configuration for a local server often looks something like this — a command to launch it:

{
  "servers": {
    "trip-files": { "command": "python", "args": ["trip_files_server.py", "--folder", "~/Trips"] }
  }
}

A remote server is instead registered by its URL, and the user signs in when the host first connects.

Whichever you choose, the building steps are the same:

  1. Choose the capabilities — which tools, resources and prompts.
  2. Define each tool — name, description and input schema, exactly as in any tool definition.
  3. Write the handlers — the code that runs when a tool is called.
  4. Pick the transport — standard input/output for local, HTTP for remote.
  5. Test with a client before connecting a real host.
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.