Runs on Sesamcp¶
Context and Problem Statement¶
paperless-ngx-mcp, karakeep-mcp and invoiceninja-mcp each carried the same frame: downloading the spec and retrying while the app boots, picking the operations, the person's credential on every call, the token gate, the error server, and the sign-in from mcp-login-oauth (ADR 0004). Sesamcp is that frame as one library and service. Should this server use it?
Decision Outcome¶
It runs on Sesamcp 0.1.3. app/server.py keeps what is Paperless's: the spec quirks (normalize_operation), its description rules (describe_tool, passed as describe=), the API version header, the bulk-task wait, the file and upload tools, the login that trades a password for the person's API token, and the Token scheme. The spec download, toolset selection, the person's token on every call, the token gate, the error server, health and serving are Sesamcp's. 1157 → about 890 lines. The names the tests use stay, as thin wrappers.
The token prefix pmcp_ and the store salt are unchanged, so existing sign-ins keep working. The licence stays AGPL-3.0-or-later.
Consequences¶
- Good: a fix to the frame lands in every server at once. Moving here found three, released in Sesamcp 0.1.2: a server can keep its own describer;
Token <token>is read in token and both mode; Sesamcp needs FastMCP 4.2.6 (the first withforward_client_headers), not 4.1. - Good: the client's own headers can't reach Paperless (Sesamcp sets
forward_client_headers=Falseas well as replacingAuthorization). - Good: the unit tests drive Sesamcp's download through a transport instead of patching
httpx2.getand waiting out the retries: 4 minutes → 6 seconds. - Neutral: pyyaml is no longer a direct dependency (Sesamcp parses the spec).
- Neutral: the message for a call without a token is Sesamcp's ("the person is not signed in").