Skip to content

v0.3.7: review-driven hardening, pagination, test coverage, release automation#13

Merged
scttbnsn merged 10 commits into
mainfrom
dev/0.3.7
Jun 11, 2026
Merged

v0.3.7: review-driven hardening, pagination, test coverage, release automation#13
scttbnsn merged 10 commits into
mainfrom
dev/0.3.7

Conversation

@scttbnsn

Copy link
Copy Markdown
Collaborator

Summary

Full four-domain code review (security / performance / quality / testing) of the MCP server, with every actionable finding fixed, plus automated release infrastructure.

Security

  • Sanitize reflected MCP-Protocol-Version header in error responses
  • Strip Redis details from unauthenticated /auth/info
  • HSTS only when TLS is enabled; startup warning for wildcard CORS + no auth
  • SHA-256 hash API keys used as service-cache map keys
  • Health checks routed through BaseService (restores SSRF validation + error parsing)

Features

  • current_page/page_size on six previously unpaginated list tools; has_more surfaced on MCP-server lists
  • Schema-level cross-field validation for create_api_key + secret-exposure warning in its description

Performance

  • Compact JSON across ~157 tool response sites (~15-25% fewer response tokens)
  • Lazy redis import (cold-start weight)
  • Bounded internal prompt lookups in migrate/promote

Tests

  • 114 → 269 passing (140 added): 13 previously untested tool modules, Clerk auth mode, DELETE /mcp + SSE GET /mcp, abort/error-propagation paths, contract schemas + live fixtures for workspaces/users
  • Two real bugs found and fixed by the new tests (over-strict keys contract schema, list_all_users param crash)

Release automation

  • auto-tag.yml: tags vX.Y.Z automatically when a version bump lands on main and dispatches the Release workflow
  • publish-npm job: OIDC trusted publishing with provenance — no stored npm token (trusted publisher already configured on npmjs.com)
  • knip added to GitHub CI for parity with local npm run ci

Docs

  • CHANGELOG 0.3.7 (corrected several inaccurate draft entries), SECURITY.md, ENDPOINTS.md, audit follow-up
  • HTTP/Vercel transport repositioned as unhosted proof of concept; stdio is the supported path

Verification

  • Full npm run ci green on final HEAD (lint, knip, typecheck, 253 tests, build, 16 e2e, README tool inventory)
  • Live-verified against the Portkey API: read smoke suite (32/32 in-scope endpoints) + throwaway create→get→delete round-trip through the built stdio binary
  • Adversarial audit of the diff vs. the findings checklist; .env confirmed never committed

Merging this PR auto-cuts the v0.3.7 release (tag → CI → npm publish with provenance → GitHub Release → MCP Registry).

scttbnsn added 10 commits June 11, 2026 12:12
- 🐛 fix: stop reflecting unsanitized MCP-Protocol-Version header in error responses
- 🐛 fix: strip redis details from unauthenticated /auth/info
- 🐛 fix: warn at startup when CORS wildcard is combined with auth mode none
- 🐛 fix: only send HSTS when TLS is enabled
- 🔄 refactor: extract getMcpProtocolVersion helper and shared isRecord type guard
- 🔄 refactor: lazy-load redis client to cut serverless cold-start weight
…vice

- 🐛 fix: store SHA-256 digests instead of plaintext API keys in service-cache map keys
- 🐛 fix: route health checks through BaseService (restores SSRF validation + error parsing)
- 🔄 refactor: drop redundant shared HealthService cache
- 🔄 refactor: validate PORTKEY_BASE_URL once instead of per-subclass
- ✨ feat: pagination params on virtual-key/config/user/invite list services
- 🔄 refactor: cap internal prompt lookups with page_size in migrate/promote
- ✨ feat: current_page/page_size on virtual-key, config, user, invite, and MCP-server list tools
- ✨ feat: surface has_more on MCP-server capability/user-access lists
- 🐛 fix: schema-level validation for create_api_key workspace requirement
- 🐛 fix: integration config builder no longer drops empty-string values
- 📝 docs: warn that create_api_key secret lands in MCP transcripts
- 🔄 refactor: dedupe formatFullName and analytics schemas, drop dead guards and casts
- 📝 docs: explain SDK overload probing in tool registration internals
- 🔄 refactor: drop 2-space pretty-printing across ~157 tool response sites (~15-25% fewer response tokens)
- 🧪 test: unit coverage for 13 previously untested tool modules
- 🧪 test: clerk auth mode, DELETE /mcp and SSE GET /mcp branches
- 🧪 test: abort/timeout, upstream-error propagation, query-string and pagination edges
- 🧪 test: workspaces/users contract schemas and fixtures
- 🔧 config: guard smoke tests against CI, stale-build check for e2e
- 📝 docs: pagination params and response changes in README/ENDPOINTS
- 📝 docs: security posture updates and audit follow-up
- 📝 docs: changelog entry for review-driven changes
- 📝 docs: README marks HTTP transport as PoC with no hosted version
- 📝 docs: Vercel guide framed as self-deploy reference, hosting not a goal
- 🔧 config: bump version to 0.3.7 in package.json, lockfile, server.json
- 📝 docs(changelog): correct inaccurate 0.3.7 entries (HSTS direction, pagination tool list, integration empty-string fix) and date the release
- ✨ feat: auto-tag workflow tags vX.Y.Z when package.json version lands on main
- ✨ feat: publish-npm job via OIDC trusted publishing with provenance (no stored token)
- 🔧 config: registry publish now runs after npm publish, removing the wait
- 📝 docs: rewrite RELEASE.md for the automated flow + one-time npm setup
@scttbnsn scttbnsn merged commit a7276c8 into main Jun 11, 2026
1 check passed
@scttbnsn scttbnsn deleted the dev/0.3.7 branch June 11, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant