Repository navigation
Releases
v0.3.0
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 Originvalidation (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'sStreamableHTTPServerTransport. Put it afterexpress.json(). With the SDK'srequireBearerAuth, the verified client isreq.auth.clientId.serve()runs a web-standard handler on plainnode: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.
v0.2.0
- Verified OAuth client as the app. Any app can call itself anything in
clientInfo. If your server uses OAuth, pass the client ID on the token it accepted throughoptions.oauth.clientId; it is asked after your handler runs, once your auth step has checked the token. A newappfield records which app is behind it: the host of a Client ID Metadata Document URL (the authorization server fetched and checked that document), your own name for an ID you issued (options.oauth.registered), or(unlisted)for any other ID, usually a client that registered itself. The raw ID is never stored. The report adds an "Apps by verified OAuth client" table when any call has one. Analytics Engine:blob10. - Error text is never recorded, now tested and documented. A failed call keeps only its outcome and numeric code. Error messages,
error.dataand the text of a failed tool's result are read past, because they can quote an argument or part of a document. A new test sends a secret through a protocol error, a failed tool (JSON and event stream) and an unreadable request; it is stored in none of them.
Thanks to the people on X who suggested both.
0.1.2
- Report: calls answered
-32601(method not found) are listed apart, by method, and not counted as failed calls. Scanners send them to learn what a server speaks (server/discoveron an older server, other protocols' methods); on one public server they made a 7.8% failure rate out of 0.3%.
0.1.1
- New outcome
unread: a streamed answer past 8 MB, where mcplytics stopped reading before the answer. It wasno_response, which claimed a failure it hadn't seen. Not counted as failed. - README and package description say app names are what clients send about themselves.
0.1.0
First release. Wraps the HTTP handler of a remote MCP server and records one event per call: tool, calling app, how it ended, how long it took. Analytics Engine, JSONL and callback sinks; npx mcplytics report. Zero dependencies; never stores arguments or results.