Security assurance
Maps the project's security requirements to its threat model, implementation controls, and public verification evidence.
Baseline assurance review: 2026-08-11. Input-budget and compatibility claims reviewed for 0.14.0: 2026-10-16.
This document maps the project's security requirements to its threat model,
implementation controls, and public verification evidence. It complements
SECURITY.md and the deployment guidance in
docs/VERCEL_DEPLOYMENT.md.
The SDK v2 implementation shipped in 0.15.0 retires HTTP session and replay storage. The 0.14.x implementation retains those controls. The evidence below is local testing, not deployed assurance; compatibility and recovery records remaining lifecycle/release prerequisites.
Security requirements and limits
Portkey Admin MCP is intended to:
- keep Portkey credentials out of MCP tool schemas, logs, cache keys, and client responses;
- authenticate hosted HTTP transports by default and require an explicit local development acknowledgement to run them without authentication;
- validate MCP tool input before constructing Portkey API requests;
- encode path segments and construct query parameters without string injection;
- bound request bodies, rate-limit clients, and bound concurrent requests; and
- publish npm and MCP Registry releases only after the tagged source passes the complete CI gate.
The server acts with the scopes of the configured Portkey API key. It cannot
reduce permissions that Portkey itself grants to that key. A client allowed to
invoke administrative write tools can change the corresponding Portkey tenant.
Operators must use least-privilege keys, restrict exposed tools with
PORTKEY_TOOL_DOMAINS, and protect the MCP transport.
Threat model and trust boundaries
Threat actors include an unauthenticated HTTP client, an authenticated but over-privileged MCP client, a caller supplying malicious tool arguments, hostile or malformed Portkey responses, a compromised Redis or hosting environment, and a contributor or dependency attempting to alter a release.
The principal trust boundaries are:
- MCP client to transport. Stdio inherits local process access. Hosted HTTP crosses an authentication, origin, rate-limit, and request-size boundary.
- Tool arguments to service request. Zod schemas and cross-field validation turn untrusted JSON into encoded paths, query parameters, and request bodies.
- Service to Portkey API. The configured key crosses to an external admin API. Responses are untrusted and may contain tenant data.
- HTTP process to Redis and Clerk. Hosted rate-limit and identity state cross external-service boundaries and require TLS and scoped credentials.
- Source to package and registry entry. Review, CI, a prebuilt tarball, OIDC publication, provenance, and catalog verification protect releases.
Claims and evidence
Fail-safe transport defaults and complete mediation
The HTTP server requires bearer or Clerk authentication by default. Deliberate
unauthenticated local testing requires MCP_ALLOW_UNAUTHENTICATED_HTTP=true.
Authentication, origin handling, request limits, rate limiting, and security
headers are applied by the shared HTTP application before MCP requests reach
tool handlers.
Evidence: src/lib/http-app.ts,
tests/http-server.test.ts,
tests/auth-clerk.test.ts, and the configuration in
README.md.
Input validation and credential handling
Registered tools use explicit schemas, descriptions, and annotations. Version 0.14.0 adds an SDK-enforced budget of 10,000 array elements and object members across nested tool input before schema validation, alongside the HTTP body-size limit. Cross-field rules are normalized into the same error envelope. Path segments are encoded, query parameters are constructed from validated values, and service errors are converted without exposing configured credentials. The in-process service cache stores a SHA-256 key digest rather than a plaintext API key.
Evidence: src/tools/, src/services/,
src/lib/,
tests/security-runtime.suite.ts, and
the tool-specific test suites under tests/.
Least privilege, hosted state, and secrets
Tool domains can be restricted at startup. Deployment guidance requires exact
origins, authenticated production transports, TLS Redis connections, separate
environment credentials and secrets stored outside the repository. The server
persists no MCP replay payloads. With bearer or Clerk authentication, MCP
requests are independent and authenticated every time; a retired session ID
grants no authority. The /health, /ready, / and /auth/info routes stay
unauthenticated. An interrupted mutation
can still complete upstream, so operators must inspect state before retrying.
Evidence: docs/VERCEL_DEPLOYMENT.md,
SECURITY.md, and configuration tests in
tests/config.test.ts.
Test, dependency, and release controls
CI applies Biome, unused-code analysis, production and test type checks, dependency review, unit and contract tests, build verification, MCP protocol tests, release-readiness checks, and tool-definition quality checks. The release workflow re-runs CI for the tag, builds a tarball without publication authority, and passes that exact artifact to an OIDC-enabled npm publish job with provenance. The MCP Registry publish also uses GitHub OIDC.
Evidence: .github/workflows/ci.yml,
.github/workflows/release.yml,
docs/RELEASE.md, and the public
release history.
Residual risk
A stolen Portkey key or authorized MCP identity can perform every operation its
scopes allow. Portkey API changes may create semantic drift before fixtures and
contracts detect it. Some enterprise-only endpoints cannot be live-recorded
with the available test account, as documented in ROADMAP.md.
Operators remain responsible for least-privilege scopes, transport access,
credential rotation, Redis and identity-provider security, and reviewing tool
domains before deployment.