AI & LLM Integration

Access Avalanche documentation programmatically for AI applications

The Builder Hub provides AI-friendly access to documentation through standardized formats. Whether you're building a chatbot, using Claude/ChatGPT, or integrating with AI development tools, we offer multiple ways to access our docs.

Endpoints Overview

EndpointPurpose
/llms.txtAI sitemap - structured index of all documentation
/llms-full.txtComplete docs in one file for full context loading
/api/llms/page?path=...Fetch any single page as markdown
/api/mcpMCP server for dynamic search and retrieval

llms.txt

A structured markdown index following the llms.txt standard. Use this for content discovery.

https://build.avax.network/llms.txt

Returns organized sections (Documentation, Academy, Integrations, Blog) with links and descriptions.

llms-full.txt

All documentation content in a single markdown file for one-time context loading.

https://build.avax.network/llms-full.txt

Contains 1300+ pages. For models with limited context, use the MCP server or individual page endpoint instead.

Individual Pages

Fetch any page as markdown:

https://build.avax.network/api/llms/page?path=/docs/primary-network/overview
https://build.avax.network/api/llms/page?path=/academy/blockchain-fundamentals/blockchain-intro

Supports /docs/, /academy/, /integrations/, and /blog/ paths.

MCP Server

The Model Context Protocol server enables AI systems to search and retrieve documentation dynamically.

Endpoint: https://build.avax.network/api/mcp

Tools

ToolPurpose
avalanche_docs_searchSearch docs by query with optional source filter
avalanche_docs_fetchGet a specific page by URL path
avalanche_docs_list_sectionsList all sections with page counts

Claude Code Setup

Add the MCP server to your project:

claude mcp add avalanche-docs --transport http --url https://build.avax.network/api/mcp

Or add to your .claude/settings.json:

{
  "mcpServers": {
    "avalanche-docs": {
      "transport": {
        "type": "http",
        "url": "https://build.avax.network/api/mcp"
      }
    }
  }
}

Claude Desktop Setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "avalanche-docs": {
      "transport": {
        "type": "http",
        "url": "https://build.avax.network/api/mcp"
      }
    }
  }
}

JSON-RPC Protocol

The MCP server uses JSON-RPC 2.0 for communication:

curl -X POST https://build.avax.network/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"avalanche_docs_search","arguments":{"query":"create L1","limit":5}}}'

Response format:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "[{\"title\":\"Create an L1\",\"url\":\"/docs/avalanche-l1s/create\",\"description\":\"...\",\"score\":45}]"
      }
    ]
  }
}

Search Tool Examples

Search all documentation:

curl -X POST https://build.avax.network/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "avalanche_docs_search",
      "arguments": {
        "query": "smart contracts",
        "limit": 10
      }
    }
  }'

Filter by source:

# Search only academy content
curl -X POST https://build.avax.network/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "avalanche_docs_search",
      "arguments": {
        "query": "blockchain basics",
        "source": "academy",
        "limit": 5
      }
    }
  }'

Fetch specific page:

curl -X POST https://build.avax.network/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "avalanche_docs_fetch",
      "arguments": {
        "url": "/docs/primary-network/overview"
      }
    }
  }'

Standards

Is this guide helpful?