MCP server · Org-owned · Audited from source
python-sdk MCP server
by modelcontextprotocol/python-sdkMIT licenceAudited 12 Nov 2026 · source 0572ef92d1c7
Is it safe? With care — CAUTION, grade C (72/100). It exposes 266 tools: 228 read, 33 write and 5 destructive. The audit recorded 33 findings (0 critical, 0 high, 3 medium, 30 low). Maintainer's description: The official Python SDK for Model Context Protocol servers and clients
Cite
Cite this page
ModelsAtlas. “python-sdk MCP server (modelcontextprotocol/python-sdk)”. Retrieved 12 Nov 2026. https://modelsatlas.com/mcp/modelcontextprotocol/python-sdk
Trust audit
Audit 0.4.1 · full source read 12 Nov 2026
33 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.
What the source does
- FilesystemDeclared1 observation
- NetworkDeclared2 observations
- ShellDeclared2 observations
- DependenciesNot pinnedSome ranges float
- SecretsFoundSee the findings
“Declared” means the server says it does this and the source agrees. Browser, file and shell access are expected of some kinds of server.
Five audit layers
| Layer | What we check | Result |
|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS 3 findings |
L1 Static source | Secrets, path traversal, supply chain | WARN 21 findings |
L2 Instructions | Prompt injection and authority framing in docs and tool descriptions | PASS |
L3 Inventory | Declared tools match the source | WARN 1 finding |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED |
Provenance & runtime
Who published it, and what the audit could and could not run
Provenance
- Repository owner
modelcontextprotocolOrganizationAccount type recorded when we read the repository. - PackagePublished on PyPI
mcp-types, no version recorded - LicenceMITFrom the repository, as read at the audited commit.
- Last push6 days agoActivity of the repository when we read it.
- Source commit read0572ef92d1c7The audit covers exactly this commit, read on 12 Nov 2026.
Runtime
- Sandbox runNot run yetThis audit read the source only; it did not execute the server.
- Tool inventory266 declaredRead from the source and classed read, write or destructive.
Every value here is read from the record's own repository and audit.Suggest a correction
Findings (33)
Sorted by severity · the 25 most severe of 33 are listed
MEDIUMCode injectioncode.dynamic_import · src/mcp/cli/cli.py:184
server_module = importlib.import_module(module_name)
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMHard-coded secretssecret.db_uri · examples/mcpserver/memory.py:41
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMFilesystem / pathmcp.destructive_tools
delete_file, delete_folder, remove_all, remove_note, reset
- Why
- 5 tool(s) can delete or overwrite
- Fix
- prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenanceinv.binary · examples/clients/simple-chatbot/mcp_simple_chatbot/test.db
test.db
- Why
- a compiled or binary member cannot be reviewed from source
- Fix
- ship source, or explain the binary in the README
LOWCode injectioncode.dynamic_import · examples/snippets/servers/__init__.py:33
module = importlib.import_module(f".{server_name}", package=__name__)- Why
- No further detail recorded for this rule.
- Fix
- —
LOWCode injectioncode.dynamic_import · tests/docs_src/test_shape.py:112
importlib.import_module(_module_name(path))
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWCode injectioncode.dynamic_import · tests/examples/conftest.py:109
return importlib.import_module(f"stories.{leg.story}.{leg.server_variant}")- Why
- No further detail recorded for this rule.
- Fix
- —
LOWCode injectioncode.dynamic_import · tests/examples/conftest.py:114
return importlib.import_module(f"stories.{leg.story}.client")- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · .github/actions/conformance/run-client.sh:15
cd "$SCRIPT_DIR/../../.." || exit 1
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · .github/actions/conformance/run-server.sh:8
cd "$SCRIPT_DIR/../../.."
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · tests/server/mcpserver/resources/test_resource_template.py:50
t.matches("file://docs/../../etc/passwd")- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · tests/shared/test_path_security.py:28
("a/b/../../c", False),- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · tests/shared/test_path_security.py:32
("../../etc/passwd", True),- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.beacon_words · examples/snippets/clients/oauth_client.py:50
callback_url = input("Paste callback URL: ")- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.beacon_words · examples/snippets/clients/oauth_client.py:51
params = parse_qs(urlparse(callback_url).query)
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · docs/run/asgi.md:21
The MCP endpoint is at `/mcp`, so a client connects to `http://127.0.0.1:8000/mcp`.
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · docs/run/authorization.md:45
Authorization lives in HTTP headers, so it exists only on the HTTP transports. Run it on the one you deploy: `mcp.run(transport="streamable-http")` puts it on `http://127.0.0.1:8000/mcp`, and **[Runni
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · docs/run/authorization.md:60
"resource": "http://127.0.0.1:8000/mcp",
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · docs/run/authorization.md:75
WWW-Authenticate: Bearer error="invalid_token", error_description="Authentication required", resource_metadata="http://127.0.0.1:8000/.well-known/oauth-protected-resource/mcp"
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · docs/run/index.md:62
That one line builds a Starlette app and serves it with uvicorn. Clients connect to `http://127.0.0.1:3001/mcp`.
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWObfuscation / stealthobf.decode_call · docs_src/mrtr/tutorial005.py:30
raw = bytes.fromhex(body)
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWObfuscation / stealthobf.decode_call · docs_src/resources/tutorial003.py:23
return base64.b64decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")- Why
- No further detail recorded for this rule.
- Fix
- —
LOWObfuscation / stealthobf.decode_call · examples/servers/everything-server/mcp_everything_server/server.py:660
return base64.b64decode(TEST_IMAGE_BASE64)
- Why
- No further detail recorded for this rule.
- Fix
- —
Tools it exposes
266 declared in source · 5 destructive
5 tools can delete or overwrite. An agent that can be talked into calling a tool can be talked into calling this one, so give it a token scoped to what you need.
| Tool | Risk | What it does |
|---|---|---|
delete_file | destructive | # ensure path is in test_dir |
delete_folder | destructive | Delete a folder, asking for confirmation when it is not empty. |
remove_all | destructive | Remove every note after a confirmed form-mode elicitation (handshake-era only). |
remove_note | destructive | Remove one sticky note and unregister its resource. |
reset | destructive | Reset the calculator. |
add | write | Add two numbers. |
add_book | write | Add a book to the catalog. |
add_note | write | Save a note. |
create_thumbnail | write | Create a thumbnail from an image |
deploy | write | responses = ctx.input_responses |
edit_note | write | Replace a note |
enable_recommendations | write | Switch on the recommendation tool. |
enable_reports | write | mcp.add_tool(sprint_report) |
enable_search | write | Register the `search` tool at runtime and tell subscribers the list changed. |
hold | write | Signal start, wait for the test, signal completion. |
import_catalog | write | Import book records from a list of catalog URLs. |
import_feed | write | Import every record a catalog feed yields. |
long_running_task | write | Execute a task with progress updates. |
noop | write | Send a stray complete. |
order_book | write | Hold a copy of a book while the customer pays for it. |
park | write | started[tag].set() |
pay_deposit | write | Take the deposit that confirms a booking. |
provision | write | Provision a database. Asks which region to put it in. |
restock | write | Put copies of a book back on the shelf. |
run | write | return shouted.username |
run_child | write | proc = subprocess.run([sys.executable, |
run_child_bare | write | proc = subprocess.run([sys.executable, |
run_noisy_child | write | proc = subprocess.run([sys.executable, |
save_template | write | Save an instruction as a prompt the user can pick from the menu. |
_tool | read | try: |
abilities | read | Report capabilities. |
act | read | return f |
advanced_tool | read | Return CallToolResult directly for full control including _meta field. |
announce | read | Emit one info-level log carrying the caller |
ask | read | responses = ctx.input_responses |
ask_model | read | A tool still built on server-initiated sampling. |
ask_name | read | result = await ctx.elicit(message= |
ask_user | read | result = await ctx.elicit(message=f |
async_tool | read | await context.report_progress(50, 100) |
audit_log | read | Return every method the middleware has observed so far. |
authorize | read | Link an account. |
bad | read | return |
blurb | read | Draft a blurb for a book. |
book_flight | read | answer = await ctx.elicit( |
book_table | read | Book a table at the bistro. |
boom | read | raise RuntimeError( |
brand_guidelines | read | The brand guidelines as a Markdown document. |
burst | read | await ctx.info( |
buy | read | Buy an item. |
calc | read | return |
calculate | read | Calculate something |
capital | read | assert isinstance(answer.content, TextContent) |
catalog_folder | read | Pick the folder the catalog export should go to. |
chain | read | return str(c.ok) |
chart | read | return [ |
chatter | read | await ctx.debug( |
check_context | read | Return the contextvar value visible to the handler. |
check_lifespan | read | Tool that checks lifespan context. |
check_stock | read | Count the copies of a book in one region |
check_url_response | read | result = await ctx.session.elicit_url( |
chime | read | The notification chime as a WAV. |
client_features | read | Which optional features the connected client declared. |
complete_task | read | BOARDS[board][task] = True |
confirm | read | Ask for confirmation. |
confirm_deposit | read | Record a payment reported by the payment provider. |
connect_service | read | Connect to a third-party service requiring OAuth authorization. |
count | read | Emit n log notifications related to this call, plus one unrelated resource update. |
count_books | read | Count the books in a genre. |
count_roots | read | responses = ctx.input_responses |
countdown | read | Emit one progress + one log notification per step; observes cancellation. |
crunch | read | await ctx.report_progress(1, 3) |
database_status | read | Report whether the database connection is up. |
declared | read | Report the extension identifiers the client advertised. |
defaults_tool | read | result = await ctx.elicit(message= |
demo_tool | read | A demo tool with an icon. |
describe_catalog | read | Describe how the catalog is organised. |
direct | read | return CallToolResult(content=[TextContent(type= |
divide | read | Divide a by b. Division by zero is an execution error the LLM should see. |
domain_info | read | Get domain-specific information |
doomed | read | A tool removed at runtime; never called. |
echo | read | Echo the input text with structure and metadata |
echo_context | read | Echoes request context |
echo_headers | read | Echoes request headers |
echo_tool | read | Echo the input text |
echo_unicode | read | 🔤 Echo Unicode text - Hello 👋 World 🌍 - Testing 🧪 Unicode ✨ |
empty_result_tool | read | For empty results, return CallToolResult with empty content. |
explode | read | raise ValueError( |
failing_tool | read | raise ValueError( |
fan_out | read | echoes: dict[str, str] = {} |
fast | read | A fast tool |
find_book | read | Find one book by ISBN, or by title and author. |
flux | read | raise ToolError( |
forecast | read | return f |
gated | read | raise MCPError(code=INVALID_PARAMS, message= |
generate_poem | read | Generate a poem using LLM sampling. |
get_author | read | Look up the author of a book in the catalog. |
get_config | read | This returns unstructured output - no schema generated |
get_forecast | read | Daily forecast for a city. |
get_location | read | Get location coordinates |
get_person | read | Get person data |
get_scores | read | Get scores |
get_station | read | Look up a weather station by name. |
get_statistics | read | Get various statistics |
get_temperature | read | Current temperature in a city, in whole degrees Celsius. |
get_temperatures | read | Current temperature for each city, in degrees Celsius. |
get_time | read | Get the current server time. |
get_user | read | Get user profile - returns structured data |
get_weather | read | Current weather for a city. |
get_weather_alerts | read | Get active weather alerts for a region |
get_weather_metrics | read | Get weather metrics for multiple cities |
get_weather_stats | read | Get weather statistics for the past N days |
get_weather_summary | read | Get a brief weather summary for a city |
greet | read | Greet someone by name. |
greet_dataclass | read | `who` arrives as a PersonDC instance (pydantic coerces the wire dict). |
greet_dict | read | `who` is a free-form object — any dict passes; the handler must check it. |
greet_pydantic | read | `who` arrives as a validated PersonModel instance. |
greet_typeddict | read | `who` arrives as a plain dict; TypedDict drives the schema and editor hints. |
grow | read | mcp.add_tool(extra, name= |
hello | read | Say hello to someone. |
hello_unicode | read | A simple tool that demonstrates Unicode handling in: |
inner | read | raise raised |
interrupt | read | Emit, close this call |
invalid_optional_tool | read | try: |
issue | read | Issue a voucher. |
issue_card | read | Issue a new library card. |
json_schema_2020_12_tool | read | Tests JSON Schema 2020-12 keyword preservation in tools/list (inputSchema installed below). |
km_to_miles | read | Convert kilometres to miles. |
link_account | read | # elicitation_id must be unique per elicitation, not per provider — scope it to this request. |
list_cities | read | Get a list of cities |
list_emoji_categories | read | Returns a list of emoji categories with emoji examples. |
list_notes | read | List every note in the notebook. |
listy | read | raise NotImplementedError # pragma: no cover |
logo | read | The brand logo as a PNG. |
logo_from_bytes | read | The brand logo as a PNG. |
long_operation | read | Emit progress, close this call |
lookup | read | # Interim 3-hop path; shortens to `ctx.state.db` in a later release. |
lookup_book | read | Look up a book by its exact title. |
manual | read | raise NotImplementedError # pragma: no cover - only registration is exercised |
meet | read | Signal arrival as `tag`, block until every tag in `party` has also arrived, then return. |
mill | read | await ctx.report_progress(1, 3) |
mismatched | read | return CallToolResult(content=[TextContent(text= |
missing | read | return CallToolResult(content=[TextContent(text= |
multi | read | # Round number is the integer the server stashed in `request_state` last leg. |
multi_auth | read | raise UrlElicitationRequiredError( |
multilingual_hello | read | Returns hello in different scripts and writing systems. |
my_tool | read | # Log messages to the client |
name_shrimp | read | List all shrimp names in the tank |
narrate | read | await ctx.debug( |
needs_input | read | if ctx.input_responses: |
needs_sampling | read | raise MCPError( |
oauth_flow | read | result = await ctx.session.elicit_url( |
old_log | read | A tool still built on protocol logging. |
onboard | read | Onboard the user. |
optional_tool | read | result = await ctx.elicit(message= |
outer | read | if ctx.input_responses is None: |
palette | read | The brand colour palette as hex codes. |
parse | read | Row.model_validate({ |
payment_flow | read | result = await ctx.session.elicit_url( |
pick | read | result = await ctx.elicit(message= |
ping | read | return |
ping_back | read | Ping the client. |
place | read | assert isinstance(point, Point) |
plain | read | return |
plan_restock | read | return str(restock.needed) |
primes | read | return [2, 3, 5] |
probe | read | seen.append(ctx.client_capabilities) |
process_data | read | Process data with logging. |
profile | read | Collect a profile. |
query_db | read | Tool that uses initialized resources. |
quote | read | return f |
read_files | read | raise UrlElicitationRequiredError( |
read_profile | read | deps = Deps(openai=AsyncOpenAI(), pool=await get_db_pool()) |
rebuild_index | read | Take search offline and rebuild its index, one book at a time. |
recommend_book | read | Recommend a book in the given genre. |
redeem | read | Exchange a receipt token for the goods. |
refund | read | Refund an amount, once a human has confirmed it. |
refuse | read | raise ToolError( |
refused | read | Never called: the decoration itself is what raises. |
register_user | read | answer = await ctx.elicit( |
release_lock | read | A tool that releases the lock |
remember | read | deps = Deps(openai=AsyncOpenAI(), pool=await get_db_pool()) |
report | read | return document |
request_api_key | read | result = await ctx.session.elicit_url( |
reserve | read | Reserve copies of a book, asking the user how many. |
reserve_book | read | Reserve a copy of a book. |
restricted | read | A tool that always rejects the caller at the protocol level. |
search | read | Search the library catalog. |
search_books | read | Search the catalog by title or author. |
secure_payment | read | Process a secure payment requiring URL confirmation. |
select_color_legacy | read | result = await ctx.elicit(message= |
select_favorite_color | read | result = await ctx.elicit(message= |
select_favorite_colors | read | result = await ctx.elicit(message= |
setup_credentials | read | result = await elicit_url( |
show_config | read | contents = list(await ctx.read_resource( |
show_roots | read | result = await ctx.session.list_roots() # pyright: ignore[reportDeprecated] |
signup | read | Register the user. |
sleep | read | call_order.append( |
slow | read | A slow tool |
sneaky | read | return InputRequiredResult(input_requests={}, request_state= |
spend | read | raise QuotaExceeded( |
Install
audited commit 0572ef9
Read the findings first. The most severe is Code injection (medium) at src/mcp/cli/cli.py.
One-click links open your editor with the config below filled in, exactly as the snippets show it. The audit covers commit 0572ef9 only.
claude mcp add mcp-types --env LLM_API_KEY=${LLM_API_KEY} --env OAUTH_DEMO_AUTO_CONSENT=${OAUTH_DEMO_AUTO_CONSENT} -- uvx mcp-types{
"mcpServers": {
"mcp-types": {
"command": "uvx",
"args": [
"mcp-types"
],
"env": {
"LLM_API_KEY": "${LLM_API_KEY}",
"OAUTH_DEMO_AUTO_CONSENT": "${OAUTH_DEMO_AUTO_CONSENT}"
}
}
}
}The command does not pin a version; the audit covers commit 0572ef92d1c7. Transport: sse · stdio · streamable-http. Reads these environment variables: LLM_API_KEY, OAUTH_DEMO_AUTO_CONSENT. Give it the narrowest token it needs.
Audit history
- !CAUTION C 72 / 100
First audit ·
0572ef92d1c7
README badge
For maintainers · updates on every re-audit
[](https://modelsatlas.com/mcp/modelcontextprotocol/python-sdk/)
The badge always shows the latest audit; a maintainer cannot pin an old verdict.
Other ratings
Cited, never blended into our score
No third-party security ratings are recorded for this server yet. When they exist they appear here with their source and date, beside, not inside, our grade.
Questions about python-sdk MCP server
What is the python-sdk MCP server?
What tools does python-sdk expose?
Is python-sdk safe to connect to an agent?
What credentials does python-sdk need?
How does python-sdk run?
How current is this page?
Sources
- modelcontextprotocol/python-sdk on GitHub — the source we read, its licence, stars and activityObserved · 12 Nov 2026
- ModelsAtlas trust audit — CAUTION verdict for commit 0572ef92d1c7Observed · 12 Nov 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What is the python-sdk MCP server?
- What tools does python-sdk expose?
- Is python-sdk safe to connect to an agent?