Tools
The server is read-only by design. Writes go through the Amos admin UI (humans) or the worker’s diary writer (agents).
Transport
Selected at runtime byKB_MCP_TRANSPORT. The same binary handles all three:
HTTP modes bind to
KB_MCP_BIND_HOST:KB_MCP_BIND_PORT (default 0.0.0.0:8080). When KB_MCP_AUTH_TOKEN is set, every HTTP request must carry Authorization: Bearer <token> — enforced by Starlette middleware with constant-time comparison. Leaving the token unset is correct for cluster-internal-only deployments where NetworkPolicy or ingress owns the trust boundary.
Configuration
Cluster deployment
Theamos-mcp Terraform module (terraform/modules/amos-mcp/) ships a Deployment + ClusterIP Service. Workers and other in-cluster tooling reach it at:
mcp_public_enabled (default off). When enabled it attaches to the existing ingress-nginx with per-IP rate limiting; the auth token is enforced by the server middleware, not the ingress, so token rotation only touches the K8s Secret.
Local install (stdio)
claude_desktop_config.json, or via Claude Code:
Invariants
- stdout is reserved for the MCP wire protocol on stdio transport. All logs go to stderr.
- The server is stateless beyond its HTTP client. Audit rows, search index, and tier rules all live in Mother AI / Qdrant / Postgres.
- Errors from Mother AI (auth, rate limit, tier-denied) flow through unchanged so the client can surface them to the user.
- Auth checks use constant-time comparison. No token-length oracle to unauthenticated callers.