MCP
Humanform exposes a remote Model Context Protocol (MCP) server so AI clients can call the same prediction tools as the REST API.
Endpoint: https://api.humanform.app/mcp
Transport: Streamable HTTP
Authentication
Use the same Bearer API keys as the REST API. Pass them in the Authorization header:
Authorization: Bearer hf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
or
Authorization: Bearer hf_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
See Authentication for key prefixes and creation.
Client configuration
Add Humanform as a remote MCP server in Cursor, Claude, or any client that supports Streamable HTTP with custom headers:
{
"mcpServers": {
"humanform": {
"url": "https://api.humanform.app/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Replace YOUR_API_KEY with a hf_live_… or hf_test_… key from the dashboard.
Tools
MCP tools invoke the existing /v1/* routes in-process. Rate limits and credit billing match the REST API — see Credits.
| Tool | Maps to | Credits |
|---|---|---|
get_catalog | GET / | free |
predict | POST /v1/predict | 1 on success |
predict_range | POST /v1/predict/range | 1 per returned percentile |
predict_compare | POST /v1/predict/compare | 1 per returned country |
percentile_lookup | POST /v1/percentile-lookup | 1 on success |
connected_dimension | POST /v1/connected-dimension | 1 on success |
Billing and limits
- Successful tool calls debit credits (or free-tier allowance) the same way as the mapped REST endpoint.
- Failed calls (validation, auth, model errors) do not consume credits.
- Authenticated traffic shares the REST rate limit: 120 requests per 60 seconds per API key.