A Model Context Protocol (MCP) server for interacting with AR.IO gateways.
- Fetch raw transaction data with range requests
- Get gateway information (for default or any specific gateway by hostname)
- List all AR.IO gateways across networks (mainnet, testnet)
- Execute GraphQL queries
- Retrieve ArNS records with filtering and sorting options
- Query Arweave Name Tokens (ANTs) for various data points
- Query Parquet files using SQL via DuckDB integration
- Uses STDIO transport for integration with MCP-compatible LLMs
# Clone the repository
git clone https://github.com/djwhitt/ar-io-example-mcp.git
cd ar-io-example-mcp
# Install dependencies
yarn install
# Create .env file
cp .env.example .env
# Edit .env to set your preferred AR.IO gateway URL
# Start the server in development mode (with auto-reload)
yarn dev
# Start the server in production mode
yarn start
Configure the gateway URL by setting the AR_IO_GATEWAY_URL
environment variable:
AR_IO_GATEWAY_URL=https://arweave.net
Configure the Parquet files location by setting the PARQUET_DIRECTORY
environment variable:
PARQUET_DIRECTORY=/path/to/your/parquet/files
By default, the server looks for Parquet files in the data/parquet/tags
directory relative to the project root.
The server provides the following resources and tools:
transaction://{txId}
- Retrieve transaction data by transaction IDgraphql://{query}
- Execute a GraphQL querygateways://{network}
- List all gateways for a specific network (mainnet, testnet)gateway://{hostname}
- Get information about a specific gateway by hostnamearns://{network}
- Retrieve ArNS records for a specific network with optional filteringant://{processId}/{action}
- Query Arweave Name Token (ANT) data by process IDant://versions
- Get all available ANT versionsant://latest-version
- Get the latest ANT versionparquet://{query}
- Execute SQL queries against Parquet files
fetch-raw-transaction
- Fetch transaction data by transaction IDget-gateway-info
- Get information about the configured gatewayget-gateway-info-by-hostname
- Get information about a specific gateway by hostnameexecute-graphql
- Execute a GraphQL querylist-gateways
- List all AR.IO gateways for a specified networkget-arns-records
- Retrieve ArNS records with optional pagination and sortingget-ant-info
- Get ANT information by process IDget-ant-state
- Get ANT state (including records) by process IDget-ant-records
- Get all records for an ANT by process IDget-ant-record
- Get a specific ANT record by undernameget-ant-versions
- Get all available ANT versionsget-latest-ant-version
- Get the latest ANT versionquery-parquet
- Execute SQL queries against Parquet filesget-parquet-schema
- Get schema information about Parquet files
The server integrates with DuckDB to provide SQL query capabilities for Parquet files:
- Query Parquet files using standard SQL via the
query-parquet
tool - Get schema information and sample data via the
get-parquet-schema
tool - Access Parquet data through the
parquet://{query}
resource
The Parquet query functionality automatically handles BigInt serialization, ensuring that large numeric values are properly converted to strings in the JSON response.
The server provides comprehensive support for querying ANTs:
- Get basic ANT information like name, ticker, and owner
- Retrieve full ANT state including records
- Query specific records by undername
- Access ANT versions information
- Multiple resources and tools available for different query patterns
# Run tests
yarn test
# Run a specific test
yarn test:single "test name pattern"
# Lint code
yarn lint
# Format code
yarn format
MIT