> ## Documentation Index
> Fetch the complete documentation index at: https://docs.etherscan.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Docs MCP

> Let AI agents search the Etherscan API documentation directly through MCP.

The Docs MCP server lets an AI agent search and read this documentation, so it can find the right endpoint, its parameters, and an example before writing code or making a call. It is the knowledge counterpart to the [Etherscan MCP](/build-with-ai/mcp): one answers questions about the API, the other returns live onchain data.

<Note>
  Docs MCP is for AI agents that search these docs while they build. No API key is needed, since it only reads public documentation.
</Note>

## Connection details

Point your MCP client at the server with these values. For guided, per-client setup, see Get started below.

```
https://docs.etherscan.io/mcp
```

* **Transport:** Streamable HTTP.
* **Authentication:** none. The server reads only public documentation.

## Get started

Pick your client below and follow it end to end.

<Tabs>
  <Tab title="Claude Desktop">
    [Claude Desktop](https://claude.ai/download) is Anthropic's desktop chat app.

    <Steps>
      <Step title="Add Docs MCP to your config">
        In Claude Desktop, open **Settings > Developer > Edit Config** to open the `claude_desktop_config.json` file.

        <Frame>
          <img src="https://mintcdn.com/etherscan/PrmCI8xWhLgr8YZ-/images/claude-desktop-config.png?fit=max&auto=format&n=PrmCI8xWhLgr8YZ-&q=85&s=97b14a68ffd5123bd9077e3070f83268" alt="Claude Desktop Settings > Developer, showing the Edit Config button" data-og-width="1510" width="1510" data-og-height="765" height="765" data-path="images/claude-desktop-config.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/etherscan/PrmCI8xWhLgr8YZ-/images/claude-desktop-config.png?w=280&fit=max&auto=format&n=PrmCI8xWhLgr8YZ-&q=85&s=a379ade714cc837368392706e0813453 280w, https://mintcdn.com/etherscan/PrmCI8xWhLgr8YZ-/images/claude-desktop-config.png?w=560&fit=max&auto=format&n=PrmCI8xWhLgr8YZ-&q=85&s=693ec8e5ea7d4359363a900c388b60c0 560w, https://mintcdn.com/etherscan/PrmCI8xWhLgr8YZ-/images/claude-desktop-config.png?w=840&fit=max&auto=format&n=PrmCI8xWhLgr8YZ-&q=85&s=ff1b4a24d4beb712a57409719e2c9457 840w, https://mintcdn.com/etherscan/PrmCI8xWhLgr8YZ-/images/claude-desktop-config.png?w=1100&fit=max&auto=format&n=PrmCI8xWhLgr8YZ-&q=85&s=8e688593e9752bc98f648bfc6108dd8a 1100w, https://mintcdn.com/etherscan/PrmCI8xWhLgr8YZ-/images/claude-desktop-config.png?w=1650&fit=max&auto=format&n=PrmCI8xWhLgr8YZ-&q=85&s=6130098fc53a2ed4ff7e64c6e6aa1b45 1650w, https://mintcdn.com/etherscan/PrmCI8xWhLgr8YZ-/images/claude-desktop-config.png?w=2500&fit=max&auto=format&n=PrmCI8xWhLgr8YZ-&q=85&s=e1d707ff0216b27a710ead51ca5edac1 2500w" />
        </Frame>

        In the file that opens, add the `etherscan-docs` server:

        ```json claude_desktop_config.json theme={null}
        {
          "mcpServers": {
            "etherscan-docs": {
              "command": "npx",
              "args": [
                "-y",
                "mcp-remote",
                "https://docs.etherscan.io/mcp"
              ]
            }
          }
        }
        ```

        Requires [Node.js](https://nodejs.org).
      </Step>

      <Step title="Confirm it's connected">
        Save, then fully quit Claude Desktop and reopen it. Open **Settings > Developer** and look for `etherscan-docs` under Local MCP servers with a **running** badge.

        <Frame>
          <img src="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-connected.png?fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=785870faf06f948b04ccde458b47fd35" alt="Claude Desktop Settings > Developer showing the etherscan-docs MCP server with a running badge" data-og-width="2284" width="2284" data-og-height="1078" height="1078" data-path="images/docs-mcp-claude-desktop-connected.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-connected.png?w=280&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=ce525a41259e8d0654e8aa6586979b2b 280w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-connected.png?w=560&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=9f48d50f60b4e3044b9e907d24819d5f 560w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-connected.png?w=840&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=ba8c370c7e1d81a652a1eb499b6907ce 840w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-connected.png?w=1100&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=9d6cc7a0b10e0f478b8f4e377d585d9e 1100w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-connected.png?w=1650&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=1a27769518cf37e470cc229b49bc686d 1650w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-connected.png?w=2500&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=259a9a6f6d2433d1c36e12bed02beb55 2500w" />
        </Frame>
      </Step>

      <Step title="Ask the docs">
        Ask a documentation question and let the agent search these pages:

        ```text theme={null}
        Which Etherscan endpoint returns an address's ERC-20 token balances, and what parameters does it take?
        ```

        It calls `search_etherscan` to find the `account` module's `addresstokenbalance` action, reads its parameters and example, and answers with the correct request shape instead of guessing.

        <Frame>
          <img src="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-desktop-ask.png?fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=8fce87a847041802218f15b001a9c3e2" alt="Claude Desktop answering a documentation question via the Etherscan Docs MCP, citing the addresstokenbalance action" width="1894" height="1528" data-path="images/docs-mcp-claude-desktop-ask.png" />
        </Frame>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Claude Code CLI">
    [Claude Code](https://code.claude.com/docs/en/quickstart#step-1-install-claude-code) is Anthropic's coding assistant that runs in your terminal.

    <Steps>
      <Step title="Add the server">
        Run this in your terminal:

        ```bash theme={null}
        claude mcp add --transport http etherscan-docs https://docs.etherscan.io/mcp
        ```
      </Step>

      <Step title="Confirm it's connected">
        Check the server's status and look for `Status: ✔ Connected`:

        ```bash theme={null}
        claude mcp get etherscan-docs
        ```
      </Step>

      <Step title="Ask the docs">
        Start a Claude Code session by running `claude`, then ask a documentation question:

        ```text theme={null}
        Which Etherscan endpoint returns an address's ERC-20 token balances, and what parameters does it take?
        ```

        It calls `search_etherscan` to find the `account` module's `addresstokenbalance` action, reads its parameters and example, and answers with the correct request shape instead of guessing.

        <Frame>
          <img src="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-claude-code-ask.png?fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=69a7f61baeb9ffd443158eb2a3f1b8c0" alt="Claude Code answering a documentation question via the Etherscan Docs MCP, citing the addresstokenbalance action" width="2126" height="1234" data-path="images/docs-mcp-claude-code-ask.png" />
        </Frame>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Codex Desktop">
    Codex Desktop is the ChatGPT desktop app running OpenAI's [Codex](https://developers.openai.com/codex) agent, which can connect to MCP servers.

    <Steps>
      <Step title="Add the server">
        In Codex Desktop, open **Settings > Plugins > Add > Add MCP Server**.

        <Frame>
          <img src="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-mcp.png?fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=6aa70b57fd4507ee6c7002f546396d75" alt="Codex Desktop Settings > Plugins showing the MCP servers list and the Add server button" data-og-width="2570" width="2570" data-og-height="1780" height="1780" data-path="images/docs-mcp-codex-desktop-mcp.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-mcp.png?w=280&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=7fdc85f66eb43e7c75e5ef16c0568ef4 280w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-mcp.png?w=560&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=26c50aa8c8f64cba97417a7d82fa35ff 560w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-mcp.png?w=840&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=8f391c82afaea07ff1f2908e7d24db8a 840w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-mcp.png?w=1100&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=ffd42b94984181838ab84a0848e83abb 1100w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-mcp.png?w=1650&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=7de4397af6090123393cd1efabdfb946 1650w, https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-mcp.png?w=2500&fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=83171e304ce447e80497e8efae3f14a1 2500w" />
        </Frame>

        Enter the following details:

        * **Name:** Etherscan Docs
        * **Type:** Streamable HTTP
        * **URL:** `https://docs.etherscan.io/mcp`

        No headers or authentication are required.
      </Step>

      <Step title="Confirm it's connected">
        Save, then fully quit Codex Desktop and reopen it. Run `/mcp` and confirm that `etherscan-docs` is listed as an enabled server.

        <Frame>
          <img src="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-connected.png?fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=3f7517c8197d723e6c242c77dbe5f4f6" alt="Codex Desktop showing the etherscan-docs MCP server enabled under Servers" width="1566" height="760" data-path="images/docs-mcp-codex-desktop-connected.png" />
        </Frame>
      </Step>

      <Step title="Ask the docs">
        Ask a documentation question:

        ```text theme={null}
        Which Etherscan endpoint returns an address's ERC-20 token balances, and what parameters does it take? use mcp
        ```

        It calls `search_etherscan` to find the `account` module's `addresstokenbalance` action, reads its parameters and example, and answers with the correct request shape instead of guessing.

        <Frame>
          <img src="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-desktop-ask.png?fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=5d7232de0e18d9643a4311733381f429" alt="Codex Desktop answering a documentation question via the Etherscan Docs MCP, citing the addresstokenbalance action" width="1534" height="1030" data-path="images/docs-mcp-codex-desktop-ask.png" />
        </Frame>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Codex CLI">
    [Codex CLI](https://learn.chatgpt.com/docs/codex/cli#getting-started) is OpenAI's coding agent in your terminal.

    <Steps>
      <Step title="Add the server">
        Run this in your terminal:

        ```bash theme={null}
        codex mcp add etherscan-docs --url https://docs.etherscan.io/mcp
        ```
      </Step>

      <Step title="Confirm it's connected">
        Check the server and look for `enabled: true`:

        ```bash theme={null}
        codex mcp get etherscan-docs
        ```
      </Step>

      <Step title="Ask the docs">
        Start a Codex session by running `codex`, then ask a documentation question:

        ```text theme={null}
        Which Etherscan endpoint returns an address's ERC-20 token balances, and what parameters does it take? use mcp
        ```

        It calls `search_etherscan` to find the `account` module's `addresstokenbalance` action, reads its parameters and example, and answers with the correct request shape instead of guessing.

        <Frame>
          <img src="https://mintcdn.com/etherscan/gQgGvAy4c7P5bXEP/images/docs-mcp-codex-cli-ask.png?fit=max&auto=format&n=gQgGvAy4c7P5bXEP&q=85&s=9a1c877fd946bd7b00979760b7bed66d" alt="Codex CLI answering a documentation question via the Etherscan Docs MCP, citing the addresstokenbalance action" width="2128" height="676" data-path="images/docs-mcp-codex-cli-ask.png" />
        </Frame>
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Example prompts

Ask a documentation question and let the agent search these pages. Copy one to try it:

```text theme={null}
How do I verify a contract's source code through the API, and how do I check the verification status?
```

```text theme={null}
What is the difference between the txlist and txlistinternal actions?
```

```text theme={null}
How does pagination work, and what is the maximum number of records per call?
```

```text theme={null}
Which chains are supported, and how do I switch chains in a request?
```

## Tools

The server exposes 3 tools. The agent selects and calls them for you.

| Tool                              | Returns                                                                         |
| --------------------------------- | ------------------------------------------------------------------------------- |
| `search_etherscan`                | Relevant documentation for a query: endpoints, parameters, examples, and guides |
| `query_docs_filesystem_etherscan` | Results of a read-only query over a virtual filesystem of the docs              |
| `submit_feedback`                 | Confirmation that a reported docs problem was sent to the docs team             |

## Good to know

* **No API key.** The server reads only public documentation, so no key or auth header is needed.
* **Read-only, with one exception.** The search and query tools only read the docs. `submit_feedback` sends a report to the docs team. Nothing else writes.
* **Pair it with the data tools.** The Docs MCP finds the right call. The [Etherscan MCP](/build-with-ai/mcp) or [CLI](/build-with-ai/cli) makes it.
* **Guard against prompt injection.** Enable your client's confirmation prompts, and be cautious when combining Docs MCP with other MCP servers in the same session.

<Tip>
  No MCP client? You can point an agent at any docs page in Markdown by appending `.md` to its URL, or load the [`llms.txt`](https://docs.etherscan.io/llms.txt) index, with the complete export at [`llms-full.txt`](https://docs.etherscan.io/llms-full.txt).
</Tip>
