# dietary-supplement-analysis for agents

One call checks a person's supplements against NIH upper limits, medication and herb interactions and FDA recalls, using the NIH label database, with a citation for every number.

Version 0.15.1. Information from labels and NIH reference data, not medical advice.

## Connect

- Remote MCP server (Streamable HTTP, no key): https://agents.trackmysupplement.com/mcp
- REST, JSON in and out: https://agents.trackmysupplement.com/v1/... (OpenAPI 3.1 at https://agents.trackmysupplement.com/openapi.json)
- Tool definitions for function calling: https://agents.trackmysupplement.com/v1/tools
- Pocket Network relays (no quotas): service `dietary-supplement-analysis` on Beta TestNet, rpc_type REST, 500 compute units per relay, supplier https://pokt-beta.trackmysupplement.com

### Claude Code

Run once in a terminal:

```
claude mcp add --transport http supplements https://agents.trackmysupplement.com/mcp
```

### Claude (claude.ai, desktop, mobile)

Settings, Connectors, Add custom connector, then paste:

```
https://agents.trackmysupplement.com/mcp
```

### ChatGPT

Settings, Apps and Connectors, developer mode, Create, then paste the URL:

```
https://agents.trackmysupplement.com/mcp
```

### Cursor

Use the install button, or add to ~/.cursor/mcp.json:

```
{
  "mcpServers": {
    "supplements": {
      "url": "https://agents.trackmysupplement.com/mcp"
    }
  }
}
```

### VS Code

Use the install button, or add to .vscode/mcp.json:

```
{
  "servers": {
    "supplements": {
      "type": "http",
      "url": "https://agents.trackmysupplement.com/mcp"
    }
  }
}
```

### Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

```
{
  "mcpServers": {
    "supplements": {
      "serverUrl": "https://agents.trackmysupplement.com/mcp"
    }
  }
}
```

### Gemini CLI

Add to ~/.gemini/settings.json:

```
{
  "mcpServers": {
    "supplements": {
      "httpUrl": "https://agents.trackmysupplement.com/mcp"
    }
  }
}
```

### OpenAI Agents SDK (Python)

Streamable HTTP MCP server:

```
from agents import Agent
from agents.mcp import MCPServerStreamableHttp

supplements = MCPServerStreamableHttp(params={"url": "https://agents.trackmysupplement.com/mcp"})
agent = Agent(name="assistant", mcp_servers=[supplements])  # inside: async with supplements: ...
```

### LangChain / LangGraph (Python)

With langchain-mcp-adapters:

```
from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({"supplements": {"transport": "streamable_http", "url": "https://agents.trackmysupplement.com/mcp"}})
tools = await client.get_tools()
```

### CrewAI (Python)

With crewai-tools:

```
from crewai_tools import MCPServerAdapter

with MCPServerAdapter({"url": "https://agents.trackmysupplement.com/mcp", "transport": "streamable-http"}) as tools:
    ...  # pass tools to your Agent
```

### n8n

Add an "MCP Client Tool" node to your AI Agent, transport HTTP Streamable, endpoint:

```
https://agents.trackmysupplement.com/mcp
```

### Any HTTP client (no MCP)

Plain REST, JSON in and out:

```
curl -s https://agents.trackmysupplement.com/v1/stack/analyze -H 'Content-Type: application/json' \
  -d '{"age":62,"sex":"female","detail":"summary","medications":["warfarin"],"products":[{"query":"Centrum Silver Women 50+"},{"query":"Ginkgo Biloba 120 mg"}]}'
```

### Pocket Network (paid relay, no quotas)

With an application staked for the service on Beta TestNet and pocket-ap:

```
pocket-ap call --config deploy/beta-stake/pocket-ap.yaml \
  --service dietary-supplement-analysis --rpc-type rest \
  -X POST --path /v1/stack/analyze \
  -d '{"age":34,"sex":"female","products":[{"query":"Nature Made Magnesium 250 mg"}]}'
```

## Which tool

- `stack_analyze` answers most questions in one call. Send the person's age and sex, products as they named them (`{"query": "..."}`), barcodes (`{"upc": "..."}`) or ingredient lists, and any medications and conditions. Use `"detail": "summary"` when the result goes into your context.
- `interactions_check`: what NIH lists for a medication or condition, without a stack.
- `products_search`, `products_lookup` (barcode), `products_get`: NIH label data.
- `products_fda_reports`: FDA recalls and adverse event report counts for a product.
- `nutrients_reference`: RDA, AI and upper limit for an age and sex. Offline.

## Relaying results

- Relay `agent_summary` as written, including its last sentence (check with a doctor or pharmacist before changing anything).
- Totals cover the listed supplements only, not food or medications, unless `foods` or `"diet": "typical"` was given.
- If a product resolved with low confidence, confirm it with the person and re-run with its `dsld_id`.
- `data_gaps[]` lists what could not be counted; mention gaps that matter instead of guessing.
- Never describe a stack as "safe" or "risk-free": the service reports what NIH data says, and its interaction checks are not exhaustive.

## Limits and errors

- Free trial on https://agents.trackmysupplement.com: 25 MCP tool calls per connection and 100 REST calls per address a day, reset at 00:00 UTC. Pocket Network relays are never metered.
- Every response is a JSON object. Errors are 4xx with `{"error": {"code", "message", "retryable", "field"}}`; 429 RATE_LIMITED carries the reset time. Never 5xx.

## Trust

- Live status, accuracy result and data editions: https://agents.trackmysupplement.com/status.json
- Code commit and data editions behind every answer: https://agents.trackmysupplement.com/v1/provenance
- Source (MIT): https://github.com/chariot-ventures/dietary-supplement-analysis. Terms: https://github.com/chariot-ventures/dietary-supplement-analysis/blob/main/TERMS.md
- Contact: mb@chariot.ventures

Full guide: https://agents.trackmysupplement.com/llms.txt
