MCP Protocol
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, a server-side job, connects the same way.
Endpoint
One endpoint, streamable HTTP transport. The /mcp suffix is canonical; it is the OAuth resource indicator clients register against.
https://mcp.dev.arch.ie/mcpDiscovery
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://mcp.dev.arch.ie/mcp \
-H 'content-type: application/json' -d '{}'
# → 401 Unauthorized
# → www-authenticate: Bearer resource_metadata="https://mcp.dev.arch.ie/.well-known/oauth-protected-resource"
# 2. Protected-resource metadata (RFC 9728)
curl -s https://mcp.dev.arch.ie/.well-known/oauth-protected-resource
# 3. Authorization-server metadata (RFC 8414)
curl -s https://mcp.dev.arch.ie/.well-known/oauth-authorization-server
# 4. Dynamic client registration (RFC 7591, no pre-shared client_id)
curl -s -X POST https://mcp.dev.arch.ie/oauth/register \
-H 'content-type: application/json' \
-d '{"redirect_uris":["https://your-client.example/callback"],"client_name":"My MCP client"}'The OAuth Flow
Standard OAuth 2.1 authorization code with PKCE. WorkOS AuthKit is the identity provider; Archie owns the issuer and the scope layer. Token endpoint auth method is none, a public client, PKCE only. The full walkthrough with the sequence diagram lives on the authentication page.
- Call without a token
A client POSTs to the MCP endpoint with no bearer. Archie returns
401with aWWW-Authenticateheader pointing at the protected-resource metadata. - Read protected-resource metadata
/.well-known/oauth-protected-resource(RFC 9728) names the authorization server. The resource value is Host-derived, so the same code path serves every tier. - Read authorization-server metadata
/.well-known/oauth-authorization-server(RFC 8414) gives the authorize, token, and registration endpoints. - Register dynamically
POST /oauth/register(RFC 7591) returns anarchie_mcp_*client id. No pre-shared secret: public client, PKCE only. - Run PKCE consent
GET /oauth/authorizewithcode_challengeredirects to WorkOS AuthKit. The user signs in with the firm's SSO and picks a workspace. - Exchange the code for a token
POST /oauth/tokenwith the code andcode_verifierreturns 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 match the tier's connector URL or the call is rejected at the bearer-resolver layer.
{
"iss": "https://claude.dev.arch.ie",
"sub": "user_01ABC...",
"org_id": "org_01XYZ...",
"workspace_id": "ws_01...",
"scope": "read:accounting read:clients write:journals",
"exp": 1734567890,
"token_type": "archie_oauth"
}Host Matrix
The iss and resource values are Host-header-derived. One code path serves every tier; only the deploy environment's base URL changes.
Tier
Connector
MCP discovery
API
Supported Versions
Archie negotiates the protocol version on connect. Two are current; clients send loopback redirect URIs (http://127.0.0.1:*) for local dev in the spirit of OAuth 2.1 §10.3.3.
Anything weird in the spec? Email [email protected]. To add a client, start at Connect Claude; to see what Archie carries, the tool catalog.