MCP remote endpoint: deploy mcp/ over Streamable HTTP (Cloudflare Worker or k3s) + link from app #58

Closed
EduarD3V wants to merge 0 commits from issue/46-mcp-remote-endpoint-deploy-mcp into bullet-develop
Owner

Merged into bullet-develop (c7d63469). Superseded by rolling PR #48.

Merged into bullet-develop (c7d63469). Superseded by rolling PR #48.
The #26 restructure put the app at src/, leaving mcp/ importing ../../web/src/lib —
every mcp/ test and the build failed on the merge base.
- src/http.ts: Web-standard fetch handler, POST /mcp, bearer token re-checked per
  request, stateless transport (one per request), body cap from AUTOFIRME_MCP_MAX_BYTES
- src/surface.ts: the three tool registrations, shared by the stdio and HTTP entries
- src/server-http.ts: Node adapter; refuses to start without AUTOFIRME_MCP_TOKEN
- test/http.test.ts: credential matrix + real MCP client over a socket, signature
  verified with openssl cms -verify
- mcp/Containerfile, mcp/deploy/k3s.yaml, README + docs/MCP-DESIGN.md remote section
- fix: engine imports pointed at a web/ directory that the #26 restructure removed
Help-menu entry opens a dialog with the deployed server's /mcp address (one field,
one copy button) and its bearer token, persisted in this browser like the theme.
The app never sends either value anywhere; the hint says so in ES and EN.
Reviewer finding #1: 8d710279 fixed the inverted mapping (non-OK verdicts
printed OK under pre-1.3 wording) but shipped no test. Pin the full
verdict matrix — 1.3.x 'Verification status:', 'status:' prefix, bare
OK/FAIL line, no-verdict error — with spawnSync stubbed, so the oracle
stays correct regardless of the xmlsec1 build installed.

Verified red against the pre-fix mapping, green after.
Reviewer finding #2: findByRole('alert') in the wrong-PIN test (and a
CertPicker waitFor observed on rerun) raced testing-library's 1 s async
default — PKCS#12 unlock/sealing runs PBKDF2 with 250k iterations and
exceeds it when vitest parallelizes files. Set asyncUtilTimeout 15 s
once in src/test-setup.ts instead of per-call. Three full suite runs
now pass 148/148; previously failed 2 of 3.
EduarD3V closed this pull request 2026-10-15 09:04:48 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
EduarD3V/AutoFirme!58
No description provided.