Repository guide · getting started · v1
modelcontextprotocol / python-sdk · Getting started
A Python repository that its GitHub description calls the official Python SDK for Model Context Protocol servers and clients. It is MIT-licensed and the analyzer counts 1,726 files, including 287 test-like files. Manifests and __main__-guarded scripts can be read statically, but installation and run commands are not verified.
- Original repository
- modelcontextprotocol/python-sdk
- License
- MIT · open-source license
- Analyzed revision · last verified
- 77001c96f9507be0f4d009b83210a384a5e08bda ·
Getting started with modelcontextprotocol/python-sdk
Terms used on this page
- Entrypoint record
- A file the analyzer marks as a place where execution can start. When it carries a __main__ guard excerpt, the file contains an if __name__ == "__main__": block and the excerpt shows what that block calls; without an excerpt, the file was flagged by its name only.
- Bounded static execution path
- A call chain reconstructed from the source code without running it, stopped after a fixed number of steps. It shows how far the code can be followed on paper, not what happens at run time.
- Unresolved boundary
- Where a static path stops because the next call goes into an external library or cannot be resolved without running the code. It marks the edge of this analysis, not a defect in the repository.
- Static relations
- Calls and imports found in the source. "External or unresolved" relations point outside the analyzed files.
- Module role
- The analyzer's label for a file, inferred from how many calls go in and out (for example core, entry/orchestration, leaf). It describes a position in the call graph, not the authors' design.
- Test-like files
- Files whose names or locations look like tests. This analysis counts them; it does not run them.
- Observed · inferred · author-claimed · unresolved
- How each statement is supported: read directly from the analyzed files; derived by the analyzer from them; stated by the repository's authors (metadata, README); or not established by this analysis.
- Verified
- Two uses on these pages. In an analyzer record ("verified provenance", "a verified entrypoint") it means the record was read directly from the analyzed files, which these guides call observed; for an entrypoint, the __main__ guard text is present. Since the analyzer fix of 2026-10-04, a file that only has an entrypoint-like name such as cli.py or main.py is recorded as inferred; guides analyzed before that still call such a file verified, and it is still only a guess about how the file is used. It does not mean the code was run or tested. "Last verified" is the date the guide last passed the lab's checks against the analysis record of the stated revision; it is not a review of the repository itself.
What you are looking at
The GitHub description calls this the official Python SDK for Model Context Protocol servers and clients. That is the authors' own description; this analysis did not check it. The listed homepage points to a site on a modelcontextprotocol.io subdomain, which is also author-supplied.
- Topics: mcp, mcp-client, mcp-server, python.
- Primary language: Python, which accounts for almost all language bytes. Shell, JavaScript and HTML appear in small amounts.
- License: MIT, according to the GitHub API and the repository's LICENSE file.
- Latest release: v2.3.0, published 2026-10-02. GitHub reported 24,868 stargazers on 2026-11-15.
- Size: the analyzer's summary counts 1,726 analyzed files, 287 test-like files, 18 manifest files and 178 entrypoint records.
What it needs
The analyzer counts 18 parsed manifests: the root pyproject.toml, src/mcp-types/pyproject.toml, and sixteen under examples/ (fifteen pyproject.toml files and one requirements.txt).
- Root pyproject.toml: no runtime-scope record appears, only the optional packages rich, typer and python-dotenv. Whether it declares runtime dependencies that the analyzer did not record is not established.
- Root dev records include pyright, pytest, ruff, trio, pytest-xdist and coverage. They also include exactly pinned packages zensical, mkdocstrings and mkdocstrings-python, and unversioned mcp and mcp-example-stories.
- pillow and blockbuster each appear twice in the root dev scope, with different lower bounds, recorded as written.
- src/mcp-types/pyproject.toml lists pydantic twice (>=2.14.0 and >=2.12.0) and typing-extensions >=4.13.0 as runtime dependencies.
- examples/servers/simple-tool/pyproject.toml, one of the example manifests, lists mcp without a version, plus anyio >=4.5, click >=8.2.0 and a name recorded as httpx2 >=2.5.0.
Lock files, setup.py, setup.cfg and Pipfile are not parsed.
How it starts
The analyzer counts 178 entrypoint records. Twenty of them are available to this analysis, and all twenty carry a __main__ guard.
- .github/actions/conformance/client.py: the guard calls
main(). - scripts/gen_surface_types.py passes the result of
main()tosys.exit. scripts/update_readme_snippets.py callsmain(). - The other 17 files sit under docs_src/ (client, extensions, apps, caching, pagination, first_steps, legacy_clients, protocol_versions). Each of their guards calls
anyio.run(main).
A teaching claim names src/mcp/cli/cli.py as a detected starting point. Its entrypoint record is not listed, so how it starts is not established.
The analyzer reports 658 bounded execution paths; 5 are listed, all from the conformance client. Each stops at an unresolved boundary after one or two steps: logging.basicConfig, logging.getLogger, os.environ.get, or len and print reached through the local main.
Runtime behaviour beyond these records is not established.
Where to look first
The analyzer marks README.md, pyproject.toml and LICENSE as project-level important files. It also flags .github/actions/conformance/client.py and several docs_src tutorial files as important because they are likely entrypoints.
Its learning-path claim suggests starting with manifests and important symbols, then tracing the bounded execution path and inspecting unresolved boundaries before changing code. Its modify-guide claim points to src/mcp/cli/cli.py as the place to begin, with downstream effects checked by hand.
Top-level directories by file count: i18n (664), examples (298), tests (285), docs_src (218), src (140), docs (58), .github (27), root (18), scripts (12), schema (4), .claude (2).
Tests exist. The analyzer counts 287 test-like files, and the tests/ directory holds 285 files.
What this analysis cannot tell you
- Installation, build and run commands are not verified, so none are given.
- Dependency records come only from requirements files, package.json and pyproject.toml. setup.py, setup.cfg, Pipfile and lock files are not parsed, and version constraints are recorded as written.
- README text is extracted line by line and remains author-claimed at best.
- The analysis is static. Reflection, dynamic imports, runtime dependency injection, generated code and framework wiring are not resolved.
- Files over 400 kB, minified bundles and vendored directories are inventoried but not parsed.
The packet contains two internal inconsistencies:
- One teaching claim says no bounded execution path is available, while the analyzer reports 658 paths and lists five.
- A teaching claim names src/mcp/cli/cli.py as the starting point, while the analyzer's summary names .github/actions/conformance/client.py.
What this analysis could not establish
The writing model's own notes on the analysis record. Identifiers such as lim_3, exec_* or claim_… name records of that analysis; the claims table cites the same records.
- Only 20 of 178 entrypoint records and 5 of 658 bounded execution paths are available; statements about entrypoints are scoped to those records.
- The entrypoint record for src/mcp/cli/cli.py is not listed, so whether it has a __main__ guard or was detected by filename heuristic is not established.
- No runtime-scope dependency record exists for the root pyproject.toml; whether runtime dependencies are declared in an unrecorded form is not established.
- The dependency name httpx2 is recorded as written in several example manifests; whether it is the intended distribution name is not established.
- A uv.lock file appears in the manifest inventory, but lock files are not parsed, so its contents are not reflected in dependency records.
- The 287 test-like files and the 285 files in tests/ are separate counts; how they overlap is not established.
Claims and evidence — 37 claims, 37 supported by an independent verifier
Every substantive statement above is a claim bound to grounding IDs of the analyzed revision. Global grounding IDs are namespaced by the analysis run.
| Claim | Epistemic status | Verifier | Grounding (global IDs) |
|---|---|---|---|
| c1 The repository's GitHub description presents it as the official Python SDK for Model Context Protocol servers and clients. | author_claimed | supported | analysis_f7d9a9f9559ef565:meta_description |
| c2 The platform-listed homepage points to a site on a modelcontextprotocol.io subdomain. | author_claimed | supported | analysis_f7d9a9f9559ef565:meta_homepage |
| c3 The repository topics are mcp, mcp-client, mcp-server and python. | observed | supported | analysis_f7d9a9f9559ef565:meta_topics |
| c4 The primary language is Python, which accounts for almost all language bytes; Shell, JavaScript and HTML appear in small amounts. | observed | supported | analysis_f7d9a9f9559ef565:meta_primary_language, analysis_f7d9a9f9559ef565:meta_language_bytes |
| c5 The license is MIT according to the GitHub API and the repository file, and LICENSE is a project-level important file. | observed | supported | analysis_f7d9a9f9559ef565:meta_license, analysis_f7d9a9f9559ef565:important_3 |
| c6 The latest release is v2.3.0, published 2026-10-02; GitHub reported 24,868 stargazers on 2026-11-15. | observed | supported | analysis_f7d9a9f9559ef565:meta_latest_release, analysis_f7d9a9f9559ef565:meta_stars |
| c7 The analyzer's summary counts 1,726 analyzed files, 287 test-like files, 18 manifest files and 178 entrypoint records. | inferred | supported | analysis_f7d9a9f9559ef565:summary_repository, analysis_f7d9a9f9559ef565:claim_f35a48536d91 |
| c8 Eighteen manifests were parsed: the root pyproject.toml, src/mcp-types/pyproject.toml, and sixteen under examples/, fifteen pyproject.toml files and one requirements.txt. | inferred | supported | analysis_f7d9a9f9559ef565:summary_repository, analysis_f7d9a9f9559ef565:dep_99, analysis_f7d9a9f9559ef565:dep_130, analysis_f7d9a9f9559ef565:dep_6, analysis_f7d9a9f9559ef565:dep_2, analysis_f7d9a9f9559ef565:dep_11, analysis_f7d9a9f9559ef565:dep_17, analysis_f7d9a9f9559ef565:dep_21, analysis_f7d9a9f9559ef565:dep_25, analysis_f7d9a9f9559ef565:dep_34, analysis_f7d9a9f9559ef565:dep_45, analysis_f7d9a9f9559ef565:dep_52, analysis_f7d9a9f9559ef565:dep_59, analysis_f7d9a9f9559ef565:dep_66, analysis_f7d9a9f9559ef565:dep_75, analysis_f7d9a9f9559ef565:dep_84, analysis_f7d9a9f9559ef565:dep_91, analysis_f7d9a9f9559ef565:dep_97, analysis_f7d9a9f9559ef565:dep_98 |
| c9 The root pyproject.toml has optional-scope records for rich >=13.9.4, typer >=0.16.0 and python-dotenv >=1.0.0, and no runtime-scope record among the listed dependency records. | observed | supported | analysis_f7d9a9f9559ef565:dep_99, analysis_f7d9a9f9559ef565:dep_100, analysis_f7d9a9f9559ef565:dep_101, analysis_f7d9a9f9559ef565:important_2 |
| c10 The root pyproject.toml dev scope includes pyright >=1.1.400, pytest >=8.4.0, ruff >=0.8.5, trio >=0.26.2, pytest-xdist >=3.6.1 and coverage >=7.10.7,<=7.13. | observed | supported | analysis_f7d9a9f9559ef565:dep_105, analysis_f7d9a9f9559ef565:dep_106, analysis_f7d9a9f9559ef565:dep_107, analysis_f7d9a9f9559ef565:dep_108, analysis_f7d9a9f9559ef565:dep_110, analysis_f7d9a9f9559ef565:dep_115 |
| c11 The root dev scope also lists zensical ==0.0.50, mkdocstrings ==1.0.4, mkdocstrings-python ==2.0.5, and mcp and mcp-example-stories without versions. | observed | supported | analysis_f7d9a9f9559ef565:dep_123, analysis_f7d9a9f9559ef565:dep_124, analysis_f7d9a9f9559ef565:dep_125, analysis_f7d9a9f9559ef565:dep_102, analysis_f7d9a9f9559ef565:dep_103 |
| c12 pillow appears twice in the root dev scope (>=12.3 and >=12.0), as does blockbuster (>=1.5.29 and >=1.5.27); constraints are recorded as written. | observed | supported | analysis_f7d9a9f9559ef565:dep_116, analysis_f7d9a9f9559ef565:dep_117, analysis_f7d9a9f9559ef565:dep_121, analysis_f7d9a9f9559ef565:dep_122, analysis_f7d9a9f9559ef565:lim_3a |
| c13 src/mcp-types/pyproject.toml lists pydantic twice (>=2.14.0 and >=2.12.0) and typing-extensions >=4.13.0 as runtime dependencies. | observed | supported | analysis_f7d9a9f9559ef565:dep_130, analysis_f7d9a9f9559ef565:dep_131, analysis_f7d9a9f9559ef565:dep_132 |
| c14 examples/servers/simple-tool/pyproject.toml lists runtime dependencies mcp without a version, anyio >=4.5, click >=8.2.0 and a name recorded as httpx2 >=2.5.0. | observed | supported | analysis_f7d9a9f9559ef565:dep_84, analysis_f7d9a9f9559ef565:dep_81, analysis_f7d9a9f9559ef565:dep_82, analysis_f7d9a9f9559ef565:dep_83 |
| c15 Whether the root pyproject.toml declares runtime dependencies in a form the analyzer did not record is not established by the packet. | unresolved | supported | analysis_f7d9a9f9559ef565:dep_99, analysis_f7d9a9f9559ef565:dep_100, analysis_f7d9a9f9559ef565:dep_101, analysis_f7d9a9f9559ef565:lim_3a |
| c16 Lock files, setup.py, setup.cfg and Pipfile are not parsed for dependency records. | observed | supported | analysis_f7d9a9f9559ef565:lim_3a |
| c17 The analyzer counts 178 entrypoint records; the 20 available records each contain a Python __main__ guard. | inferred | supported | analysis_f7d9a9f9559ef565:claim_f35a48536d91, analysis_f7d9a9f9559ef565:py_entry_7ed4238a8b5b, analysis_f7d9a9f9559ef565:py_entry_6211bb69c81e, analysis_f7d9a9f9559ef565:py_entry_34629f3fb6b3, analysis_f7d9a9f9559ef565:py_entry_5d442081d210, analysis_f7d9a9f9559ef565:py_entry_fb08908da90c, analysis_f7d9a9f9559ef565:py_entry_2f2371a70335, analysis_f7d9a9f9559ef565:py_entry_5e69a082cd28, analysis_f7d9a9f9559ef565:py_entry_e6563cc9ae9c, analysis_f7d9a9f9559ef565:py_entry_d86f6ca7aa9d, analysis_f7d9a9f9559ef565:py_entry_fa6382bc744e, analysis_f7d9a9f9559ef565:py_entry_88464f30ad02, analysis_f7d9a9f9559ef565:py_entry_49eb33872d36, analysis_f7d9a9f9559ef565:py_entry_4e3973bc283a, analysis_f7d9a9f9559ef565:py_entry_b7441e2ca64b, analysis_f7d9a9f9559ef565:py_entry_39b5fd30e9a3, analysis_f7d9a9f9559ef565:py_entry_8f622205bd2f, analysis_f7d9a9f9559ef565:py_entry_11225e9c9110, analysis_f7d9a9f9559ef565:py_entry_5e73d47c3e6d, analysis_f7d9a9f9559ef565:py_entry_10190532b8cf, analysis_f7d9a9f9559ef565:py_entry_8d4ba4b8f2e4 |
| c18 The __main__ guard in .github/actions/conformance/client.py calls main(). | observed | supported | analysis_f7d9a9f9559ef565:py_entry_7ed4238a8b5b |
| c19 The guard in scripts/gen_surface_types.py passes main()'s result to sys.exit; the guard in scripts/update_readme_snippets.py calls main(). | observed | supported | analysis_f7d9a9f9559ef565:py_entry_6211bb69c81e, analysis_f7d9a9f9559ef565:py_entry_34629f3fb6b3 |
| c20 The other 17 listed guarded files are under docs_src/ and each guard calls anyio.run(main). | observed | supported | analysis_f7d9a9f9559ef565:py_entry_5d442081d210, analysis_f7d9a9f9559ef565:py_entry_fb08908da90c, analysis_f7d9a9f9559ef565:py_entry_2f2371a70335, analysis_f7d9a9f9559ef565:py_entry_5e69a082cd28, analysis_f7d9a9f9559ef565:py_entry_e6563cc9ae9c, analysis_f7d9a9f9559ef565:py_entry_d86f6ca7aa9d, analysis_f7d9a9f9559ef565:py_entry_fa6382bc744e, analysis_f7d9a9f9559ef565:py_entry_88464f30ad02, analysis_f7d9a9f9559ef565:py_entry_49eb33872d36, analysis_f7d9a9f9559ef565:py_entry_4e3973bc283a, analysis_f7d9a9f9559ef565:py_entry_b7441e2ca64b, analysis_f7d9a9f9559ef565:py_entry_39b5fd30e9a3, analysis_f7d9a9f9559ef565:py_entry_8f622205bd2f, analysis_f7d9a9f9559ef565:py_entry_11225e9c9110, analysis_f7d9a9f9559ef565:py_entry_5e73d47c3e6d, analysis_f7d9a9f9559ef565:py_entry_10190532b8cf, analysis_f7d9a9f9559ef565:py_entry_8d4ba4b8f2e4 |
| c21 A teaching claim names src/mcp/cli/cli.py as a detected starting point, but its entrypoint record is not listed, so how it starts is not established. | unresolved | supported | analysis_f7d9a9f9559ef565:claim_8229d87e32b7 |
| c22 The analyzer reports 658 bounded execution paths; 5 are listed, all starting at .github/actions/conformance/client.py. | inferred | supported | analysis_f7d9a9f9559ef565:claim_f35a48536d91, analysis_f7d9a9f9559ef565:exec_5e86e34bd295, analysis_f7d9a9f9559ef565:exec_e6323d56ad9b, analysis_f7d9a9f9559ef565:exec_7bf8b1b02bf8, analysis_f7d9a9f9559ef565:exec_fad222196619, analysis_f7d9a9f9559ef565:exec_f72d6b612163 |
| c23 The five listed paths stop at unresolved boundaries after one or two steps: logging.basicConfig, logging.getLogger, os.environ.get, or len and print reached via the local main. | inferred | supported | analysis_f7d9a9f9559ef565:exec_5e86e34bd295, analysis_f7d9a9f9559ef565:exec_e6323d56ad9b, analysis_f7d9a9f9559ef565:exec_7bf8b1b02bf8, analysis_f7d9a9f9559ef565:exec_fad222196619, analysis_f7d9a9f9559ef565:exec_f72d6b612163 |
| c24 Runtime behaviour beyond these static records is not established, because the analysis is static only and run inference is partial. | observed | supported | analysis_f7d9a9f9559ef565:lim_1, analysis_f7d9a9f9559ef565:lim_2 |
| c25 README.md, pyproject.toml and LICENSE are classified as project-level important files. | observed | supported | analysis_f7d9a9f9559ef565:important_1, analysis_f7d9a9f9559ef565:important_2, analysis_f7d9a9f9559ef565:important_3 |
| c26 .github/actions/conformance/client.py and docs_src tutorial files are flagged as important because they are likely entrypoints. | observed | supported | analysis_f7d9a9f9559ef565:important_4, analysis_f7d9a9f9559ef565:important_5, analysis_f7d9a9f9559ef565:important_6, analysis_f7d9a9f9559ef565:important_7, analysis_f7d9a9f9559ef565:important_8 |
| c27 The analyzer's learning-path claim suggests starting with manifests and important symbols, then tracing the bounded execution path and inspecting unresolved boundaries before changing code. | inferred | supported | analysis_f7d9a9f9559ef565:claim_e56db45165bf |
| c28 The analyzer's modify-guide claim says to begin at src/mcp/cli/cli.py and verify downstream effects manually. | inferred | supported | analysis_f7d9a9f9559ef565:claim_00634b33603f |
| c29 Top-level directory file counts are i18n 664, examples 298, tests 285, docs_src 218, src 140, docs 58, .github 27, root 18, scripts 12, schema 4, .claude 2. | inferred | supported | analysis_f7d9a9f9559ef565:summary_repository |
| c30 Tests exist: the analyzer counts 287 test-like files, and the tests directory holds 285 files. | inferred | supported | analysis_f7d9a9f9559ef565:summary_repository |
| c31 Install, run and build inference is partial and installation commands are not verified. | observed | supported | analysis_f7d9a9f9559ef565:lim_2 |
| c32 Dependency records come from requirements files, package.json and pyproject.toml; setup.py, setup.cfg, Pipfile and lock files are not parsed, and constraints are recorded as written. | observed | supported | analysis_f7d9a9f9559ef565:lim_3a |
| c33 README claim extraction is line-based and every README claim remains author_claimed at best. | observed | supported | analysis_f7d9a9f9559ef565:lim_4a |
| c34 The analysis is static only; reflection, dynamic imports, runtime dependency injection, generated code and framework wiring are not resolved. | observed | supported | analysis_f7d9a9f9559ef565:lim_1 |
| c35 Files over 400 kB, minified bundles and vendored directories are inventoried but not parsed. | observed | supported | analysis_f7d9a9f9559ef565:lim_6 |
| c36 One teaching claim says no bounded execution path is available, while the analyzer reports 658 paths and lists five, which is a packet-internal inconsistency. | inferred | supported | analysis_f7d9a9f9559ef565:claim_4d30ade3e21e, analysis_f7d9a9f9559ef565:claim_f35a48536d91, analysis_f7d9a9f9559ef565:exec_5e86e34bd295 |
| c37 A teaching claim names src/mcp/cli/cli.py as the starting point, while the analyzer's summary names .github/actions/conformance/client.py. | inferred | supported | analysis_f7d9a9f9559ef565:claim_8229d87e32b7, analysis_f7d9a9f9559ef565:summary_repository |
Sources, rights and disclosure · attribution-license-templates/v0.1
Rights notice. Original repository hosted on GitHub. Repository source code, documentation, names, media, and related project materials remain subject to the rights of their respective authors, contributors, and other rights holders and to applicable repository license terms.
Platform notice. GitHub is the source hosting platform for the linked repository. GitHub and related marks are trademarks of GitHub, Inc. EVEMISS Technology is not affiliated with or endorsed by GitHub unless explicitly stated otherwise.
How this page is produced. This page was produced using revision-aware repository analysis and AI-assisted editorial tooling. Technical claims are tied to the analyzed repository revision and may be revalidated when the source repository changes.
AI-assisted analysis. Reviewed by EVEMISS Technology through human–AI collaborative review. · Report a rights concern · Back to the overview