API & MCP for developers
The data behind every page is open to code: a Model Context Protocol (MCP) server for AI assistants, and one static JSON file for your own lookups.
The MCP server
https://knowyouradditive.com/api/mcp is a public Model Context Protocol endpoint. Connect Claude or any MCP client to it, and the assistant answers from the same rows these pages are built from, in English, Spanish and French, instead of from memory.
It speaks streamable HTTP, needs no account and no key, and is stateless: every request gets a plain JSON answer. Every result carries the URL of the page it comes from.
Eight tools
- search_additives: find additives by name, E-number, INS number or a plain question such as “is maltodextrin vegan?”.
- get_additive: one additive, as a summary, its diet answers, its regulatory status or the full page.
- check_label: check a pasted ingredient list against a household’s diets, like the label checker.
- read_label_photo: read the ingredient list off a photo of a pack, then check it.
- compare_additives: two additives side by side, with the better one marked on each line.
- list_additives: filter by safety tier, category, diet answer, regulator status, origin, food or one of the site’s named lists.
- get_diet_guide: the long-form answer for one additive on one diet, where one exists.
- shop_link: the tracked Amazon link for the shopper’s storefront.
It also offers resources (kya://additives/{slug}, kya://categories, kya://diet-guides, kya://comparisons/{slug}, kya://search-index) and two prompts, check-label and explain-additive.
Install it
In Claude Code, add it as an HTTP server:
claude mcp add --transport http knowyouradditive https://knowyouradditive.com/api/mcpOr install the Claude Code plugin, which points at the same endpoint:
/plugin install knowyouradditive --marketplace marc-aurele-besner/knowyouradditive.comIn any other MCP client, add a remote (streamable HTTP) server with the URL above.
Rate limits
Each network gets 120 calls a minute. Past that, the server answers with a JSON-RPC error and a Retry-After: 60 header: wait a minute and try again.
read_label_photo calls a paid vision model, so it also shares the daily limit of the label checker’s photo button. When photo reading is unavailable, the tool says so instead of returning an empty result.
The JSON search index
/data/search-index.json is one static file on the CDN. The search box and the label checker run on it in your browser. It holds every additive with its slug, name, E-number, safety tier, category, origin, six diet answers and search keys in English, Spanish and French, plus the common ingredients, the diet guides, the comparisons and which pages are translated.
Keys are short to keep the file small: s is the slug, n the name, e the E-number, t the tier and d the diet answers (Y, N or D) in the order vegan, gluten-free, halal, kosher, keto, low-FODMAP. The file is rebuilt on every deploy, so fetch it rather than keep a copy.
Citing us
Every MCP result and every index entry points to a page on this site. Link to that page when you use an answer, so readers can see the reasoning, the sources and the date it was checked.
- Keep the site’s answer. Summarize it, but don’t change a rating or a diet verdict, and keep its caveats.
- Name us and link the page, for example: “Source: KnowYourAdditive, https://knowyouradditive.com/additive/e322-lecithin/”.
- Keep the upstream credits. Some data comes from Open Food Facts (ODbL) and government records, credited on each page.
- Look up, don’t copy. Copying the database in bulk or republishing it as your own needs permission: see the Terms of Service.
Questions
Building something with the data, or found a wrong answer? Contact us.