Getting Started
Go from zero to your first metric lookup in five minutes. All you need is curl and a free API key.
1Get an API Key
Create a free API key. No credit card required. The Open tier gives you 100 calls per minute across all industries.
curl -X POST https://api.metricregistry.co.uk/v1/keys \
-H "Content-Type: application/json" \
-d '{"email": "you@company.com", "tier": "open"}'
# Response
{
"api_key": "mr_live_abc123...",
"tier": "open",
"rate_limit": "100/min"
}2Fetch Your First Metric
Retrieve a metric by its fully qualified ID. The response includes the formula, inputs, regulatory source, and full provenance.
curl -s https://api.metricregistry.co.uk/v1/metrics/uk.banking.capital.cet1_ratio \
-H "Authorization: Bearer mr_live_abc123..." | jq .
# Response
{
"id": "uk.banking.capital.cet1_ratio",
"title": "CET1 Ratio",
"version": "0.1.0",
"certification": "draft",
"formula": {
"dialect": "ansi",
"sql": "SELECT ${cet1_capital} / nullif(${rwa}, 0) AS cet1_ratio FROM ${capital}"
},
"output": {
"column": "cet1_ratio",
"type": "numeric",
"unit": "ratio"
},
"regulatory_source": {
"framework": "Basel 3.1 PS1/26",
"paragraph": "Article 92(2)(a)"
}
}3Search Metrics
Search by keyword, filter by industry, or list all metrics in a domain.
# Search by keyword
curl -s "https://api.metricregistry.co.uk/v1/metrics?q=capital+ratio" \
-H "Authorization: Bearer mr_live_abc123..." | jq '.metrics[].id'
# Filter by industry
curl -s "https://api.metricregistry.co.uk/v1/metrics?industry=banking" \
-H "Authorization: Bearer mr_live_abc123..." | jq '.total'
# Response
{
"total": 150,
"metrics": [...]
}4Validate Your SQL
Submit your SQL implementation and the API will check it against the canonical metric formula. Available on Pro and Enterprise plans.
curl -X POST https://api.metricregistry.co.uk/v1/validate \
-H "Authorization: Bearer mr_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"metric_id": "uk.banking.capital.cet1_ratio",
"sql": "SELECT cet1_capital / nullif(rwa, 0) AS cet1_ratio FROM capital"
}' | jq .
# Response
{
"valid": true,
"metric_id": "uk.banking.capital.cet1_ratio",
"checks": {
"output_column": "pass",
"input_datasets": "pass",
"null_safety": "pass"
}
}5MCP Setup
Connect MetricRegistry as a tool in Claude Desktop or any MCP-compatible AI agent. Add this to your Claude Desktop configuration:
{
"mcpServers": {
"metricregistry": {
"command": "npx",
"args": [
"-y",
"@metricregistry/mcp-server"
],
"env": {
"METRICREGISTRY_API_KEY": "mr_live_abc123..."
}
}
}
}Once configured, your AI agent can call tools like get_metric, search_metrics, and validate_sql directly.
Next Steps
- API Reference — Full endpoint documentation with request/response schemas
- Explore Metrics — Browse all available metric definitions
- Pricing — Compare Open, Pro, and Enterprise plans