Skip to main content
Allium MCP Server is currently in Beta. We are constantly improving our MCP Server and adding new features. If you have any feedback or suggestions, please reach out to us at support@allium.so or share your thoughts or suggestions via this feedback form.
The Allium MCP Server lets your AI agents query blockchain data using structured tool calls—no REST or custom glue code required. Agents can run saved Explorer queries, execute raw SQL, and introspect Allium schemas via the Model Context Protocol (MCP). Endpoint: https://mcp.allium.so

Available Tools

Tool NameDescription
explorer_run_queryRun a saved Explorer query using its query_id. Supports parameterization
explorer_run_sqlRun raw SQL directly against Allium’s production datasets
explorer_search_schemasSemantic search across all schema docs. Returns relevant table IDs
explorer_fetch_schemaFetch YAML schema metadata by table IDs (full table name, e.g. ethereum.raw.blocks)
Schema IDs match full table names (e.g. ethereum.raw.token_transfers). Use search before fetching.

Authentication

All tools require an API key via HTTP header:
X-API-KEY: <your-api-key>
Generate and manage API keys at app.allium.so/settings/api-keys.

Tool Usage

Run Saved Queries

Execute queries created in the Allium Explorer UI.
1

Save Your Query

Create and save a query in Explorer to obtain its query_id.
2

Call the Tool

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "explorer_run_query",
    "arguments": {
      "query_id": "<YOUR_QUERY_ID>"
      // "parameters": { "param": "value" } // optional
    }
  }
}
Response includes:
  • sql - Full query text
  • data - Result rows
  • meta.columns - Column names and types
  • queried_at - Execution timestamp

Run Raw SQL

Execute ad-hoc SQL queries directly:
{
  "name": "explorer_run_sql",
  "arguments": {
    "sql": "SELECT COUNT(*) FROM ethereum.raw.transactions"
  }
}
Supports up to 250,000 rows per query by default.

Explore Schemas

  • Search Schemas
  • Fetch Schema
Find relevant tables using semantic search:
{
  "name": "explorer_search_schemas",
  "arguments": {
    "query": "erc20 token transfers"
  }
}
Returns:
["ethereum.raw.token_transfers", "ethereum.unified.transfers", ...]

Agent Integration

LangGraph / LangChain

Register tools in your agent configuration:
{
  "tools": [
    {
      "name": "explorer_run_query",
      "server": "https://mcp.allium.so",
      "headers": {
        "X-API-KEY": "<YOUR_API_KEY>"
      }
    },
    {
      "name": "explorer_run_sql",
      "server": "https://mcp.allium.so",
      "headers": {
        "X-API-KEY": "<YOUR_API_KEY>"
      }
    }
  ]
}
Add explorer_fetch_schema and explorer_search_schemas the same way.

mcp-remote / Local CLI

For streamable-http or other CLI-based setups:
{
  "mcpServers": {
    "allium": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.allium.so",
        "--header",
        "X-API-KEY:${API_KEY}"
      ],
      "env": {
        "API_KEY": "<your-api-key>"
      }
    }
  }
}
This enables local agent tool streaming with auth injected from environment variables.

Response Format

All query tools return a JSON-RPC result:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": {
      "text": "{\"sql\": \"SELECT ...\", \"data\": [...], \"meta\": {\"columns\": [...]}, \"queried_at\": \"2025-07-01T00:00:00Z\"}"
    }
  }
}
Parse content.text as JSON to extract:
  • sql - Full query string
  • data - List of result rows (objects)
  • meta.columns - Each column’s name and data type
  • queried_at - ISO timestamp
I