Live survey304 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

MCP server · Org-owned · Audited from source

python-sdk MCP server

by modelcontextprotocol/python-sdkMIT licenceAudited 12 Nov 2026 · source 0572ef92d1c7

PyPI mcp-typesssestdiostreamable-http★ 24,838
!CAUTIONGrade C · 72/100 · 12 Nov 2026 · 0572ef9
24,838GitHub stars

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

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
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

Trust score72/100!CAUTION C
0 critical0 high3 medium30 low0 info

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

LayerWhat we checkResult
L0 ProvenanceRepo owner, licence, archive status, activityPASS 3 findings
L1 Static sourceSecrets, path traversal, supply chainWARN 21 findings
L2 InstructionsPrompt injection and authority framing in docs and tool descriptionsPASS
L3 InventoryDeclared tools match the sourceWARN 1 finding
L4 SandboxRun in isolation and watch behaviourSKIPPED

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 PyPImcp-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
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
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
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMFilesystem / pathmcp.destructive_tools
F-05 Filesystem / pathCWE-22 · CWE-59Layer L3
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
F-13 Inventory / provenanceCWE-1104Layer L0
test.db
Why
a compiled or binary member cannot be reviewed from source
Fix
ship source, or explain the binary in the README
LOWInventory / provenanceinv.hidden_file · .git-blame-ignore-revs
F-13 Inventory / provenanceCWE-1104Layer L0
.git-blame-ignore-revs
Why
hidden member outside the usual dotfiles
Fix
review its purpose
LOWInventory / provenanceinv.hidden_file · .pre-commit-config.yaml
F-13 Inventory / provenanceCWE-1104Layer L0
.pre-commit-config.yaml
Why
hidden member outside the usual dotfiles
Fix
review its purpose
LOWCode injectioncode.dynamic_import · examples/snippets/servers/__init__.py:33
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
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
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
importlib.import_module(_module_name(path))
Why
No further detail recorded for this rule.
Fix
—
LOWCode injectioncode.dynamic_import · tests/examples/conftest.py:109
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
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
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
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
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
cd "$SCRIPT_DIR/../../.." || exit 1
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · .github/actions/conformance/run-server.sh:8
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
cd "$SCRIPT_DIR/../../.."
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · tests/server/mcpserver/resources/test_resource_template.py:50
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
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
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
("a/b/../../c", False),
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · tests/shared/test_path_security.py:32
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
("../../etc/passwd", True),
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.beacon_words · examples/snippets/clients/oauth_client.py:50
F-04 Network egressCWE-200 · CWE-319Layer L1
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
F-04 Network egressCWE-200 · CWE-319Layer L1
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
F-04 Network egressCWE-200 · CWE-319Layer L1
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
F-04 Network egressCWE-200 · CWE-319Layer L1
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
F-04 Network egressCWE-200 · CWE-319Layer L1
"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
F-04 Network egressCWE-200 · CWE-319Layer L1
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
F-04 Network egressCWE-200 · CWE-319Layer L1
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
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
raw = bytes.fromhex(body)
Why
No further detail recorded for this rule.
Fix
—
LOWObfuscation / stealthobf.decode_call · docs_src/resources/tutorial003.py:23
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
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
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
return base64.b64decode(TEST_IMAGE_BASE64)
Why
No further detail recorded for this rule.
Fix
—

Tools it exposes

266 declared in source · 5 destructive

228 read33 write5 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.

ToolRiskWhat it does
delete_filedestructive# ensure path is in test_dir
delete_folderdestructiveDelete a folder, asking for confirmation when it is not empty.
remove_alldestructiveRemove every note after a confirmed form-mode elicitation (handshake-era only).
remove_notedestructiveRemove one sticky note and unregister its resource.
resetdestructiveReset the calculator.
addwriteAdd two numbers.
add_bookwriteAdd a book to the catalog.
add_notewriteSave a note.
create_thumbnailwriteCreate a thumbnail from an image
deploywriteresponses = ctx.input_responses
edit_notewriteReplace a note
enable_recommendationswriteSwitch on the recommendation tool.
enable_reportswritemcp.add_tool(sprint_report)
enable_searchwriteRegister the `search` tool at runtime and tell subscribers the list changed.
holdwriteSignal start, wait for the test, signal completion.
import_catalogwriteImport book records from a list of catalog URLs.
import_feedwriteImport every record a catalog feed yields.
long_running_taskwriteExecute a task with progress updates.
noopwriteSend a stray complete.
order_bookwriteHold a copy of a book while the customer pays for it.
parkwritestarted[tag].set()
pay_depositwriteTake the deposit that confirms a booking.
provisionwriteProvision a database. Asks which region to put it in.
restockwritePut copies of a book back on the shelf.
runwritereturn shouted.username
run_childwriteproc = subprocess.run([sys.executable,
run_child_barewriteproc = subprocess.run([sys.executable,
run_noisy_childwriteproc = subprocess.run([sys.executable,
save_templatewriteSave an instruction as a prompt the user can pick from the menu.
_toolreadtry:
abilitiesreadReport capabilities.
actreadreturn f
advanced_toolreadReturn CallToolResult directly for full control including _meta field.
announcereadEmit one info-level log carrying the caller
askreadresponses = ctx.input_responses
ask_modelreadA tool still built on server-initiated sampling.
ask_namereadresult = await ctx.elicit(message=
ask_userreadresult = await ctx.elicit(message=f
async_toolreadawait context.report_progress(50, 100)
audit_logreadReturn every method the middleware has observed so far.
authorizereadLink an account.
badreadreturn
blurbreadDraft a blurb for a book.
book_flightreadanswer = await ctx.elicit(
book_tablereadBook a table at the bistro.
boomreadraise RuntimeError(
brand_guidelinesreadThe brand guidelines as a Markdown document.
burstreadawait ctx.info(
buyreadBuy an item.
calcreadreturn
calculatereadCalculate something
capitalreadassert isinstance(answer.content, TextContent)
catalog_folderreadPick the folder the catalog export should go to.
chainreadreturn str(c.ok)
chartreadreturn [
chatterreadawait ctx.debug(
check_contextreadReturn the contextvar value visible to the handler.
check_lifespanreadTool that checks lifespan context.
check_stockreadCount the copies of a book in one region
check_url_responsereadresult = await ctx.session.elicit_url(
chimereadThe notification chime as a WAV.
client_featuresreadWhich optional features the connected client declared.
complete_taskreadBOARDS[board][task] = True
confirmreadAsk for confirmation.
confirm_depositreadRecord a payment reported by the payment provider.
connect_servicereadConnect to a third-party service requiring OAuth authorization.
countreadEmit n log notifications related to this call, plus one unrelated resource update.
count_booksreadCount the books in a genre.
count_rootsreadresponses = ctx.input_responses
countdownreadEmit one progress + one log notification per step; observes cancellation.
crunchreadawait ctx.report_progress(1, 3)
database_statusreadReport whether the database connection is up.
declaredreadReport the extension identifiers the client advertised.
defaults_toolreadresult = await ctx.elicit(message=
demo_toolreadA demo tool with an icon.
describe_catalogreadDescribe how the catalog is organised.
directreadreturn CallToolResult(content=[TextContent(type=
dividereadDivide a by b. Division by zero is an execution error the LLM should see.
domain_inforeadGet domain-specific information
doomedreadA tool removed at runtime; never called.
echoreadEcho the input text with structure and metadata
echo_contextreadEchoes request context
echo_headersreadEchoes request headers
echo_toolreadEcho the input text
echo_unicoderead🔤 Echo Unicode text - Hello 👋 World 🌍 - Testing 🧪 Unicode ✨
empty_result_toolreadFor empty results, return CallToolResult with empty content.
explodereadraise ValueError(
failing_toolreadraise ValueError(
fan_outreadechoes: dict[str, str] = {}
fastreadA fast tool
find_bookreadFind one book by ISBN, or by title and author.
fluxreadraise ToolError(
forecastreadreturn f
gatedreadraise MCPError(code=INVALID_PARAMS, message=
generate_poemreadGenerate a poem using LLM sampling.
get_authorreadLook up the author of a book in the catalog.
get_configreadThis returns unstructured output - no schema generated
get_forecastreadDaily forecast for a city.
get_locationreadGet location coordinates
get_personreadGet person data
get_scoresreadGet scores
get_stationreadLook up a weather station by name.
get_statisticsreadGet various statistics
get_temperaturereadCurrent temperature in a city, in whole degrees Celsius.
get_temperaturesreadCurrent temperature for each city, in degrees Celsius.
get_timereadGet the current server time.
get_userreadGet user profile - returns structured data
get_weatherreadCurrent weather for a city.
get_weather_alertsreadGet active weather alerts for a region
get_weather_metricsreadGet weather metrics for multiple cities
get_weather_statsreadGet weather statistics for the past N days
get_weather_summaryreadGet a brief weather summary for a city
greetreadGreet someone by name.
greet_dataclassread`who` arrives as a PersonDC instance (pydantic coerces the wire dict).
greet_dictread`who` is a free-form object — any dict passes; the handler must check it.
greet_pydanticread`who` arrives as a validated PersonModel instance.
greet_typeddictread`who` arrives as a plain dict; TypedDict drives the schema and editor hints.
growreadmcp.add_tool(extra, name=
helloreadSay hello to someone.
hello_unicodereadA simple tool that demonstrates Unicode handling in:
innerreadraise raised
interruptreadEmit, close this call
invalid_optional_toolreadtry:
issuereadIssue a voucher.
issue_cardreadIssue a new library card.
json_schema_2020_12_toolreadTests JSON Schema 2020-12 keyword preservation in tools/list (inputSchema installed below).
km_to_milesreadConvert kilometres to miles.
link_accountread# elicitation_id must be unique per elicitation, not per provider — scope it to this request.
list_citiesreadGet a list of cities
list_emoji_categoriesreadReturns a list of emoji categories with emoji examples.
list_notesreadList every note in the notebook.
listyreadraise NotImplementedError # pragma: no cover
logoreadThe brand logo as a PNG.
logo_from_bytesreadThe brand logo as a PNG.
long_operationreadEmit progress, close this call
lookupread# Interim 3-hop path; shortens to `ctx.state.db` in a later release.
lookup_bookreadLook up a book by its exact title.
manualreadraise NotImplementedError # pragma: no cover - only registration is exercised
meetreadSignal arrival as `tag`, block until every tag in `party` has also arrived, then return.
millreadawait ctx.report_progress(1, 3)
mismatchedreadreturn CallToolResult(content=[TextContent(text=
missingreadreturn CallToolResult(content=[TextContent(text=
multiread# Round number is the integer the server stashed in `request_state` last leg.
multi_authreadraise UrlElicitationRequiredError(
multilingual_helloreadReturns hello in different scripts and writing systems.
my_toolread# Log messages to the client
name_shrimpreadList all shrimp names in the tank
narratereadawait ctx.debug(
needs_inputreadif ctx.input_responses:
needs_samplingreadraise MCPError(
oauth_flowreadresult = await ctx.session.elicit_url(
old_logreadA tool still built on protocol logging.
onboardreadOnboard the user.
optional_toolreadresult = await ctx.elicit(message=
outerreadif ctx.input_responses is None:
palettereadThe brand colour palette as hex codes.
parsereadRow.model_validate({
payment_flowreadresult = await ctx.session.elicit_url(
pickreadresult = await ctx.elicit(message=
pingreadreturn
ping_backreadPing the client.
placereadassert isinstance(point, Point)
plainreadreturn
plan_restockreadreturn str(restock.needed)
primesreadreturn [2, 3, 5]
probereadseen.append(ctx.client_capabilities)
process_datareadProcess data with logging.
profilereadCollect a profile.
query_dbreadTool that uses initialized resources.
quotereadreturn f
read_filesreadraise UrlElicitationRequiredError(
read_profilereaddeps = Deps(openai=AsyncOpenAI(), pool=await get_db_pool())
rebuild_indexreadTake search offline and rebuild its index, one book at a time.
recommend_bookreadRecommend a book in the given genre.
redeemreadExchange a receipt token for the goods.
refundreadRefund an amount, once a human has confirmed it.
refusereadraise ToolError(
refusedreadNever called: the decoration itself is what raises.
register_userreadanswer = await ctx.elicit(
release_lockreadA tool that releases the lock
rememberreaddeps = Deps(openai=AsyncOpenAI(), pool=await get_db_pool())
reportreadreturn document
request_api_keyreadresult = await ctx.session.elicit_url(
reservereadReserve copies of a book, asking the user how many.
reserve_bookreadReserve a copy of a book.
restrictedreadA tool that always rejects the caller at the protocol level.
searchreadSearch the library catalog.
search_booksreadSearch the catalog by title or author.
secure_paymentreadProcess a secure payment requiring URL confirmation.
select_color_legacyreadresult = await ctx.elicit(message=
select_favorite_colorreadresult = await ctx.elicit(message=
select_favorite_colorsreadresult = await ctx.elicit(message=
setup_credentialsreadresult = await elicit_url(
show_configreadcontents = list(await ctx.read_resource(
show_rootsreadresult = await ctx.session.list_roots() # pyright: ignore[reportDeprecated]
signupreadRegister the user.
sleepreadcall_order.append(
slowreadA slow tool
sneakyreadreturn InputRequiredResult(input_requests={}, request_state=
spendreadraise QuotaExceeded(
200 of 266 tools listed; the bar and the counts include all of them.

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

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

  1. !CAUTION C 72 / 100

    First audit · 0572ef92d1c7

README badge

For maintainers · updates on every re-audit

ModelsAtlas: CAUTION CMODELSATLASCAUTION · C
[![ModelsAtlas: CAUTION C](https://modelsatlas.com/mcp/modelcontextprotocol/python-sdk/badge.svg)](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?
The official Python SDK for Model Context Protocol servers and clients
What tools does python-sdk expose?
200 in total: 228 read-only, 33 that write, and 5 that can delete or overwrite (delete_file, delete_folder, remove_all, remove_note, reset). Every one is listed on this page with its risk.
Is python-sdk safe to connect to an agent?
With care. The audit graded it C (72/100) and found 25 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 5 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does python-sdk need?
It reads LLM_API_KEY and OAUTH_DEMO_AUTO_CONSENT from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does python-sdk run?
It speaks sse, stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as mcp-types.
How current is this page?
The grade is for one exact copy of the source (0572ef92d1c7), read on 2026-11-12. The repository is watched and re-audited when it changes.

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.