Using the Madjik API for MCP
Built-in Model Context Protocol tool endpoints.
The API exposes MCP-format tools directly — you do not need to write a wrapper server unless you want one. See the API reference for the endpoints.
Available tools
| Tool | What it does |
|---|---|
madjik_get_metrics | Latest values for given ids or categories (all accessible metrics if empty) |
madjik_get_timeseries | History for one metric (metric_id, hours, interval) |
madjik_market_summary | Summary across key metrics for a focus area (overview, risk, sentiment, derivatives) |
madjik_list_metrics | Catalog listing with tiers and accessibility |
Calling a tool
# discover tools (public)
curl "https://api.madjik.io/mcp/tools"
# call one (authenticated)
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "madjik_market_summary", "arguments": {"focus": "risk"}}' \
"https://api.madjik.io/mcp/call"
Responses follow the MCP content format:
{ "content": [ { "type": "text", "text": "{ ...JSON payload... }" } ], "isError": false }
Bridging to an MCP client
To use these tools from an MCP-speaking assistant, run a thin stdio/HTTP bridge that lists
/mcp/tools and forwards calls to /mcp/call with your API key.
Keep the key in the bridge's environment — never in the model context.
Best practices
- Cache tool results briefly — repeated identical calls burn your quota
- Surface descriptions — pass each tool's
descriptionthrough to the model - Return errors as data — the endpoint sets
isError: truerather than failing the transport
