The MCP Surface
Archie speaks the Model Context Protocol natively. The Claude Connector is one client. Anything that speaks streamable-HTTP MCP, your own agent runtime, an internal bot or a server-side job, connects the same way.
This page covers the endpoint, the 401 discovery chain, the OAuth 2.1 sequence, the access-token shape and the protocol versions Archie supports.
One Endpoint
One endpoint, streamable HTTP transport. The /mcp suffix is canonical: it is the OAuth resource indicator clients register against.
https://uk.heyarchie.com/mcp
Discover Everything From a Single 401
A client that follows RFC 9728 finds everything it needs from a single 401. Fail, read the metadata, register, run PKCE.
# 1. Fail and discover
curl -i -X POST https://uk.heyarchie.com/mcp \
-H 'content-type: application/json' -d '{}'
# → 401 Unauthorized
# → www-authenticate: Bearer resource_metadata="https://uk.heyarchie.com/.well-known/oauth-protected-resource"
# 2. Protected-resource metadata (RFC 9728)
curl -s https://uk.heyarchie.com/.well-known/oauth-protected-resource
# 3. Authorization-server metadata (RFC 8414)
curl -s https://uk.heyarchie.com/.well-known/oauth-authorization-server
# 4. Dynamic client registration (RFC 7591, no pre-shared client_id)
curl -s -X POST https://uk.heyarchie.com/oauth/register \
-H 'content-type: application/json' \
-d '{"redirect_uris":["https://your-client.example/callback"],"client_name":"My MCP client"}'Discover the Server
Call Without a Token
A client POSTs to the MCP endpoint with no bearer. Archie returns 401 with a WWW-Authenticate header pointing at the protected-resource metadata.
Read Protected-Resource Metadata
/.well-known/oauth-protected-resource (RFC 9728) names the authorisation server. The resource value is derived from the Host header, so the same code path serves every deployment.
Read Authorisation-Server Metadata
/.well-known/oauth-authorization-server (RFC 8414) gives the authorize, token and registration endpoints.
Sign in and Get a Token
Register Dynamically
POST /oauth/register (RFC 7591) returns an archie_mcp_* client id. No pre-shared secret: public client, PKCE only.
Run PKCE Consent
GET /oauth/authorize with code_challenge redirects to WorkOS AuthKit. The user signs in with the firm's SSO and picks a workspace.
Exchange the Code for a Token
POST /oauth/token with the code and code_verifier returns the access token. Every MCP call after that carries it.
Access-Token Shape
An HS256 JWT signed with the issuer's secret. The iss claim has to name this region's address, the host that issued it, and aud must be mcp, or the call is rejected.
{
"iss": "https://uk.heyarchie.com",
"aud": "mcp",
"sub": "3f2b8c1e-…",
"org_id": "8d4e2a10-…",
"workspace_id": "b0000000-…",
"scope": "read:accounting read:clients write:journals",
"iat": 1734567000,
"exp": 1734567900,
"token_type": "archie_oauth"
}The iss and resource values are derived from the Host header. One code path serves every deployment; only the base URL changes.
Supported Versions
Archie negotiates the protocol version on connect. It supports four, and answers with 2025-11-25 when a client asks for one it does not know. For local development, clients send loopback redirect URIs (http://127.0.0.1:*) in the spirit of OAuth 2.1 §10.3.3.