Agents and MCP
Dianthan is designed to be operated by coding agents as well as by people. This page covers the MCP server, the files written for models, and how to give an agent access you can trust.
In preview. The MCP server and the agent skill are in preview.
/llms.txtis available now.
Documentation for models
/llms.txt is this entire documentation as one plain-text file. Paste its URL into any agent and it has everything it needs to integrate an app.
The MCP server
Install it for Claude Code, Cursor or any client that speaks the Model Context Protocol:
npx dianthan mcp installOr add it by hand:
{
"mcpServers": {
"dianthan": {
"url": "https://api.dianthan.com/mcp",
"headers": { "Authorization": "Bearer dn_agent_…" }
}
}
}Tools
| Tool | Does |
|---|---|
apps.list, apps.create | List and create apps, register domains |
systems.add, systems.remove | Switch systems on and off |
keys.create | Create a scoped server key and write it to the local environment |
plans.create, plans.update | Define plans and their entitlements |
flags.set, flags.rollout | Create flags and change rollouts |
records.query | Read an app's records with structured filters |
logs.query, errors.list | Read events, errors and traces to debug |
docs.search | Search this documentation |
Giving an agent a key
Create a key for the agent, not for yourself:
dianthan keys create \
--name "claude-code on ada's laptop" \
--scopes records:read,records:write,logs:read \
--expires 7d- Scope it. Give it only the scopes the task needs. A key that lists scopes can use only the routes they cover:
records:read,records:write,files:read,files:write,logs:read,logs:write,usage:write,models:callandmessages:send. Anything else is refused with403 insufficient_scope. - Limit it to one app with
--appwhen the work concerns one product. - Make it expire. A key that ends after the week's work can't be forgotten in a dotfile.
Every change the key makes is written to the audit log with the key that made it, and its record changes can be undone in one step. Revoke it from the console and its access ends on the next request.
The agent skill
A skill file teaches an agent the conventions in these docs: keep keys on the server, store refresh tokens in httpOnly cookies, record usage only after success, check entitlements rather than prices. Install it into a project:
npx dianthan skill install # writes .claude/skills/dianthan/SKILL.mdPrompts that work well
- "Add Dianthan sign-in with magic links and Google to this Next.js app."
- "Create a Pro plan at $12 a month with PDF export, and gate the export button on it."
- "Record a usage event for every summary we generate, and stop at 500 a month on the free plan."
- "Look at this app's errors from the last day and fix the most frequent one."