If you want Claude to actually do things in your world—like save notes to your disk, query your production DB, or search your Slack—you need to build an MCP server. This tutorial takes you from a blank directory to a working Note-Taking MCP server in exactly 15 minutes using TypeScript and the Model Context Protocol. We’ll skip the theory and jump straight into the code, showing you how to expose a save_note tool that Claude can call natively in its terminal or desktop app. It’s the fastest way to turn Claude from a chatbot into a real tool-user.
What is the simplest MCP server I can build today?
The simplest server is one that runs locally and exposes a single tool. In this case, we’re building a “Notes” server that lets Claude write and read JSON files on your hard drive. It’s the “Hello World” of MCP, but it’s the foundation for every complex integration you’ll ever build.
The Scenario: You’re tired of copy-pasting Claude’s advice into your notes app. You want to be able to say “Claude, save that thought as a note,” and have it actually appear in your local files without you lifting a finger.
How do I scaffold a new MCP project in TypeScript?
You start with a basic npm init and install the official MCP SDK. You also need TypeScript and a way to run your code directly, like tsx. Most devs overcomplicate the setup; you just need three dependencies and a simple tsconfig.json to get moving.
The Scenario: You’re ready to start, but you spend twenty minutes trying to remember the right
moduleResolutionsetting for TypeScript. You just want to write the code, not fight with your configuration files.
How do I define the tools Claude will be able to use?
You create a new Server instance and define your tools using the ListToolsRequestSchema. Each tool needs a name, a description, and an inputSchema that tells Claude what arguments it needs to provide. This is the “contract” between the AI and your code.
The Scenario: You’re writing the description for your
save_notetool. You realize that if your description is vague, Claude might try to send an entire book as a “title.” You spend a minute making the description crystal clear so the AI doesn’t break your API.
How do I actually run my new slash command?
Wait, MCP doesn’t use slash commands like Skills do—it’s even more fluid. Once the server is running, Claude sees your tools in its “toolbox” and chooses to call them whenever they’re relevant to the conversation. You don’t even have to tell it to use the tool; it just does.
The Scenario: You ask Claude to “remember that I like my coffee black.” Instead of just saying “Okay,” Claude says “I’ve saved that note for you.” You check your local folder and the file is there. It feels like magic.
How do I get my new tools into the Claude Desktop app?
You need to edit your Claude Desktop config file and point it to your server’s location. This is where most people get tripped up—you have to use absolute paths, or the app won’t be able to find your code. Once you restart the app, your tools appear in the interface.
The Scenario: You’ve written the perfect server, but it’s not showing up in the app. You realize you used
~/projectinstead of the full path. You fix the config, restart Claude, and suddenly the “tools” icon lights up. Success.
How do I use my MCP server with the Claude CLI?
For Claude Code, you add the server to your mcp.json file. Now, every time you start a terminal session, your custom tools are available. You can be refactoring code and say “save this as a note for the docs,” and it happens right in your terminal.
The Scenario: You’re deep in a terminal session and you find a clever workaround for a bug. You don’t want to forget it. You tell the CLI to “save a note about the webpack fix,” and it’s stored locally while you keep working.
How does the MCP communication loop actually work?
The server and Claude talk over stdio (stdin and stdout) using JSON-RPC. Claude sends a “call_tool” request, your server runs the TypeScript code, and then it sends back a “result” message. It’s a simple, robust loop that doesn’t require any complex networking or API keys.
The Scenario: You’re debugging your server and you see a bunch of JSON scrolling through your terminal. You realize that’s just the AI and your code having a conversation. You’ve essentially built a translator for a robot.
How do I scale this to a production-ready server?
For a server that multiple people can use, you switch from stdio to an HTTP transport using Server-Sent Events (SSE). This allows you to host your MCP server in the cloud and connect it to any Claude instance anywhere in the world.
The Scenario: Your team loves your “Notes” tool and wants to use it too. You realize you can’t just share your local path anymore. You spend an hour moving the code to a simple Express server so everyone can connect via a URL.
Summary
- SDK is Simple: Use the official package to handle the protocol logic.
- Absolute Paths: Always use full paths in your config files.
- Descriptions Matter: Be very specific so Claude knows when to call your tool.
FAQ
Can I build MCP servers in Python? Yes, there is an official Python SDK that works almost exactly like the TypeScript one.
Do I need an API key to run a local MCP server? No, local servers talk via stdin/stdout and don’t require any cloud authentication.
What to Read Next: