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

# MCP Server

> Connect Claude Code, Cursor, and other AI coding assistants to the Webacy MCP server endpoint for inline blockchain risk analysis on addresses and tokens.

The Webacy API exposes an [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that lets AI coding assistants like Claude Code and Cursor query blockchain risk data directly from your development environment.

Instead of switching to a browser or writing API calls manually, you can ask your AI assistant questions like *"Analyze the risk of 0x742d..."* and get real-time results inline.

## Prerequisites

* An API key from [developers.webacy.co](https://developers.webacy.co/)

<Warning>
  Keep your API key secret. Never commit it to version control.
</Warning>

## Installation

### Claude Code

Add the Webacy MCP server using the CLI:

```bash theme={null}
claude mcp add webacy-mcp --transport http https://api.webacy.com/mcp --header "x-api-key: YOUR_API_KEY"
```

Or add it manually to your `.claude/mcp.json` file:

```json theme={null}
{
  "mcpServers": {
    "webacy-mcp": {
      "type": "http",
      "url": "https://api.webacy.com/mcp",
      "headers": {
        "x-api-key": "YOUR_API_KEY"
      }
    }
  }
}
```

### Cursor

Open Cursor Settings and navigate to **MCP Servers**. Click **Add Server** and configure:

```json theme={null}
{
  "mcpServers": {
    "webacy-mcp": {
      "url": "https://api.webacy.com/mcp",
      "headers": {
        "x-api-key": "YOUR_API_KEY"
      }
    }
  }
}
```

### Other MCP Clients

Any MCP client that supports HTTP Streamable transport can connect to the Webacy MCP server. Use the following configuration:

| Setting         | Value                        |
| --------------- | ---------------------------- |
| **URL**         | `https://api.webacy.com/mcp` |
| **Transport**   | HTTP Streamable              |
| **Auth Header** | `x-api-key: YOUR_API_KEY`    |

## Available Tools

The MCP server exposes three tools for blockchain risk analysis:

### `get_address_risk`

Analyze the risk profile of a blockchain address (wallet or contract). Returns risk score, risk factors, and detailed security analysis.

| Parameter           | Type      | Required | Description                                    |
| ------------------- | --------- | -------- | ---------------------------------------------- |
| `address`           | string    | Yes      | The blockchain address to analyze              |
| `chain`             | string    | Yes      | Blockchain network (e.g. `eth`, `sol`, `base`) |
| `detailed_response` | boolean   | No       | Include detailed risk factor breakdowns        |
| `show_low_risk`     | boolean   | No       | Include low-risk factors in the response       |
| `modules`           | string\[] | No       | Specific risk analysis modules to run          |

### `get_token_risk`

Analyze the risk profile of a token contract. Returns token security flags, market data, and economic risk indicators.

| Parameter      | Type      | Required | Description                                     |
| -------------- | --------- | -------- | ----------------------------------------------- |
| `address`      | string    | Yes      | The token contract address to analyze           |
| `chain`        | string    | Yes      | Blockchain network (e.g. `eth`, `sol`, `base`)  |
| `metrics_date` | string    | No       | Date for historical metrics (DD-MM-YYYY format) |
| `modules`      | string\[] | No       | Specific risk analysis modules to run           |

### `get_holder_analysis`

Analyze the holder distribution and concentration of a token. Returns top holders, holder counts, and distribution metrics.

| Parameter         | Type    | Required | Description                                      |
| ----------------- | ------- | -------- | ------------------------------------------------ |
| `address`         | string  | Yes      | The token contract address to analyze            |
| `chain`           | string  | No       | Blockchain network (defaults to `sol`)           |
| `disable_refetch` | boolean | No       | Skip re-fetching data and use existing data only |
| `refresh_cache`   | boolean | No       | Force refresh cached holder data                 |

## Supported Chains

The `chain` parameter accepts: `eth`, `sol`, `arb`, `pol`, `opt`, `base`, `bsc`, `ton`, `sui`, `stellar`, `btc`, `sei`, `hedera`.

<Tip>
  See [Supported Blockchains](/essentials/supported-blockchains) for full details on each chain.
</Tip>

## Example Usage

Once configured, you can query Webacy risk data directly from your AI assistant:

```text theme={null}
You:    Analyze the risk of 0x742d35Cc6634C0532925a3b844Bc454e4438f44e on Ethereum

Claude: I'll check the risk profile using the Webacy MCP tools...

        The address has an overall risk score of 25.99/100 (low risk).
        No high-severity issues were found. The address is an EOA (not a contract).
```

You can also analyze tokens and holder distributions:

```text theme={null}
You:    What's the token risk for USDC on Ethereum (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)?

You:    Show me the holder analysis for this Solana token: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
```

## Next Steps

<CardGroup cols={3}>
  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Explore all available endpoints
  </Card>

  <Card title="SDK" icon="code" href="/sdk/introduction">
    Use the TypeScript SDK for programmatic access
  </Card>

  <Card title="Risk Levels" icon="shield" href="/essentials/risk-levels">
    Understand how to interpret risk scores
  </Card>
</CardGroup>
