UCAI

Generates MCP servers from contract ABIs to enable Claude to interact with any contract.
  • python

17

GitHub Stars

python

Language

4 months ago

First Indexed

2 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": {
    "nirholas-ucai": {
      "command": "python",
      "args": [
        "/Users/YOU/uniswap-server/server.py"
      ],
      "env": {
        "RPC_URL": "https://eth.llamarpc.com"
      }
    }
  }
}

You can turn any verified contract ABI or address into a ready-to-use MCP server that Claude can call to read data, simulate writes, and perform actions on a blockchain. This enables natural language queries like swapping tokens, checking reserves, or querying token balances, all backed by a safety-first MCP workflow.

How to use

You will run a generated MCP server and connect it to Claude Desktop or an equivalent MCP client. Claude can then call the server to perform reads, simulate writes, or execute transactions via the contract’s functions and events. Typical use patterns include asking for the best route for a swap, querying token balances, checking pool reserves, and simulating transactions before you commit.

How to install

Prerequisites: ensure Python is installed on your system and you can run Python commands from your shell.

  1. Generate the MCP server for your contract as shown in the examples.

  2. Install the server dependencies.

  3. Configure Claude Desktop to connect to the MCP server using the provided runtime command and environment variables.

abi-to-mcp generate 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D -o ~/uniswap-server
cd ~/uniswap-server && pip install -r requirements.txt

Additional sections

Configuration example for Claude Desktop shows how to point to the local server. You pass the server’s Python entry point and set the RPC URL used to interact with the chain.

Security and safety are built into the MCP flow: simulations precede write actions, and you can enable read-only mode to fully disable writes.

Here is a concrete server connection example you can adapt. Replace the address with your local path and the RPC URL with your preferred endpoint.

{
  "mcpServers": {
    "uniswap": {
      "command": "python",
      "args": ["/Users/YOU/uniswap-server/server.py"],
      "env": {
        "RPC_URL": "https://eth.llamarpc.com"
      }
    }
  }
}

Security considerations

All write operations are simulated by default. You can disable simulation to execute writes, but it is recommended to keep simulation enabled for safety.

Keep private keys in environment variables only and avoid loading them from files or CLI inputs.

Examples of typical interactions

Ask Claude for the current rate to swap tokens, check reserves for a pool, or inspect recent transfers. Claude will call the appropriate tools on the MCP server and return results.

Available tools

getAmountsOut

Reads the contract to calculate the expected token output for a given swap path and amount; used to determine routes and prices.

swapExactTokensForTokens

Writes to the contract by simulating a token swap; Claude can request a swap path and amount, with a pre-simulation to estimate gas and outcome.

ownerOf

Queries NFT ownership information for a given token ID.

balanceOf

Reads the token balance for a given address.

getReserves

Fetches current reserves in an AMM pool to show liquidity and price.

addLiquidity

Writes to the contract to add liquidity, if supported by the contract, with prior simulation.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational