MCP server
Use January from a coding agent. The hosted MCP server exposes the v1.2 REST API as tools that Claude Code, Codex, and other MCP clients can call while they build your integration.
Every tool call is an ordinary API request made with your API key, so credits, request limits, and the usage shown in the January Developer Dashboard apply exactly as they do to your own code. The server keeps no state and stores nothing.
https://mcp.january.ai/mcpConnect
Create an sk-… API key in the Developer Dashboard, then register the server with your client. The key is sent as the bearer credential on every request. The server accepts only API keys; client tokens are rejected.
--scope user makes the server available in every project on this machine. The last command asks a question without opening the agent; --allowedTools mcp__january lets that run call January's tools without a permission prompt.
claude mcp add --scope user --transport http january https://mcp.january.ai/mcp \
--header 'Authorization: Bearer sk-your-key'
claude -p "Search the January food database for greek yogurt and list the top three matches." --allowedTools mcp__januaryCodex reads the bearer token from an environment variable each time it starts, so keep the export in your shell profile. The last command asks a question without opening the agent; --skip-git-repo-check lets it run outside a Git repository.
codex mcp add january --url https://mcp.january.ai/mcp --bearer-token-env-var JANUARY_API_KEY
export JANUARY_API_KEY="sk-your-key"
codex exec --skip-git-repo-check "Search the January food database for greek yogurt and list the top three matches."Codex stops waiting for a tool after 60 seconds by default, and an image analysis can take slightly longer. Raise the limit in the [mcp_servers.january] section that the command wrote to ~/.codex/config.toml:
[mcp_servers.january]
tool_timeout_sec = 90VS Code lists servers under servers in .vscode/mcp.json and needs the transport spelled out.
{
"servers": {
"january": {
"type": "http",
"url": "https://mcp.january.ai/mcp",
"headers": { "Authorization": "Bearer sk-your-key" }
}
}
}Cursor and most other clients accept this configuration block. Windsurf takes the same block with serverUrl in place of url.
A successful answer lists three foods from the catalog. Each time you create a key, the dashboard shows the Claude Code, Codex, and JSON setups with the new key already filled in.
The client stores the key in its own configuration on that machine. Use a key created for this purpose and delete it from the dashboard when you no longer need it.
Tools
Tool names follow the REST resources. IDs are strings, amounts are { value, unit }, and errors carry the API's code values plus one of the server's own, described under Errors and cost. Water and weight logs aren't available as MCP tools yet.
Look up
january_search_foods
Find generic, branded, and recipe foods by name.
january_get_food
One food's complete record and serving list, by ID or by barcode (US barcodes only).
january_suggest_food_alternatives
Healthier alternatives that honor allergens to avoid and dietary patterns to match.
Interpret
january_analyze_food
Detect foods and nutrition in a photo (URL or data URI) or a plain-English meal description.
january_correct_food_analysis
Revise an analysis conversationally and recalculate its totals.
Record
january_list_food_logs
One end user's diary over a range of local calendar days.
january_create_food_log
Record a meal from food and serving selections.
january_update_food_log
Change a saved log's foods, time, or name.
january_delete_food_log
Delete one saved log.
Predict
january_predict_glucose
Predict the glucose curve a meal produces for a described person.
Nearby
january_search_restaurants
Restaurants near a coordinate.
january_search_menu_items
Dishes with nutrition near a coordinate.
january_get_restaurant_menu
One restaurant's menu, paged.
Account
january_get_credits
Your credit allowance and usage for the current billing period. Free.
Two resources are published alongside the tools: january://openapi.json, the live OpenAPI document, and january://error-codes, every error code with its retry rule and what to do next.
Before an agent writes data
The food-log tools act on a real end user's diary under your account. Give the agent a designated test end_user_id: the server's instructions tell it never to invent or reuse one and to state which end user each write went to.
Updating or deleting a log requires the etag returned by a listing of that log within the last fifteen minutes. An agent working from a stale plan cannot delete what it has not just read, and there is no bulk delete.
Food analysis never writes a log. Glucose predictions are estimates from a model, not measurements or medical advice.
Errors and cost
Every tool error carries the API's stable code together with retryable, retry_after_seconds, next_step, and request_id, so an agent can decide whether to change the request, wait, or stop. One code comes from the MCP server itself: precondition_failed, for a missing or stale etag.
january_get_credits costs nothing and answers even when the balance is spent. Every other tool is priced like the endpoint behind it; see Credits and pricing. When the credit allowance for the billing period is exhausted, the error includes the current balance and the reset date, and the agent is told not to retry.
Next steps
Quickstart for the same first call with
curl.REST API reference for every endpoint the tools call.
Last updated
Was this helpful?