Skip to content

v0.3.0

Latest

Choose a tag to compare

@dave8172 dave8172 released this 22 Oct 11:48
· 1 commit to main since this release

mcplytics now covers security as well as usage and health. It still only watches: it never changes or delays an answer.

mcplytics check <url> looks at your own server from outside, the way a stranger would, with about a dozen harmless requests, and prints what to fix. It never calls one of your tools. It covers:

  • HTTPS
  • sign-in: 401 with resource_metadata, protected-resource metadata, a made-up token refused
  • Origin validation (DNS rebinding)
  • unknown protocol versions answered with 400
  • stack traces in error answers
  • session IDs (random-looking, unknown ones refused)
  • the old HTTP+SSE transport
  • CORS with credentials
  • the tool definitions: invisible characters, text that reads like orders to the model, duplicate names, missing or misleading annotations, and tools an anonymous caller can reach that aren't marked read-only

It exits 1 when something needs fixing, so it can run in CI. --header signs in; headers are never printed.

Security signals. A new flags field carries short codes, never content: unknown_tool, foreign_origin, token_in_url, insufficient_scope, oversize, unparseable, hidden_text, tools_changed. A new toolsHash field fingerprints every tools/list answer. mcplytics report adds a Security signals section: each flag and the apps that raised it, sign-ins refused by app, and every version of your tool list with when it was live. Analytics Engine: blob11 flags, blob12 toolsHash.

More servers.

  • mcplyticsNode() is Express/Connect middleware for handlers that take Node's (req, res), such as the official SDK's StreamableHTTPServerTransport. Put it after express.json(). With the SDK's requireBearerAuth, the verified client is req.auth.clientId.
  • serve() runs a web-standard handler on plain node:http.
  • proxy(url) puts mcplytics in front of a server written in any language.

Tested with SDK 1.32.1: Express with JSON and event-stream answers, and WebStandardStreamableHTTPServerTransport.

A server built with the official SDK on Express, with no extra settings, got two findings from check: it answers requests from any website, and Express returns stack traces unless NODE_ENV=production.