- Home
- MCP servers
- Token Info
Token Info
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"0xwuchuan-token-info-mcp": {
"command": "python",
"args": [
"/absolute/path/to/token_info_server.py"
],
"env": {
"GOERLI_RPC_URL": "https://eth-goerli.g.alchemy.com/v2/your-api-key",
"DEFAULT_RPC_URL": "https://eth.llamarpc.com",
"MAINNET_RPC_URL": "https://eth.llamarpc.com",
"POLYGON_RPC_URL": "https://polygon-mainnet.g.alchemy.com/v2/your-api-key",
"SEPOLIA_RPC_URL": "https://eth-sepolia.g.alchemy.com/v2/your-api-key",
"ARBITRUM_RPC_URL": "https://arb-mainnet.g.alchemy.com/v2/your-api-key",
"ETHERSCAN_API_KEY": "your_etherscan_api_key_here",
"RATE_LIMIT_REQUESTS_PER_SECOND": "5"
}
}
}
}You run a Python MCP server that analyzes token smart contracts to reveal proxy structures and AccessControl roles across multiple networks. It helps you understand upgradeable contracts, who has which permissions, and how those permissions change over time, all through a simple local server you start and query from an MCP client.
How to use
Start by running the local server with Python, then use an MCP client to issue tool queries. The server exposes two core tools you can use from an MCP client: get_proxy_admin for proxy and ownership analysis, and get_contract_roles for discovering and inspecting AccessControl roles. Use natural language prompts or structured calls via your MCP client to request data for specific contracts and networks.
How to install
Prerequisites you need installed on your system are Python 3.10 or newer and a working internet connection to fetch dependencies and query blockchain data.
# 1) Install Foundry (required for proxy analysis tools if you use local tooling):
curl -L https://foundry.paradigm.xyz | bash
foundryup
# 2) Prepare the Python environment and dependencies
# Create a project directory and install dependencies
# (Replace with your preferred virtual environment setup if desired)
# 3) Clone the MCP server source (replace with actual repository URL)
git clone <repository-url>
cd token-info-mcp
# 4) Install Python dependencies
pip install -r requirements.txt
# 5) Set up environment variables (see next step)
Environment variables and running the server
Create a .env file to supply API keys and RPC endpoints. The server uses an Ethereum data source and rate limiting to control request volume.
# Required
ETHERSCAN_API_KEY=your_etherscan_api_key_here
# Default RPC URL (used for mainnet)
DEFAULT_RPC_URL=https://eth.llamarpc.com
# Optional: Network-specific RPC URLs
MAINNET_RPC_URL=https://eth.llamarpc.com
GOERLI_RPC_URL=https://eth-goerli.g.alchemy.com/v2/your-api-key
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/your-api-key
POLYGON_RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/your-api-key
ARBITRUM_RPC_URL=https://arb-mainnet.g.alchemy.com/v2/your-api-key
# Rate limiting
RATE_LIMIT_REQUESTS_PER_SECOND=5
Running the server
Start the server from your project directory using Python.
python token_info_server.py
Claude Desktop integration (optional)
If you want to query the MCP server from Claude Desktop, configure the server so Claude can communicate with it.
{
"mcpServers": {
"token_info": {
"command": "python",
"args": ["/absolute/path/to/token_info_server.py"]
}
}
}
Using the tools from Claude Desktop
Once configured, you can invoke the available tools directly from Claude Desktop. The two primary tools are get_proxy_admin and get_contract_roles.
Examples of how you might prompt Claude to use these tools include asking for the complete proxy admin and ownership structure for a given contract, or querying the defined roles in a contract and their assignments.
Notes on features
-
Proxy Contract Analysis: Detects proxies, retrieves admin addresses, and maps ownership chains for upgradeable contracts across multiple proxy types.
-
AccessControl Role Discovery: Discoveres roles from contract events, tracks grants, revokes, and admin changes, and supports historical queries over block ranges.
Available tools
get_proxy_admin
Analyze a proxy contract to identify the proxy admin, determine if the admin is a ProxyAdmin contract, and map the complete ownership chain of the proxy setup.
get_contract_roles
Discover AccessControl roles defined in a contract, list current members for each role, and show grants/revokes across a specified block range.