Blog Post

OpenClaw x AWS EC2 x AnChain.AI Data MCP: Build Your 24x7 AML Compliance Officer AI Agent (For Free)

February 1, 2026
OpenClaw, (formerly Clawdbot) an open-source personal AI agent, has gone viral—growing from 0 to 140k+ GitHub stars in months and putting agentic AI at the center of the global industry conversation. AnChain.AI team has managed to integrate the AI native AnChain.AI/Data MCP with OpenClaw, on AWS EC2 to assure reliability. This tutorial will demonstrate how to build your OpenClaw AI Agent that can serve as your expensive Anti Money Laundering compliance officer, available 24x7,  Even better: start for free!  Let's build! 🚀

Tutorial Goal: 

Build an autonomous AI agent that helps AML (Anti–Money Laundering) compliance teams, cryptocurrency investigators, policy makers, and fraud-detection teams automate their workflows, like this: 

FAQ: 

1, Should I still read this if I’m not in AML or cryptocurrency?
Yes. Even if you’re outside financial compliance, this tutorial walks through the end-to-end process of setting up OpenClaw on AWS—the same foundational steps you’d use to build a personal AI agent for any domain or use case. And this tutorial starts free! 
2, Why deploy OpenClaw on AWS EC2, not Mac Mini ? 
AWS EC2 offers high reliability, secure isolation, and fintech-friendly infrastructure—and while most OpenClaw setups run on Mac minis, far fewer tutorials show how to deploy it properly on EC2 for production-style use.

OpenClaw / Clawdbot Architecture

Before diving into detailed steps, here is the architecture of the OpenClaw AI agent key components, based on

https://github.com/openclaw/openclaw

  • Gateway Daemon
    The always-on core service that routes messages, manages sessions, and coordinates agents and interfaces over WebSockets.
  • Agent Runtime
    Executes the agent’s reasoning loop, memory, plugins, and skills. This is where tools are invoked and workflows are orchestrated.
  • Skills / Plugin System
    Extensible tool layer loaded into the Agent Runtime. AnChain.AI Data MCP integrates here, exposing real-time crypto risk, sanctions, and investigation intelligence as agent-callable tools.
  • Interfaces (Web UI & CLI)
    The Web Admin UI and CLI connect to the Gateway via WebSockets for configuration, monitoring, and interactive chat.
  • Channels (Telegram, etc.)
    Messaging platforms like Telegram act as first-class input/output channels. Messages are routed through the Gateway to the Agent Runtime, triggering tool calls (including AnChain.AI MCP) and autonomous actions.
  • Nodes (macOS, mobile, headless)
    Platform-specific or headless agent nodes connect back to the Gateway, enabling distributed or remote operation.

In short: OpenClaw centers on a Gateway-driven Agent Runtime, where plugins like AnChain.AI Data MCP turn external intelligence into real-time, agent-native capabilities, accessible via web, CLI, and chat platforms such as Telegram.

1  Prerequisites

  1. AnChain.AI Data account (Free)
    Sign up for AnChain.AI’s Data: https://anchain.ai/data

It provides real‑time, explainable crypto‑payment intelligence that powers AML, fraud detection and sanctions screening across blockchains[1]. The API supports major blockchains and offers low‑latency responses. It also exposes a Model Context Protocol (MCP) so AI agents can ingest structured risk signals. Copy and save the API key. 

  1. AWS EC2 M7i‑flex instance (Free)
    Create a free‑tier AWS account and launch an m7i‑flex instance (Ubuntu 24.04). M7i‑flex machines use 3.2 GHz Intel Xeon Scalable processors[4], delivering ~19 % better price–performance than previous M6i instances[4]
Note : micro instances are extremely slow to run OpenClaw.
  1. Telegram bot (Free)
    Create a bot through @BotFather. In Telegram, search for @BotFather, send /newbot and follow the prompts; BotFather will return a unique API token. Save the token securely – it authenticates your bot on the Telegram Bot API.  https://core.telegram.org/bots/tutorial 
  1. OpenAI/Other LLM API key
    Obtain an API key for your preferred large language model. OpenClaw’s TUI wizard supports multiple providers (e.g., OpenAI, Anthropic Claude, Google Gemini). Keep the key ready.  We use: OpenAI GPT5 mini , a good balance of LLM reasoning at reasonable pricing. https://platform.openai.com/docs/models/gpt-5-mini
  1. Local machine for tunnelling (optional)
    To access OpenClaw’s browser UI securely, you’ll forward a port from the EC2 instance to your laptop using SSH.

2 Installation and Configuration

2.1 SSH into the EC2 Instance

  • From your terminal, connect to the instance:
ssh -i path/to/key.pem ubuntu@<ec2-public-ip>
  • Update packages and install prerequisites (curl, git, Node.js). Node.js is required by OpenClaw. 

2.2 Install OpenClaw

  1. In the EC2 shell, run the official installer:
curl -fsSL https://openclaw.ai/install.sh | bash

Or, git clone the code repo and run: 

npm install -g openclaw@latest
openclaw onboard --install-daemon

The installer automatically detects your OS and sets up dependencies. After installation, OpenClaw launches a Text based UI (TUI) for onboarding.

  1. Follow the QuickStart onboarding in the TUI:
  2. Confirm you wish to proceed.
  3. Select QuickStart when prompted – it configures default settings so you can focus on getting the bot working..
  4. Choose your preferred LLM provider and paste your API key (OpenAI, Claude, Gemini, etc.).
  5. When asked to configure API keys for other services (e.g., GitHub, Slack), you can skip for now.

Peter Steinberger, the creator of OpenClaw, has crafted a remarkably smooth installation experience. After setup, you’ll see the following OpenClaw TUI screen in your terminal, after a few minutes:

2.3 Connect Telegram

  1. When the TUI asks for a chat interface, select Telegram.
  2. Open Telegram on your phone or desktop and start a chat with @BotFather. Enter /newbot and follow instructions to create your bot and obtain its token. Copy the token. https://core.telegram.org/bots/tutorial#:~:text=
  1. Paste the token into the OpenClaw TUI. Once accepted, OpenClaw confirms the Telegram chat is ready.

2.4 Configure AnChain.AI Data and MCP

  1. Retrieve your Data API key from the AnChain.AI dashboard: https://anchain.ai/data

The server exposes agent‑ready endpoints that wrap AnChain’s risk, sanctions and tracing APIs. AnChain’s Data platform provides structured wallet‑risk scores, transaction flows and sanctions exposure, and uses MCP to deliver explainable data to LLMs. 

2, Enable MCPorter Skill on OpenClaw Dashboard: 

MCPorter (often referred to as mcporter or moltbot/mcporter) is a TypeScript runtime, command-line interface (CLI), and code-generation toolkit designed for the Model Context Protocol (MCP). 

3. Config the Anchain.ai Data MCP in OpenClaw. 

The old way is the manually install via CLI, but thanks to OpenClaw and LLM, you can chat with OpenClaw dashboard in browser: 

“Install https://github.com/AnChainAI/anchain-data-mcp into MCPorter using my AnChain.AI Data API key.”

OpenClaw will clone the repo, configure MCPorter, inject the API key, and bring the MCP service online automatically. 

Just in case you would like to manually install it, or need to troubleshoot if OpenClaw Dashboard couldn’t install it.  (happens to other tools), in appendix. 

2.5 Accessing the Control web UI via SSH tunneling

OpenClaw can be managed via the TUI or a browser‑based Control UI. The TUI is recommended for initial setup, but the Control web UI is more convenient once running.

To access the Control UI from your laptop:

On your local machine, create an SSH tunnel to the EC2 instance (adjust ports as needed):

ssh -N -L 18789:127.0.0.1:18789 ubuntu@<ec2-public-ip>

In your browser, navigate to https://localhost:18789 (or other configured port) 

You should see the OpenClaw Control UI in Chrome browser on your personal computer, via SSH tunnelled to the EC2 cloud instance running OpenClaw! 

3 Demonstration

Congrats 🎉 You have made it ! 

Now, let’s give some tasks for your 24x7 AI agent to do! 

Assume you are running a fintech payment company, and you need to check if it’s safe to transact with this Bitcoin wallet address: 

“Use Anchain MCP to investigation this bitcoin address: 1QJUiNsNfji6mR1FjAwf6Eg9NxxHPoxpWL”

There are 2 ways you can interact with your Ai agent. As shown, they are powered the exact same backend : OpenAI GPT5 LLM, and AnChain.AI MCP: 

1, Telegram chat: 

2, Web browser (via SSH tunneling)

OpenClaw AI agent answer: 

“I queried AnChain’s API for the address 1QJUiNsNfji6mR1FjAwf6Eg9NxxHPoxpWL and got a risk result from AnChain.ai.
Quick summary (AnChain.ai)
  • Address: 1QJUiNsNfji6mR1FjAwf6Eg9NxxHPoxpWL
  • Top categories (self): sanction, exchange
  • Details: exchange:Bittrex, sanction:OFAC_SDN
  • Risk score: 100 (highest)
  • Risk level: 4 (high)
  • VASP risk (exchange-level): score 55, level 3
  • Address validity: true

Recommended next steps
  1. Block / Hold: In real-time payments or deposit processing, block or place on-hold deposits/withdrawals involving this address and escalate to compliance for manual review.
  2. Sanctions workflow: Treat as an OFAC/SDN hit — follow your SAR/Sanctions policy (screen against sanctioned entity lists, prepare documentation).…

Pretty cool, right!?

Question: Why is this Bitcoin1QJUiNsNfji6mR1FjAwf6Eg9NxxHPoxpWL  dangerous to transact with? 
In case you are curious,
1QJUiNsNfji6mR1FjAwf6Eg9NxxHPoxpWL is a sanctioned bitcoin wallet address by OFAC (Office of Foreign Assets Control ), a US government agency, among one of many global intelligence databases that AnChain.AI has full integration. 
https://ofac.treasury.gov/
View the transaction graph: 
https://ciso.anchainai.com/s/5s1KgY4CUGr

With the AnChain.AI Data platform integrated with your OpenClaw, you can do more tasks such as: 

  1. Request a risk assessment:
    User: "Evaluate the risk score of wallet 0xABC..."
    Agent: calls the MCP risk_score_address tool, which queries AnChain’s wallet‑risk API. AnChain’s data API returns a numeric risk score and signals. The agent responds with the risk level and reasoning.
  2. Pre‑transaction screening:
    User: "Send 500 USDC to 0xDEF..."
    Agent: runs pre_transaction_screen (MCP). If the decision is ALLOW, it executes the payment; if REVIEW, it pauses and asks for justification; if BLOCK, it refuses and logs an audit. The Data API’s low‑latency responses (<500 ms) allow this to occur before the transfer is submitted.
  3. What other cool use cases can you build? We would love to hear it! 

4 Future Work

  1. Enable more AnChain.AI Agent Skills
    In this tutorial we enable the Anchain Data MCP, another context window efficient way is to use Agent Skills to OpenClaw so the agent can call more complex workflows—e.g., tracing funds (trace_funds) or generating investigation reports. Use the [skills.md] pattern to define input schemas and policies.
  2. Security and Privacy
    OpenClaw stores configuration and memory files in plain text on disk. If an attacker compromises the host machine, they can steal API keys and transcripts. . For production, run the agent in an isolated environment (e.g., dedicated VM or Mac mini) and use secret‑management tools to mediate access to credentials. Always enable HTTPS and restrict access to the MCP server.

5 Conclusion

By combining OpenClaw AI agent with institution‑grade risk signals from AnChain.AI Data, investigators and compliance teams gain a powerful assistant. OpenClaw’s conversation‑first TUI and browser UI make onboarding straightforward, while AnChain’s modular APIs and MCP feed the agent with explainable risk information in real time[3]. Running the agent on an EC2 M7i‑flex instance ensures adequate performance and stays within the free tier. Always heed security best practices—store secrets securely and isolate the agent—to reap the benefits of autonomous crypto investigation without exposing yourself to unnecessary risks.

Appendix: 

Manually install the Anchain  MCP in MCPorter: 

  • Clone the AnChain MCP Porter (MCP server) onto the EC2 instance:

git clone https://github.com/AnChainAI/anchain-data-mcp.git
cd anchain-data-mcp
./install.sh   # install dependencies
cp .env.sample .env

  • Edit .env to include your AnChain API key and choose a port (e.g., PORT=8787):

ANCHAIN_DATA_API_KEY=<your-key>
PORT=8787

  • Start the MCP server:

python main.py

  • Update OpenClaw to point to the MCP server. In the TUI settings, provide your MCP_BASE_URL (e.g., http://localhost:8787) and enable the MCP skill. Alternatively, create a custom OpenClaw tool manifest that references the MCP endpoints (see [skills.md] from prior steps).

Congratulations on building your OpenClaw AI agent that can conduct serious business functions! If you like this tutorial, please share on your social media! 
Need help build your AML stack? Schedule a call with our experts! anchain.ai/demo