Use the Allium MCP server to run Explorer queries from agent workflows.
mcp.allium.so
) implements Anthropic’s Model Context Protocol (MCP) to enable large language model agents to call Allium Explorer as a tool. This lets you integrate Allium’s blockchain data queries into AI-powered workflows. Agents can execute saved Explorer queries by ID and retrieve results in real time via standardized JSON tool calls, without needing to manually hit REST endpoints.
explorer_run_query
tool. This tool executes a saved SQL query (identified by its unique query_id
) and returns the query results. The typical flow is:
query_id
(each saved query has a unique ID).https://mcp.allium.so
and include your Allium API key (see Authentication below).explorer_run_query
: Invoke the MCP method tools/call
with name: "explorer_run_query"
and supply the query_id
. If the query is parameterized, include a parameters
object with the required values (this is optional if your query has no placeholders).<YOUR_QUERY_ID>
with the ID of your saved query. If the query requires parameters, add a "parameters"
field under "arguments"
(as shown in the comment) with the appropriate key-value pairs for your query.
X-API-KEY
when establishing the MCP connection or making requests. You can obtain an API key from the Allium Explorer interface (via Settings or the Explorer API page). Without a valid API key, the MCP server will reject incoming tool calls.
explorer_run_query
, the result will be in the content.text
field of the MCP response. For example, a response might look like:
content.text
is a JSON string containing the query results and metadata. In this example, the string (when parsed as JSON) includes the executed SQL (sql
), the result rows under data
(here a list of objects with a count
field), column definitions in meta.columns
, and a timestamp (queried_at
). Your agent should parse this JSON string to access the actual data. By default, results are limited to 250,000 rows per query (you can set a lower row limit via the API if needed).
explorer_run_query
tool to your agent:
mcp.allium.so
with the provided API key and load the explorer_run_query
tool. Once loaded, the agent can call Explorer queries by using this tool in its prompts or plans. The tool invocation and response are handled through MCP, so the agent receives structured data (as shown above) which it can parse and utilize in its reasoning.
Note: If you are using a custom MCP client or LangChain’s MCP adapter, ensure you initialize the MCP connection to https://mcp.allium.so
and include the X-API-KEY
header. The explorer_run_query
tool will be discoverable via the MCP server’s tools/list
and ready to use in your agent’s tool set.
mcp-agent
or mcp-remote
, you can configure the Allium MCP server as follows:
allium-mcp
using mcp-remote
. It authenticates with the Allium MCP server using an environment variable API_KEY
. Replace the placeholder with your actual Allium API key. This allows the agent runtime to stream tool calls to Allium securely and without manual key injection.
explorer_run_query
).