Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
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.

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.

The shortcut

Ask two questions: "Whose data is it?" and "How many people use it?" One person's machine → local. Shared data or many users → remote, with authentication from day one.

Planning two servers for TripmateStep 1 of 4
  1. Trip files

    Asha's PDFs, on her laptop, used only by her. Local server, launched by the host, limited to ~/Trips.

The trap is shipping a remote server with no authentication "just for now". A server on the network with tools that act on accounts is open to anyone who finds its address.

Drills

Answer fast — trust the rule.

quick drill

How does a host usually talk to a local MCP server?

quick drill

A company wants all employees' AI apps to search its shared wiki. Which fits best?

quick drill

What must a remote server have that a local one often does not?

quick drill

Which step comes first when creating an MCP server?

Remember

  • Local servers run beside the user over standard input and output; remote servers run on the network over HTTP.
  • Shortcut: whose data, and how many users? One machine → local; shared → remote.
  • Trap: a remote server without authentication.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainLocal or remote?

You are building two MCP servers: one that reads notes from a user's own notes folder, and one that lets a whole company query its shared customer database. Decide local or remote for each, and explain the transport and security each needs.