MCP
Model Context Protocol (MCP)
MCP gives your agent every CribScore capability — search, detail, compare, trust, evidence, decision memo — without manual request plumbing.
Local vs remote#
Two transports, identical tool surface. Pick local for offline development, version pinning, and air-gapped environments. Pick remote for one-config deploys, zero-install evaluation, and hosted scaling.
- Local — `npx -y @cribscore/mcp` (or pin via `npm install`). Stdio transport.
- Remote — `https://api.cribscore.co/mcp` (streamable HTTP, bearer auth).
- Same tools, same arguments, same return shapes — switching transport is a config change, not a code change.
Tool surface#
Every tool maps 1:1 to a REST endpoint. Arguments mirror REST query / body params; return shapes mirror REST responses. Agents that already use the REST API can adopt MCP without re-learning the contract.
- `cribscore_search_facilities` → `GET /v1/facilities`
- `cribscore_get_facility` → `GET /v1/facilities/{id}`
- `cribscore_compare_facilities` → `POST /v1/facilities/compare`
- `cribscore_risk_forecast` → `GET /v1/facilities/{id}/risk-forecast`
- `cribscore_evidence` → `GET /v1/facilities/{id}/evidence`
- `cribscore_list_jurisdictions` → `GET /v1/trust/jurisdictions`
- `cribscore_decision_memo` → `POST /v1/decision/memo`
- `cribscore_list_docs` + `cribscore_get_doc` → docs index (this site)
Environment variables#
Both transports read the same env vars. Set `MCP_API_KEY` for authentication; override `MCP_API_BASE_URL` only when you are running the API locally.
export MCP_API_KEY="YOUR_API_KEY"
export MCP_API_BASE_URL="https://api.cribscore.co" # optional — defaults to production{
"mcpServers": {
"cribscore": {
"command": "npx",
"args": ["-y", "@cribscore/mcp"],
"env": {
"MCP_API_KEY": "YOUR_API_KEY"
}
}
}
}{
"cribscore": {
"type": "streamable-http",
"url": "https://api.cribscore.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}Picking a transport#
Use remote for evaluation and prototype agents — fastest start, zero infra. Use local when you need deterministic version pinning, offline operation, or a transport your agent platform does not yet support remote MCP for.