The idea
Before MCP, every app wired every tool its own way. The Model Context Protocol is an open standard: an MCP server exposes tools (actions), resources (readable data) and prompts (templates) over a common protocol, and any MCP-capable client can use them.
Servers run locally over stdio (a process the client starts) or remotely over HTTP. Official SDKs exist for Python, TypeScript and other languages; FastMCP in Python turns decorated functions into a server in a few lines.
Write one server for a system you know (your database, your ticket tracker, your notes) and it works in desktop chat apps, IDEs and your own agents.
MCP is becoming the standard way to plug tools into AI apps. Building a server is a core AI engineering skill.
Picture it
Words to know
- Tool / resource / promptThe three things an MCP server can offer.
- TransportHow client and server talk: stdio or streamable HTTP.
Try it without code
Install an existing server
- In a desktop chat app or IDE that supports MCP, add the official filesystem server for one folder.
- Ask it to list and summarise files there.
Use it in code
A notes MCP server with one tool and one resource, using FastMCP.
# pip install "mcp[cli]"
from mcp.server.fastmcp import FastMCP
from pathlib import Path
mcp = FastMCP("notes")
NOTES = Path("notes"); NOTES.mkdir(exist_ok=True)
@mcp.tool()
def add_note(title: str, body: str) -> str:
"""Save a note under a title."""
(NOTES / f"{title}.md").write_text(body)
return f"Saved {title}"
@mcp.resource("notes://{title}")
def read_note(title: str) -> str:
"""Read a note by title."""
return (NOTES / f"{title}.md").read_text()
if __name__ == "__main__":
mcp.run() # stdio by defaultWrite an MCP server for something you use daily, test it with the MCP Inspector, then connect it to a desktop client.
Common mistakes
- Tools with vague names and descriptions.
- Printing to stdout in a stdio server (it corrupts the protocol).
- No auth on a remote server.