Setup Guide

Prerequisites

  • An active ChainAware API key — get one at chainaware.ai/support or from your profile page
  • An MCP-compatible client (Claude Code, Claude Desktop, Cursor, or any MCP SDK)

Claude Code

The fastest path. One command registers the server globally across all your Claude Code sessions.

claude mcp add --transport sse chainaware-behavioral-prediction \
  https://prediction.mcp.chainaware.ai/sse \
  --header "X-API-Key: YOUR_API_KEY"

Verify the server is registered:

claude mcp list

You should see chainaware-behavioral-prediction in the list. The six tools are now available in any Claude Code session.

The repository includes 31 pre-built subagents. Copy them into your project's .claude/agents/ directory:

git clone https://github.com/ChainAware/behavioral-prediction-mcp.git
cp behavioral-prediction-mcp/.claude/agents/*.md .claude/agents/

Invoke any agent by name within a Claude Code session:

@chainaware-fraud-detector check 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on ETH

Claude Desktop

Add the server to your Claude Desktop MCP configuration file.

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "chainaware-behavioral-prediction": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://prediction.mcp.chainaware.ai/sse",
        "--header",
        "X-API-Key: YOUR_API_KEY"
      ]
    }
  }
}

Restart Claude Desktop after saving the file. The ChainAware tools will appear in the tools panel.


Cursor

Add the server to your Cursor MCP settings at Cursor → Settings → MCP.

{
  "mcpServers": {
    "chainaware-behavioral-prediction": {
      "url": "https://prediction.mcp.chainaware.ai/sse",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Node.js / Custom MCP Client

Install the MCP SDK and connect to the server programmatically:

npm install @modelcontextprotocol/sdk
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";

const transport = new SSEClientTransport(
  new URL("https://prediction.mcp.chainaware.ai/sse"),
  {
    requestInit: {
      headers: { "X-API-Key": process.env.CHAINAWARE_API_KEY }
    }
  }
);

const client = new Client({ name: "my-app", version: "1.0.0" }, {});
await client.connect(transport);

// Call a tool
const result = await client.callTool({
  name: "predictive_fraud",
  arguments: {
    apiKey: process.env.CHAINAWARE_API_KEY,
    network: "ETH",
    walletAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  }
});

console.log(result.content[0].text);

Python / Custom MCP Client

pip install mcp
import asyncio
import os
from mcp import ClientSession
from mcp.client.sse import sse_client

async def main():
    async with sse_client(
        url="https://prediction.mcp.chainaware.ai/sse",
        headers={"X-API-Key": os.environ["CHAINAWARE_API_KEY"]}
    ) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()

            result = await session.call_tool("predictive_fraud", {
                "apiKey": os.environ["CHAINAWARE_API_KEY"],
                "network": "ETH",
                "walletAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
            })
            print(result.content[0].text)

asyncio.run(main())

Environment Variables

Always store your API key as an environment variable. Never hardcode it in source files or commit it to version control.

# .env (add to .gitignore)
CHAINAWARE_API_KEY=your-api-key-here
# Shell
export CHAINAWARE_API_KEY="your-api-key-here"

Verifying the Connection

Once connected, test the setup by calling predictive_fraud on a known address:

Check fraud risk for vitalik.eth on Ethereum

A successful response returns a probabilityFraud score and status field. If you receive a 403 error, check that your API key is correctly set. If you receive a connection error, verify the MCP server URL is https://prediction.mcp.chainaware.ai/sse.


Troubleshooting

Issue Likely Cause Fix
403 Unauthorized API key missing or invalid Check CHAINAWARE_API_KEY is set and correct
400 Bad Request Invalid network or address format Check network identifier (e.g. ETH not ethereum) and address format
Server not found in client MCP registration not saved Re-run claude mcp add or check config file path
Tools not appearing Client not restarted after config change Restart Claude Desktop or Cursor

See also: Prediction MCP Overview | predictive_fraud | GitHub Repository