# UCAI

UCAI turns a smart contract ABI into an MCP server, giving an agent tools to call contract functions and query blockchain data.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 38
- Author: nirholas
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nirholas/UCAI
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/mcp/ucai

## What it does

UCAI generates an MCP server from a contract address or ABI. Contract functions and events become tools an agent can call, such as checking a pool’s reserves or retrieving recent swaps. It can connect an agent to smart contracts used in DeFi.

For Claude Code, the setup runs `uvx abi-to-mcp` and supplies `ETHERSCAN_API_KEY` and `PRIVATE_KEY`. An alternate command also accepts `WEB3_PROVIDER_URL` for the provider endpoint. Those environment values are part of the server setup, so the matching configuration matters. A browser-based builder can generate a server as well.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `WEB3_PROVIDER_URL`, `ETHERSCAN_API_KEY`, `PRIVATE_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env WEB3_PROVIDER_URL=<WEB3_PROVIDER_URL> --env ETHERSCAN_API_KEY=<ETHERSCAN_API_KEY> --env PRIVATE_KEY=<PRIVATE_KEY> --transport stdio ucai -- uvx abi-to-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from abi-to-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add ucai --env WEB3_PROVIDER_URL=<WEB3_PROVIDER_URL> --env ETHERSCAN_API_KEY=<ETHERSCAN_API_KEY> --env PRIVATE_KEY=<PRIVATE_KEY> -- uvx abi-to-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from abi-to-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ucai": {
            "command": "uvx",
            "args": [
                "abi-to-mcp"
            ],
            "env": {
                "WEB3_PROVIDER_URL": "<WEB3_PROVIDER_URL>",
                "ETHERSCAN_API_KEY": "<ETHERSCAN_API_KEY>",
                "PRIVATE_KEY": "<PRIVATE_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from abi-to-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ucai": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "abi-to-mcp"
            ],
            "env": {
                "WEB3_PROVIDER_URL": "<WEB3_PROVIDER_URL>",
                "ETHERSCAN_API_KEY": "<ETHERSCAN_API_KEY>",
                "PRIVATE_KEY": "<PRIVATE_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from abi-to-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e WEB3_PROVIDER_URL=<WEB3_PROVIDER_URL> -e ETHERSCAN_API_KEY=<ETHERSCAN_API_KEY> -e PRIVATE_KEY=<PRIVATE_KEY> ucai uvx abi-to-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from abi-to-mcp <command>

## When to use it
- generate an MCP server from a contract address
- let an agent call smart contract functions
- query a pool’s reserves through contract tools
- retrieve recent blockchain swaps

## Example prompts
- Ask the Uniswap contract for the best route to exchange 1 ETH for USDC.
- Check the ETH/DAI pool reserves through the contract.
- Show recent swaps on Uniswap.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
