MCP TypeScript SDKCAUTION
The official TypeScript SDK for Model Context Protocol servers and clients
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[!IMPORTANT] This is the `main` branch: v2 of the SDK (@modelcontextprotocol/server,@modelcontextprotocol/client), the stable release line, implementing the 2026-07-28 MCP spec. Start with the v2 documentation; coming from v1, see the migration guide. v1.x (@modelcontextprotocol/sdk) lives on the `v1.x` branch and continues to receive bug fixes and security updates for at least six months after the v2 release (2026-07-27). Its documentation is at ts.sdk.modelcontextprotocol.io. Found a problem in v2? Open an issue.
[!NOTE] Contributors without write access can have one open pull request at a time. Draft pull requests don't count toward the limit. For a feature or a larger change, please open an issue first; see CONTRIBUTING.md.
[](https://www.npmjs.com/package/@modelcontextprotocol/server) [](https://www.npmjs.com/package/@modelcontextprotocol/client)
Table of Contents
- Overview
- Packages
- Installation
- Getting Started
- Documentation
- [Contributing
11bdd94413daOBSERVED · 2026-10-12Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add test-integration --env ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} --env ANTHROPIC_AUTH_TOKEN=${ANTHROPIC_AUTH_TOKEN} --env API_KEY=${API_KEY} --env GEMINI_API_KEY=${GEMINI_API_KEY} -- npx -y @modelcontextprotocol/[email protected]{
"mcpServers": {
"test-integration": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/[email protected]"
],
"env": {
"ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
"ANTHROPIC_AUTH_TOKEN": "${ANTHROPIC_AUTH_TOKEN}",
"API_KEY": "${API_KEY}",
"GEMINI_API_KEY": "${GEMINI_API_KEY}"
}
}
}
}Exposed tools (173)
145 read · 20 write · 8 destructive. Blast radius: 8 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
a | read | |
add-note | write | |
add-resource | write | |
add_note | write | |
add_resource | write | |
add_task | write | |
add_tasks | write | |
alpha | read | Template-level description. |
always-protocol-error | read | |
annotated | read | Carries every optional listing field. |
apply-discount | write | |
archive-note | read | |
arr | read | |
arr-loose | read | |
ask | read | |
b | read | |
bad | read | |
bare | read | |
blob | read | A 1×1 PNG. |
brainstorm_tasks | read | |
broken | read | |
c | read | |
calc | read | |
calculate-bmi | read | |
chatty | read | |
clear-catalog | destructive | |
clear_done | destructive | |
collect-feedback | read | |
collect-user-info | read | |
complete_task | read | |
complex-tool | read | A tool with complex schema |
complex-transform | read | |
confirm-deploy | write | |
confirm_payment | read | |
connect-calendar | read | |
contact | read | |
countdown | read | |
delete-dataset | destructive | |
delete-note | destructive | |
deploy | write | |
dynamic-probe | read | |
echo | read | |
emit-all | read | |
env-report | read | |
export-orders | read | |
export-report | read | |
farewell | read | |
fetch-data | read | |
fetch-source | read | |
flip_tools | read | |
forecast | read | |
forecast-corrupted | read | Forecast whose payload violates its own output schema. |
gamma | read | Per-resource override. |
get-alerts | read | |
get-forecast | read | |
get-protocol-info | read | |
get-weather | read | |
get_forecast | read | Returns tomorrow’s weather forecast for a city. |
get_recipe | read | Returns the preparation steps for a named dish. |
get_weather | read | Get weather for a location |
greet | read | |
greet-arktype | read | |
greet-valibot | read | |
greet-zod | read | |
hungry | read | |
iconic | read | |
increment | read | |
initial-tool | read | |
inner | read | |
insatiable | read | |
json-schema | read | raw 2020-12 schema |
legacy-style | read | |
lib.rs | read | Library exports |
link-account | read | |
link-card | read | |
link_account | read | |
linked.txt | read | A linked (not embedded) resource |
list-files | read | |
list-forecasts | read | |
list-jobs | read | |
list-roots | read | |
list-trips | read | |
list_tasks | read | |
locate | read | |
long-operation | read | |
lookup-order | write | |
lookup_order | write | Look up an order by id |
main.rs | read | Primary application entry point |
mcp__todos__add_task | write | Add a task |
measure | read | |
multi-greet | read | |
mutable | read | |
noop | read | |
objects | read | |
open-url | read | |
operate | read | |
order-total | write | |
out | read | |
outer | read | |
phased | read | |
ping | read | |
pipe-test | read | |
place-order | write | |
plain | read | |
plan | read | |
plan_trip | read | |
post-connect-tool | write | |
preprocess-test | read | |
prioritize | read | |
probe-tool | read | |
process | read | |
process-files | read | |
product-card | read | |
product-details | read | |
protected | read | |
provision | read | |
public | read | |
purge-notes | destructive | |
quiet | read | |
read-count | read | |
read-note | read | |
read-probe-header | read | |
read-repository | read | |
register_user | read | |
remove_all | destructive | |
remove_note | destructive | |
request-count | read | |
request_count | read | |
route | read | |
run-diagnostics | write | |
run-report | write | |
sample | read | |
scan-archive | read | |
scoped | read | |
search | read | |
search-notes | read | |
seed | read | |
shed | read | |
shout | read | |
signal-only-tool | read | |
signin | read | |
signup | read | |
start-notification-stream | write | |
strict-tool | read | A tool with strict schema |
structured-tool | read | A tool with structured output |
summarize | read | |
summarize-order | write | |
t | read | |
tag-release | read | |
test | read | |
test-rollback | read | Tests that rollback cleans up all side effects |
test-tool | read | |
test-with-failing-transform | read | Real transforms plus a failing transform for testing error recovery |
text | read | A plain-text resource. |
toggle-probe | read | |
tool | read | |
tool-1 | read | |
tool-2 | read | |
transform-test | read | |
two-rounds | read | |
two-step | read | |
union-test | read | |
uppercase | read | |
user | read | |
v1-to-v2 | read | Migrate from @modelcontextprotocol/sdk (v1) to v2 packages (@modelcontextprotocol/client, /server, etc.) |
validate-records | read | |
wait | read | |
weather | read | Get weather |
whoami | read | |
wipe-cache | destructive | |
work_through_tasks | read | |
working | read | |
write-file | write |
Trust audit
CAUTIONgrade D · trust 61/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- none-observed
- Shell
- declared (2 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
const incoming = call('operate', { mode: 'write', secret: 'high-cardinality-value' });arguments: { mode: 'write', secret: 'high-cardinality-value' }const TOKEN = 'minimal-provider-bearer-token';
const TOKEN = 'provider-bearer-token';
const badPem = '-----BEGIN PRIVATE KEY-----\nnot-a-valid-key\n-----END PRIVATE KEY-----';
clear-catalog, clear_done, delete-dataset, delete-note, purge-notes, remove_all, remove_note, wipe-cache
.git-blame-ignore-revs
.prettierignore
.prettierrc.json
console.log(`Using resumption token: ${notificationsToolLastEventId || 'none'}`);console.log(`Updated resumption token: ${event}`);console.log(`[Auth] Password: ${DEMO_USER_CREDENTIALS.password}`);console.log(` Token: ${authServerUrl}api/auth/mcp/token`);moduleDirectories: ['node_modules', path.resolve(__dirname, '../../packages'), path.resolve(__dirname, '../../common')]
import '../../../.vitepress/theme/custom.css';
args: ['-y', 'tsx', siblingPath(import.meta.url, '../../todos-server/server.ts')]
group: ['**/packages/*', '../../packages/*', '../../../packages/*'],
group: ['@mcp-examples/*', '!@mcp-examples/shared', '../../*/**'],
const CALLBACK_URL = 'http://127.0.0.1:8090/callback';
if (resolved.href.startsWith(CALLBACK_URL)) {redirect_uris: [CALLBACK_URL],
const provider = new InMemoryOAuthClientProvider(CALLBACK_URL, clientMetadata, authUrl => {const CALLBACK_URL = `http://127.0.0.1:${CALLBACK_PORT}/callback`;pnpm --filter @mcp-examples/tools client -- --http http://127.0.0.1:3000/
curl -s -X POST http://127.0.0.1:3000/mcp \
Gates applied: no_behavioural_pass.
11bdd94413dafull audit observations/trust-audit/mcp-server/modelcontextprotocol__typescript-sdk.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | 11bdd94413da | CAUTION | D | 61 | first audit |
Questions
What is the @modelcontextprotocol/sdk MCP server?
The official TypeScript SDK for Model Context Protocol servers and clients
What tools does @modelcontextprotocol/sdk expose?
173 in total: 145 read-only, 20 that write, and 8 that can delete or overwrite (clear-catalog, clear_done, delete-dataset, delete-note, purge-notes). Every one is listed on this page with its risk.
Is @modelcontextprotocol/sdk safe to connect to an agent?
With care. The audit graded it D (61/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: 8 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does @modelcontextprotocol/sdk need?
It reads ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, API_KEY, GEMINI_API_KEY, MCP_AUTH_PORT, MCP_CONFORMANCE_AUTH_SERVER_URL, MCP_TOKEN, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_DEMO_AUTO_CONSENT, OAUTH_EXPECTED_ISSUER and OPENAI_API_KEY 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 @modelcontextprotocol/sdk run?
It speaks sse, stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @modelcontextprotocol/test-integration at 2.0.0.
How current is this page?
The grade is for one exact copy of the source (11bdd94413da), read on 2026-10-12. The repository is watched and re-audited when it changes.