{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "modelcontextprotocol-python-sdk--build-and-inspect-an-mcp-server",
 "repo": "modelcontextprotocol/python-sdk",
 "repo_url": "https://github.com/modelcontextprotocol/python-sdk",
 "repo_slug": "modelcontextprotocol-python-sdk",
 "title": "Build an MCP server and test it in the Inspector",
 "page_title": "How to build an MCP server and test it in the Inspector with Python SDK",
 "summary": "Write a two-function server with the official SDK and try its tools in the MCP Inspector.",
 "who": "A developer new to MCP who wants to see a server working before wiring it into an assistant.",
 "problem": "It is hard to know whether a new MCP server works until it is connected to a host.",
 "outcome": "A server.py with a tool and a templated resource, tested interactively in the MCP Inspector.",
 "steps": [
  "Install with `uv add \"mcp[cli]\"`",
  "Create server.py with an MCPServer, an add tool and a greeting resource, as in the README",
  "Open it in the Inspector with `uv run mcp dev server.py`",
  "Call add with a=1 and b=2 and check you get 3 back",
  "Continue with the Get started guide in the docs"
 ],
 "agent_prompt": "Using modelcontextprotocol/python-sdk, create a server.py that exposes <tools> and a resource for <data>. Open it with `uv run mcp dev server.py` and show me each tool working in the Inspector.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The SDK is on v2; code written for v1 needs the migration guide.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.11 or later",
  "uv or pip",
  "The cli extra for the mcp command-line tool",
  "Optional: the MCP Inspector, which mcp dev opens"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/modelcontextprotocol-python-sdk/build-and-inspect-an-mcp-server/",
 "md": "https://dedupedai.com/use-cases/modelcontextprotocol-python-sdk/build-and-inspect-an-mcp-server/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/modelcontextprotocol-python-sdk--build-and-inspect-an-mcp-server.json",
 "api_version": "v1"
}
