MCP server
A Model Context Protocol endpoint any MCP client can plug in to. Requests authenticate with a token you generate here and store only as a hash.
Endpoint
JSON-RPC over HTTP (POST) + SSE stream (GET). Protocol version 2025-06-18.
/mcp (loading…)To connect Poke (or any MCP client): generate a token above, then point the integration at /mcp (loading…) with that token as the Authorization: Bearer header. There is no separate login - the API token is the only credential, and this console itself has no session auth.
Access tokens
Generated server-side and stored only as a SHA-256 hash. Anyone with a valid token acts as this user - keep it private.
Manage tokens
No token generated yet. Click Generate token to create one for a Poke or other MCP client.
Tools
search_foodSearch the local food catalog and return per-serving macros. You can filter results by source.
- query*
- ?source
log_mealLog one or more items to this user's diary with built-in deduplication, plus optional mirror targets.
- items*
- ?meal_type
- ?sync_targets
get_daily_macrosTotal calories, protein, carbs and fat for a date, with remaining budget against your goals.
- ?date
get_micronutrient_breakdownDaily totals for fiber, sugar, sodium and potassium for a date.
- ?date
Try it
# Set your generated token (from the panel above)
export NB_TOKEN="nb_…"
# 1. Initialize
curl -s /mcp (loading…) \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NB_TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{}}}'
# 2. List tools, then call one
curl -s /mcp (loading…) \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NB_TOKEN" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_daily_macros","arguments":{"date":"2026-10-21"}}}'
# SSE stream (authenticated via query or header)
curl -s -N "/mcp (loading…)?token=$NB_TOKEN"Reads and writes the same store as the dashboard. This endpoint is authenticated and is not connected to Cronometer or MyFitnessPal - results reflect only the data you log or import here.