# mcp-contracts [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/CryptoAPIs-io/cryptoapis-mcp-contracts  
**GitHub Stars:** 0  
**npm Downloads (last month):** 678  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-contracts

## Description
MCP server for smart contract ABIs and on-chain data from EVM and Solana via Crypto APIs

## Tools
Capabilities this server exposes over MCP:

- **evm_contract_data** — Get token details by contract address.
- **solana_contract_data** — Get Solana token details by contract address.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-contracts": {
    "command": "npx",
    "args": ["-y","@cryptoapis-io/mcp-contracts"],
    "env": {
      "CRYPTOAPIS_API_KEY": "",
      "MCP_AUTH_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `CRYPTOAPIS_API_KEY`, `MCP_AUTH_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-contracts does

mcp-contracts exposes Crypto APIs contract-data operations through the Model Context Protocol. It focuses on token metadata retrieved from a contract address rather than general blockchain activity or transaction analysis.

The server covers two blockchain families:

- EVM contract lookups for Ethereum, Ethereum Classic, and Binance Smart Chain environments listed by the API.
- Solana token lookups on mainnet and devnet.

For EVM responses, the available token fields include the token name, symbol, standard, decimal precision, and total supply. Solana lookups retrieve token details by address through the corresponding Crypto APIs operation.

## How it works

Install the npm package and start the process with a Crypto APIs API key. The default stdio transport is intended for MCP clients that launch local servers. HTTP transport is also available and listens on localhost by default, exposing the MCP endpoint at `/mcp`.

HTTP deployments can use one API key for all requests or omit the startup key and require callers to send their own `x-api-key` header. When accepting connections beyond the local machine, bind explicitly, restrict permitted host headers with `--allowed-hosts`, and protect the server with a bearer token or per-request API keys. The server supports stateless HTTP mode through a command-line option.

## Setup and configuration

Create a Crypto APIs account and generate an API key before starting the server. Install the package with:

```bash
npm install @cryptoapis-io/mcp-contracts
```

A local stdio launch can use either a command-line key or the `CRYPTOAPIS_API_KEY` environment variable:

```bash
npx @cryptoapis-io/mcp-contracts --api-key YOUR_API_KEY
```

For HTTP mode, specify the transport and, if needed, a different port or host:

```bash
npx @cryptoapis-io/mcp-contracts --transport http --port 3000 --api-key YOUR_API_KEY
```

Supported options include `--transport`, `--host`, `--auth-token`, `--allowed-hosts`, `--port`, `--path`, and `--stateless`. `MCP_AUTH_TOKEN` is preferred over placing the bearer token directly in command-line arguments because process listings can expose command-line values.

Claude Desktop and Cursor configurations can launch the package with `npx` and pass the API key through the environment. n8n can connect through an MCP Client Tool pointed at the HTTP endpoint.

## Tools and capabilities

- `evm_contract_data`: retrieves token details using a blockchain, network, and contract address.
- `solana_contract_data`: retrieves Solana token details using a network and contract address.
- EVM environments include Ethereum mainnet, Ethereum Classic Mordor, and Binance Smart Chain mainnet, with testnet and Sepolia support as listed by the service.
- Solana environments include mainnet and devnet.
- HTTP clients can authenticate with a shared startup API key or provide an API key per request.

## Limitations and notes

Contract token details are currently available only for Ethereum, Ethereum Classic, and Binance Smart Chain among EVM networks. Solana support is limited to mainnet and devnet. A valid Crypto APIs key is required for stdio startup and for authenticated API requests; invalid or missing keys may cause Crypto APIs to reject requests and can result in IP restrictions.

HTTP mode binds to `127.0.0.1` by default. Remote or containerized access requires an explicit non-loopback bind and appropriate authentication. When running behind n8n in Docker, the host address and bearer-token configuration need to account for the container network. The package is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/mcp-contracts/readme_

