Working with Agents
Key GuideHow to connect AI agents, LLMs, and automation tools to your documentation.
Agents are First-Class Citizens
AgentDocs is designed from the ground up with AI agents as first-class consumers of documentation. Every page can be accessed as clean, structured Markdown via a dedicated agent endpoint — no HTML parsing, no JavaScript rendering, no authentication hassles.
Whether you're feeding documentation to Claude, ChatGPT, a custom LLM pipeline, or a CI/CD script, AgentDocs provides multiple integration points:
Raw Endpoint
Plain Markdown via share links. No auth needed.
API Tokens
Full CRUD access for agents that need to write.
Webhooks
Push notifications when docs change.
MCP Server — the fastest integrationRecommended
If your agent runs in a client that can launch a local MCP server (Claude Code, Claude Desktop, Cursor, Windsurf), you can skip raw REST: the official MCP server exposes AgentDocs as 18 native tools (keyword and semantic search, read, create, update, append, markdown-folder import, share and more), addressable by slug or UUID. Works with account tokens and space-scoped tokens alike. On Claude.ai web, upload the Skill instead (a hosted remote connector is on the roadmap).
Remote (hosted) — nothing to install
Point any remote-capable MCP client at our hosted endpoint and send your API token as an Authorization header. Both "Token <api_token>" and "Bearer <api_token>" are accepted here. Account tokens, space-scoped tokens and browser sessions all work — a space-scoped token stays confined to its own space, exactly as it does everywhere else. This is also the answer for catalog-based MCP gateways that cannot launch npx servers.
https://agentdocs.eu/mcp Authorization: Token <your-token> # Claude Code: claude mcp add --transport http agentdocs https://agentdocs.eu/mcp \ --header "Authorization: Token <your-token>"
Claude.ai & Claude Desktop: Add the URL above under Settings → Connectors → Add custom connector — no headers, no OAuth fields, no token pasting. AgentDocs implements OAuth 2.1: Claude discovers the flow automatically, your browser opens an AgentDocs consent page, and you are connected after signing in and approving. The grant covers your documents only — never account, billing or credential management — and can be revoked at any time under Settings → Connected apps. If a connector added earlier shows "Connection issue", remove it and add it fresh (stale connectors keep old credential state), and allow one retry on the very first connect while the database wakes.
Install in your client
Every entry below launches the same npx server — pick your client. You need an API token first: account-wide (Profile → Regenerate API Token) or space-scoped (Space settings → Tokens; recommended for sandboxing an agent to a single space).
Claude Code
claude mcp add agentdocs --env AGENTDOCS_TOKEN=<your-token> -- npx -y agentdocs-mcp
Codex CLI
codex mcp add agentdocs --env AGENTDOCS_TOKEN=<your-token> -- npx -y agentdocs-mcp # or in ~/.codex/config.toml: [mcp_servers.agentdocs] command = "npx" args = ["-y", "agentdocs-mcp"] [mcp_servers.agentdocs.env] AGENTDOCS_TOKEN = "<your-token>"
Claude Desktop · Cursor · Windsurf · Gemini CLI
// claude_desktop_config.json · .cursor/mcp.json ·
// ~/.codeium/windsurf/mcp_config.json · ~/.gemini/settings.json
{
"mcpServers": {
"agentdocs": {
"command": "npx",
"args": ["-y", "agentdocs-mcp"],
"env": { "AGENTDOCS_TOKEN": "<your-token>" }
}
}
}VS Code (Copilot)
// .vscode/mcp.json — note the "servers" key
{
"servers": {
"agentdocs": {
"command": "npx",
"args": ["-y", "agentdocs-mcp"],
"env": { "AGENTDOCS_TOKEN": "<your-token>" }
}
}
}Zed
// settings.json
{
"context_servers": {
"agentdocs": {
"command": "npx",
"args": ["-y", "agentdocs-mcp"],
"env": { "AGENTDOCS_TOKEN": "<your-token>" }
}
}
}opencode
// opencode.json (project root) or ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"agentdocs": {
"type": "local",
"command": ["npx", "-y", "agentdocs-mcp"],
"environment": { "AGENTDOCS_TOKEN": "<your-token>" }
}
}
}pi / oh-my-pi
Base pi ships without MCP support — use the Skill file or REST there. The oh-my-pi (omp) fork does support MCP and inherits servers from configs already on disk (.claude, .cursor, .codex, .vscode, …): add the standard block to one of those and restart omp.
// .cursor/mcp.json (picked up by omp on start)
{
"mcpServers": {
"agentdocs": {
"command": "npx",
"args": ["-y", "agentdocs-mcp"],
"env": { "AGENTDOCS_TOKEN": "<your-token>" }
}
}
}Any other MCP client
Any other MCP client can launch the same server with this standard config:
{
"mcpServers": {
"agentdocs": {
"command": "npx",
"args": ["-y", "agentdocs-mcp"],
"env": { "AGENTDOCS_TOKEN": "<your-token>" }
}
}
}On Windows: many MCP clients can't spawn npx directly ("spawn npx ENOENT"). Wrap the command in cmd /c:
"command": "cmd", "args": ["/c", "npx", "-y", "agentdocs-mcp"]
Catalog-based gateways: some harnesses route MCP through a curated catalog (e.g. the Docker MCP gateway) and can't launch arbitrary npx servers. AgentDocs isn't listed in those catalogs yet — use the REST API or the Skill file instead; they cover the same operations.
github.com/hoornet/agentdocs-mcp · npmjs.com/package/agentdocs-mcp
The Agent-Friendly Raw Endpoint
The raw endpoint is the recommended way to give AI agents access to your documentation. It returns pure Markdown text with YAML frontmatter — no HTML, no JSON wrapping, no authentication required.
GET /api/shared/{token}/rawResponse Format
The response is plain text (Content-Type: text/markdown; charset=utf-8) with the following structure:
--- title: Deployment Guide shared_via: AgentDocs last_updated: 2025-01-15T10:30:00.000Z --- # Deployment Guide This guide covers how to deploy the application to production. ## Prerequisites - Docker 20.10+ - Kubernetes 1.25+ - Access to the container registry ## Steps 1. Build the container image: ```bash docker build -t myapp:latest . ``` 2. Push to the registry: ```bash docker push registry.example.com/myapp:latest ``` 3. Apply the Kubernetes manifests: ```bash kubectl apply -f k8s/ ```
YAML Frontmatter Fields
| Field | Type | Description |
|---|---|---|
| title | string | The page title as set by the author |
| shared_via | string | Always "AgentDocs" — useful for source attribution |
| last_updated | ISO 8601 | When the page was last modified |
ℹ️ No authentication required. The share token in the URL is all that's needed. This makes it trivial to paste the URL into an agent's system prompt, tool definition, or configuration file.
Getting the Agent Link
The easiest way to get an agent-friendly URL:
Create a share link
Right-click a page in the sidebar and select "Share", or use the share button in the editor toolbar.
Click the 🤖 "Copy agent link" button
In the share dialog, you'll see a robot icon button next to the standard copy button. Click it to copy the /api/shared/:token/raw URL to your clipboard.
Paste into your agent's config
Use the URL in your agent's system prompt, tool definition, MCP server config, or wherever it needs to access documentation.
Example: Fetching from the Command Line
# Fetch the raw markdown for a shared page curl https://agentdocs.eu/api/shared/abc123def456.../raw # Response: # --- # title: Deployment Guide # shared_via: AgentDocs # last_updated: 2025-01-15T10:30:00.000Z # --- # # # Deployment Guide # ... # You can also pipe it directly to other tools: curl -s https://agentdocs.eu/api/shared/abc123.../raw | head -20
Practical Examples
Feeding Docs to Claude / ChatGPT
You can include an AgentDocs raw URL in your AI assistant's system prompt or tool definition to give it access to always-up-to-date documentation:
# In a system prompt or instruction set: You have access to our deployment documentation. Fetch the latest version from: https://agentdocs.eu/api/shared/abc123def456/raw Use this documentation to answer questions about deployment procedures, troubleshooting, and configuration.
Using in MCP Tool Definitions
If your agent framework supports tools/functions, you can define a tool that fetches doc pages:
{
"name": "get_deployment_docs",
"description": "Fetch the latest deployment documentation from AgentDocs",
"parameters": {},
"implementation": {
"type": "http",
"method": "GET",
"url": "https://agentdocs.eu/api/shared/abc123def456/raw"
}
}CI/CD Pipeline Integration
Pull documentation into your build pipelines, test suites, or deployment scripts:
# GitHub Actions example
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Fetch deployment runbook
run: |
curl -s https://agentdocs.eu/api/shared/abc123.../raw \
> docs/runbook.md
- name: Validate against runbook
run: |
# Parse the markdown and check deployment prerequisites
python scripts/validate_deployment.py docs/runbook.mdPython Script Example
import requests
def fetch_agentdocs_page(share_token: str) -> dict:
"""Fetch a page from AgentDocs and parse the frontmatter."""
url = f"https://agentdocs.eu/api/shared/{share_token}/raw"
response = requests.get(url)
response.raise_for_status()
text = response.text
# Parse YAML frontmatter
if text.startswith("---"):
parts = text.split("---", 2)
import yaml
metadata = yaml.safe_load(parts[1])
content = parts[2].strip()
return {"metadata": metadata, "content": content}
return {"metadata": {}, "content": text}
# Usage:
page = fetch_agentdocs_page("abc123def456")
print(f"Title: {page['metadata']['title']}")
print(f"Updated: {page['metadata']['last_updated']}")
print(f"Content length: {len(page['content'])} chars")Full API Access with API Tokens
If your agent needs to create, update, or delete pages (not just read them), it needs an API token for authenticated access to the full REST API.
Read vs. Write access:
- Read-only → Use share links + raw endpoint (no auth needed)
- Read + Write → Use API token with
Authorization: Token <api_token>
# Authenticate with an API token
curl https://agentdocs.eu/api/workspaces \
-H "Authorization: Token your_api_token_here"
# Create a page programmatically
curl -X POST https://agentdocs.eu/api/spaces/SPACE_ID/pages \
-H "Authorization: Token your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Auto-generated Changelog",
"slug": "changelog-2025-01-15",
"content": "# Changelog\n\n## v2.1.0\n- Added new feature X\n- Fixed bug Y"
}'
# Update an existing page
curl -X PUT https://agentdocs.eu/api/pages/PAGE_ID \
-H "Authorization: Token your_api_token_here" \
-H "Content-Type: application/json" \
-d '{"content": "# Updated content..."}'Learn how to get your API token in the API Authentication guide.
Webhook Notifications
Instead of polling for changes, configure webhooks to get notified instantly when documentation changes. This is ideal for agents that need to stay in sync with the latest docs.
# When a page is updated, your webhook receives:
{
"event": "page.updated",
"timestamp": "2025-01-15T10:30:00.000Z",
"workspace_id": "...",
"data": {
"page_id": "...",
"title": "Deployment Guide",
"space_id": "...",
"updated_by": "alice@example.com"
}
}Your agent can receive the webhook, then fetch the latest content via the raw endpoint or API. Read more in the Webhooks guide.
Integration Summary
| Use Case | Method | Auth |
|---|---|---|
| Agent reads a doc page | GET /api/shared/:token/raw | None (share token) |
| Agent creates/updates pages | POST/PUT /api/pages/... | API Token |
| Agent lists workspaces/spaces | GET /api/workspaces/... | API Token |
| Agent gets notified of changes | Webhook POST to your URL | HMAC signature |
Agent Skill Files
AgentDocs ships with ready-made skill files that let your agent discover and use the full API instantly — no manual configuration needed.
/llms.txt — Quick Start
Point any AI agent at this URL. 60-line overview with auth instructions, key endpoints, and a link to the full reference. Follows the emerging llms.txt standard.
curl https://agentdocs.eu/llms.txt
/llms-full.txt — Complete API Reference
Every endpoint, every field, with request/response examples. 500+ lines covering auth, workspaces, spaces, pages, share links, comments, webhooks, members, search, Socket.IO, and more.
curl https://agentdocs.eu/llms-full.txt
/agentdocs-skill.md — Claude Custom Skill
Download this file and upload it to Claude as a custom skill. Claude will automatically know how to read, create, update, search, and share your docs. Drag, drop, done.
How to use: In Claude, go to Skills → Upload Skill → drag in the agentdocs-skill.md file. Then just ask Claude to work with your docs.
Also works in Claude Code — install instructions are inside the file.
💡 Tip: These files are served as plain text with no authentication required. Any agent, LLM, or automation tool can fetch them with a simple HTTP GET.