Skip to content

Sesamcp's app as it is

Replaces ADR 0003's TokenFormatGate and build_app.

Context and Problem Statement

ADR 0003 wrapped Sesamcp's app in a gate of its own and reached into a private variable of the library. The tests ran something other than what production serves.

Decision Outcome

The tools, ALLOWED_CALLS and GuardedTransport stay. build_app is sesamcp.server.app_from_env in token mode, main is sesamcp.server.run, and the tests and dev/live-smoke.py drive that app through sesamcp.testing.

Before Now
only a token that looks like mfat_… passed, with a 401 that named the format dropped: MailFlow judges its tokens, and its 401 comes back as a tool error that says where to create one
so another secret could never reach MailFlow dropped with it: whatever the client sends goes to MailFlow as Authorization
Token …, Basic … refused here refused by MailFlow
MCP_HOST, MCP_PORT, MCP_PATH, MCP_ALLOWED_HOSTS, /health Sesamcp's. The port is 8082 in the image (MCP_PORT); outside it, 8081
the start-up line that names MailFlow's URL Sesamcp's line
v0.2.2 asked MailFlow about the token on initialize; its replay of the request body reported a disconnect and cut every answer off dropped with the gate: the sign-in in front checks the token (login.verify on /api/api-tokens/self), so it has to be deployed before this version
Sesamcp pinned by git commit sesamcp from PyPI (0.2.1); the image needs no git
live-smoke printed the token's scopes and expiry dropped: it runs against the app, which has no tool for that
live-smoke expected the tools of version 0.1, so it failed since 0.2 checks that the read tools are there, category_counts included

Confirmation

The unit tests, on the app production serves; one requires the body of the initialize answer. The sign-in, initialize and a tool call through a Sesamcp 0.2.1 service in front, against a fake MailFlow. The live smoke needs a real MailFlow and was not run.