VOOZH about

URL: https://deepwiki.com/ppl-ai/modelcontextprotocol/10-dependencies-and-security

⇱ Dependencies and Security | ppl-ai/modelcontextprotocol | DeepWiki


Loading...
Last indexed: 28 February 2026 (95c7a8)
Menu

Dependencies and Security

This page provides an overview of the dependency model and security posture for @perplexity-ai/mcp-server. It covers:

  • The five runtime dependencies and their roles in the codebase
  • The @modelcontextprotocol/sdk's own transitive dependency tree
  • Development-only tooling
  • Security-relevant design decisions across the server and its CI/CD pipelines

For package metadata, npm scripts, and the bin entry point, see Package Metadata and Scripts. For detailed dependency documentation, see Core Dependencies. For a full security discussion, see Security Architecture. For development toolchain details, see Development Tooling.


Runtime Dependencies

The server declares five direct runtime dependencies in package.json51-57

PackageVersion ConstraintResolvedRole
@modelcontextprotocol/sdk^1.21.11.27.1MCP protocol; McpServer, transports
express^4.21.24.22.1HTTP server for HTTP mode
cors^2.8.52.8.5CORS middleware for HTTP mode
undici^6.20.06.23.0Outbound HTTP client to Perplexity API
zod^3.25.463.25.76Runtime schema validation of API responses

Minimum Node.js version: >=18 (package.json68-70).

Note: express appears both as a direct dependency (^4.21.2, used in src/http.ts) and as a transitive dependency of @modelcontextprotocol/sdk at a different major version (^5.2.1). npm resolves these independently as two separate installations.

Sources: package.json51-57 package-lock.json6-34


Dependency-to-Source-File Map

Diagram: Runtime packages mapped to the source modules that import them


Sources: package.json51-57 package-lock.json577-616


SDK Transitive Dependencies

@modelcontextprotocol/sdk pulls in a substantial dependency tree. The notable sub-systems are listed below.

SDK Transitive DepVersionPurpose within SDK
hono^4.11.4Web framework used in SDK's HTTP transport
@hono/node-server^1.19.9Node.js adapter for Hono
ajv + ajv-formats^8.17.1 / ^3.0.1JSON Schema validation of MCP messages
eventsource + eventsource-parser^3.0.2 / ^3.0.0SSE client used for streaming MCP connections
express^5.2.1HTTP framework within SDK (separate from app's express@4)
express-rate-limit^8.2.1Rate-limiting on SDK's HTTP endpoints
jose^6.1.3JWT/JWK operations for OAuth token verification
pkce-challenge^5.0.0PKCE code challenge generation for OAuth flows
zod + zod-to-json-schema^3.25 || ^4.0Schema definition and JSON Schema export
cross-spawn^7.0.5Cross-platform subprocess spawning (stdio transport)
content-type^1.0.5HTTP Content-Type header parsing
raw-body^3.0.0Raw HTTP body reading
json-schema-typed^8.0.2Type-safe JSON Schema definitions

Diagram: SDK internal sub-system structure


Sources: package-lock.json577-616


Development Dependencies

Development tooling is never included in published packages. The files field in package.json30-36 explicitly limits what gets published to dist/*.js (excluding test and config files), README.md, and .claude-plugin.

PackageVersionRole
typescript^5.9.3TypeScript compiler (tsc)
tsx^4.19.4Zero-build TypeScript runner for dev scripts
vitest^4.0.5Test runner
@vitest/coverage-v8^4.0.5V8-based code coverage
shx^0.4.0Cross-platform shell commands (chmod +x)
@types/cors^2.8.17TypeScript types for cors
@types/express^5.0.0TypeScript types for express
@types/node^20TypeScript types for Node.js builtins

Sources: package.json58-67


Security Overview

The following table summarizes the security-relevant design decisions. Detailed discussion is in Security Architecture.

ConcernMechanismLocation
API key protectionChecked at startup; never logged; passed only as Authorization: Bearer headersrc/index.ts, src/server.ts
CORS enforcementcors() middleware with ALLOWED_ORIGINS allowlistsrc/http.ts
npm publish authOIDC id-token permission; no static token stored.github/workflows/publish.yml
MCP registry authDNS + private key; MCP_REGISTRY_PRIVATE_KEY secret extracted to temp file, then deleted.github/workflows/publish-mcp.yml
OAuth/PKCE readinessjose and pkce-challenge available via SDK for token-based client authentication@modelcontextprotocol/sdk transitive deps
Outbound request isolationundici ProxyAgent proxied through optional HTTPS proxysrc/server.ts, src/logger.ts
Log level defaultPERPLEXITY_LOG_LEVEL defaults to ERROR; debug output never reaches stdoutsrc/logger.ts

Diagram: Security-sensitive data flows


Sources: package.json22-36 package-lock.json577-616


Node.js Engine Requirement

The package declares "node": ">=18" in package.json68-70 This constraint is shared by most of the dependency tree. Key minimum-version drivers include:

  • undici 6.x requires Node.js >=18.17
  • @hono/node-server requires Node.js >=18.14.1
  • vitest 4.x requires Node.js ^20.0.0 || ^22.0.0 || >=24.0.0

In CI, Node.js 20 is used (.github/workflows/test.yml .github/workflows/publish.yml). See Automated Testing Workflow for details.

Sources: package.json68-70 package-lock.json537-548 package-lock.json3722-3730