How do I use my MCP server in Claude Code?

Day 6, 20 minutes · beginner

Goal of this lessonAdd Romy's unchanged MCP server to Claude Code with one command and use its tool, its resource and its prompt in a session.

Why it matters

The promise of MCP is "build once, use everywhere". Yesterday Romy's server ran in Claude Desktop. Today you plug the very same file into a second host, Claude Code, without changing one line of the server. If that works, you have seen the point of the protocol for yourself.

Claude Code also shows all three building blocks in a clear way: tools are called by Claude, resources appear when you type @, and prompts turn into slash commands. At the end Romy's server runs in Claude Code with one command, you have used a tool, a resource and a prompt there, and you know where to go next if you want MCP inside your own Claude API code.

The words you need today

  • Claude Code: Anthropic's coding assistant for the terminal, also available in the desktop app and code editors. It is an MCP host, just like Claude Desktop.
  • claude mcp add: the command that registers a server with Claude Code. You run it in your terminal, not inside a Claude Code session.
  • Scope: where Claude Code saves a server, and so who sees it. The default is local.
  • /mcp: the command inside a Claude Code session that shows your servers and their status.

One command instead of a config file

For a local stdio server, the Claude Code docs give this shape: claude mcp add <name> -- <command> [args...]. The double dash matters. Everything after it is the command that starts the server, passed on untouched, so Claude Code does not mistake the server's own options for its own. For Romy's server that is the same uv --directory ... run quillfeather.py command as in Claude Desktop.

The command prints a confirmation and the file it changed. Then claude mcp list or claude mcp get quillfeather shows the status. ✔ Connected means Claude Code started the server and it answered.

Scopes in one table

From the Claude Code quickstart for MCP:

Scope Where it is saved Who sees it
local (default) ~/.claude.json, under this project Only you, only this project
project .mcp.json in the project root Everyone who clones the project
user ~/.claude.json, top-level mcpServers Only you, all your projects

For a test server, keep the default. Add --scope user only when you want it in every project. Be careful with project: that file is meant to be shared in version control, and Romy's server path only works on your computer.

All three building blocks in Claude Code

  • Tools: ask a question in plain words. The tool call in Claude's output is labelled with the server name, which is how you know the answer came from your server. The first time, Claude Code may ask for permission: approve it.
  • Resources: type @ in your prompt. Resources from connected servers show up next to files. The docs give the format @server:protocol://resource/path, which for Romy is @quillfeather:quillfeather://opening-hours.
  • Prompts: type /. Claude Code lists MCP prompts as commands, and typing /mcp__quillfeather__customer_reply also runs Romy's prompt. Arguments go after it, separated by spaces. Claude Code splits them on spaces, so each argument must be one word. That is why lesson 4 asked for one-word topics such as opening-hours.

Where to go next: MCP from the Claude API

Hosts are one way to use MCP. The other is your own code. The Claude API has an MCP connector that lets the Messages API connect to an MCP server for you, with an mcp_servers list and an mcp_toolset entry in tools. Two limits from its docs page matter for Romy: the connector is a beta feature, and it only connects to servers that are reachable on the internet over HTTP. A local stdio server like Romy's cannot be connected directly, and only tool calls are supported, not resources or prompts. So the connector is the next step once a server runs remotely.

The steps

  1. Open a terminal in your quillfeather folder.
  2. Add the server with claude mcp add and the uv command.
  3. Check the status with claude mcp list.
  4. Use the tool, the resource and the prompt in a Claude Code session.
  5. Remove the server when you are done, or keep it.

Follow the steps below.

Today's actions

Ticks are not saved without an account

Do it in Claude API

Claude API

  1. Open a terminal in your quillfeather folder. Do not start a Claude Code session yet: claude mcp add runs in the normal terminal.
  2. Add the server. Replace the path with the absolute path of your quillfeather folder. Everything after -- is the command Claude Code runs to start the server.
    claude mcp add quillfeather -- uv --directory /ABSOLUTE/PATH/TO/quillfeather run quillfeather.py
  3. Check the status with claude mcp list or claude mcp get quillfeather. You should see ✔ Connected. The output of get also shows the scope: Local config.
  4. Start a session with claude and ask: Use the quillfeather server to check whether Jane Eyre is in stock. Approve the tool call if asked. The call is labelled with the server name.
  5. Type @ and pick the opening hours, or type @quillfeather:quillfeather://opening-hours, and ask: Are we open on Saturday afternoon?
  6. Type / to see the commands, then run Romy's prompt with two one-word arguments: /mcp__quillfeather__customer_reply Hugo opening-hours. Inside the session, /mcp shows the server and its status.
  7. When you are done, remove the server with claude mcp remove quillfeather, or keep it for lesson 7. Write your comparison with Claude Desktop in mcp-notes.txt.

Note: Use the same path style as in Claude Desktop: on Windows C:/Users/you/quillfeather with forward slashes works in the command. If the status is Failed to connect, run the command after -- by hand to see the error.

Paid planNeeds a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account.

Checked on 4 December 2026 · Source: Claude Code docs: Connect to MCP servers (opens in a new tab)

Create a free account to save your progress. Sign in or sign up