Search topics…
Tutorials
Explore
June 6 Offline Event →
Module 5 · Model Context Protocol

Module 5: Local Server Configs & Python SDK

Mount servers in Claude Desktop JSON configs. Build calculator and expense tracker MCP servers using FastMCP SDK.

⏱ 22 Min Read Author: GenAIWallah Team Updated: May 2026
Day 9

Claude Desktop Configuration

Why this matters

Desktop Config: Desktop config is how hosts discover and launch your server process.

On macOS, Claude Desktop reads ~/Library/Application Support/Claude/claude_desktop_config.json. Each entry under mcpServers defines how to spawn a server:

{
  "mcpServers": {
    "weather": {
      "command": "uv",
      "args": ["run", "weather-mcp-server"],
      "env": {
        "API_KEY": "your-key-here"
      }
    }
  }
}
  • command + args — executable and flags (often uv run).
  • env — secrets and config (never commit real keys).
  • Restart Claude after editing the config.

Common mistakes

  • Confusing host with server (the host runs the client; the server is a separate process).
  • Hard-coding API keys inside tool implementations instead of env vars.
  • Using SSE locally when stdio is simpler and more secure.

Interview checkpoints

  • Q: What is desktop config in MCP? A: One-sentence definition + when it runs in the lifecycle.
  • Q: One production pitfall? A: Name transport, auth, or schema mismatch.

Practice

  1. Basic: Sketch Desktop Config on a whiteboard.
  2. Intermediate: Find it in a real Claude Desktop or Cursor config.
  3. Advanced: Break it on purpose and document the error message.

Recap

  • You can explain desktop config clearly.
  • You know host vs client vs server roles.
  • You see how this connects to the next part.

Next: FastMCP SDK

Day 10

FastMCP Server SDK

Why this matters

FastMCP SDK: FastMCP removes boilerplate so you expose tools with decorators, not raw JSON-RPC handlers.

FastMCP is the high-level Python SDK: decorators register tools; the framework handles JSON-RPC plumbing.

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("Calculator")

@mcp.tool()
def add_values(x: float, y: float) -> float:
    """Adds two numbers."""
    return x + y

if __name__ == "__main__":
    mcp.run()

Type hints and docstrings become tool descriptions for the model. Run with mcp.run() using stdio transport by default.

Common mistakes

  • Confusing host with server (the host runs the client; the server is a separate process).
  • Hard-coding API keys inside tool implementations instead of env vars.
  • Using SSE locally when stdio is simpler and more secure.

Interview checkpoints

  • Q: What is fastmcp sdk in MCP? A: One-sentence definition + when it runs in the lifecycle.
  • Q: One production pitfall? A: Name transport, auth, or schema mismatch.

Practice

  1. Basic: Sketch FastMCP SDK on a whiteboard.
  2. Intermediate: Find it in a real Claude Desktop or Cursor config.
  3. Advanced: Break it on purpose and document the error message.

Recap

  • You can explain fastmcp sdk clearly.
  • You know host vs client vs server roles.
  • You see how this connects to the next part.

Next: SSE Proxies

← Module 4: Handshake Module 6: Remote MCP →