docsapi

Making docs AI-readable. So sue me.
(Please don't actually sue me)

Need structured docs for an LLM? docsapi turns doc sites into clean Markdown.

Many documentation sites are JavaScript-heavy or fragmented across generators. docsapi fetches the page, extracts the content, and returns Markdown.

Apple Docs are supported as a docset type, alongside common generators like MkDocs, Sphinx, Docusaurus, TypeDoc, and more.

Apple Docs via /api (docset: apple)

Append the raw Apple docs URL to /api/:

Original
https://​developer.apple.com​/​documentation​/​swift​/​array
AI-readable
https://​docsapi.xo.vg​/​api​/​https://​developer.apple.com​/​documentation​/​swift​/​array

Generic Docs API

Append any doc URL to /api/:

https://​docsapi.xo.vg​/​api​/​https://​docs.rs​/​serde​/​latest​/​serde​/

Set Accept: application/json to receive { url, content }. Inputs ending in .html are normalized.

Examples

Local docs admin: /local-docs (password required).

MCP Usage

Connect your MCP client to https://docsapi.xo.vg/mcp.

GitHub Copilot for Xcode

  1. Open GitHub Copilot for Xcode and go to Settings…
  2. Select the MCP tab
  3. Click Edit Config Edit Config
  4. Enter the following configuration:
{
  "servers": {      "docsapi": {
      "type": "http",
      "url": "https://docsapi.xo.vg/mcp"
    }  }
}

For more information, see the GitHub Copilot for Xcode README.

Cursor

Click the button below to automatically install the docsapi MCP server:

Add docsapi MCP server to Cursor

For more information, see the Cursor documentation.

VSCode

Create a .vscode/mcp.json file in your workspace and enter the following configuration:

{
  "servers": {      "docsapi": {
      "type": "http",
      "url": "https://docsapi.xo.vg/mcp"
    }  }
}

For more information, see the VSCode documentation.

Claude Desktop

  1. Open Claude Desktop
  2. Go to Settings → Connectors
  3. Click "Add custom connector"
  4. Set "Name" to docsapi
  5. Set "Remote MCP server URL" to https://docsapi.xo.vg/mcp
  6. Click "Add"

See the Claude Desktop documentation for more information.

Claude Code

Run the following command in your terminal:

claude mcp add --transport http docsapi https://docsapi.xo.vg/mcp

For more information, see the Claude Code MCP documentation.

Codex

Codex reads MCP servers from ~/.codex/config.toml. Add a table like:

[mcp_servers.docsapi]
url = "https://docsapi.xo.vg/mcp"

Other MCP Clients

docsapi's MCP server supports Streamable HTTP and Server-Sent Events (SSE) transport. If your client supports either of these, configure it to connect directly to https://docsapi.xo.vg/mcp.

Otherwise, you can run this command to proxy over stdio:

{
  "mcpServers": {
    "docsapi": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://docsapi.xo.vg/mcp"
      ]
    }  }
}

Available Resources

  • doc://{url}
    Documentation at a full URL, rendered as Markdown
    Example: doc://https://developer.apple.com/documentation/swift/array
    Example: doc://https://docs.rs/serde/latest/serde/

Available Tools

  • searchAppleDocumentation
    Searches Apple Developer documentation
    Parameters: query (string)
    Returns structured results with titles, URLs, descriptions, breadcrumbs, and tags
  • fetchAppleDocumentation
    Fetches Apple Developer documentation and Human Interface Guidelines by path
    Parameters: path (string) - Documentation path (e.g., '/documentation/swift', 'design/human-interface-guidelines/foundations/color')
    Returns content as Markdown
  • fetchDocumentation
    Fetches documentation from any base URL with docset auto-detection
    Parameters: baseUrl (string), path (optional), docsetType (optional)
    Returns content as Markdown and includes docsetType metadata
  • searchDocumentation
    Basic search for common docset generators
    Parameters: baseUrl (string), query (string), docsetType (optional)
    Returns structured results with titles and URLs

Troubleshooting

If you're experiencing connection timeouts or network issues with the MCP server, you may need to configure a proxy. This is particularly common in corporate environments or regions with restricted internet access.

Configure your MCP client to use a proxy by adding environment variables:

{
  "mcpServers": {
    "docsapi": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://docsapi.xo.vg/mcp"
      ],
      "env": {
        "HTTP_PROXY": "http://proxy.example.com:8080",
        "HTTPS_PROXY": "http://proxy.example.com:8080"
      }
    }  }
}

Replace proxy.example.com:8080 with your actual proxy server details. For authenticated proxies, use the format: http://username:[email protected]:8080