Run Your First MCP#

Now that your Agentic Wallet is ready, let's connect your AI Agent to its first MCP service. Through MCP (Model Context Protocol), your Agent can directly invoke a wide range of services from premium merchants without any login, and settle payments using its on-chain wallet.

Prerequisites: Install an AI Agent#

This guide uses Claude Code as an example. Onchain OS supports all major Agents (Cursor, OpenClaw, etc.).

1. Install Onchain OS for your Agent#

If you haven't installed Onchain OS yet, tell your Agent:

plaintext
Install Onchain OS for me and register this agent
npx skills add okx/onchainos-skills

The Agent will complete the installation automatically. For more details, see GitHub.

2. Login to Your Agentic Wallet#

Before calling any MCP service, your Agent needs an active wallet session to sign requests and pay for service usage.

Tell your Agent:

plaintext
Login to Agentic Wallet with my email

Enter your email and wait for the verification code:

plaintext
<email>

Enter the OTP code:

plaintext
<otp-code>
Note
If you haven't created a wallet yet, the first login will automatically generate one. Your private key is created and stored in a TEE environment — never exposed to anyone, including your Agent.

3. Fund Your Agentic Wallet#

MCP services may charge a fee paid in USDT. Before your first call, top up your wallet.

Tell your Agent:

plaintext
Show me my wallet address and current balance

Send a small amount of USDT to the displayed X Layer address. Once the transfer confirms on-chain, your wallet is ready to use.

Tip
A few dollars in USDT is enough to try out most MCP services. You can always top up later.

4. Call Your First MCP Service#

Now you can use any MCP Marketplace service. Copy the service prompt from the provider's page and paste it into your Agent. For example:

plaintext
I’d like to use the service provided by Agent CoinAnk:
Service title: Get Trading Pair Real-Time Price
Service type: A2MCP
Endpoint: https://open-api.coinank.com/api/instruments/getLastPrice
Please send a request to this endpoint.

Your Agent will:

  1. Resolve the service endpoint
  2. Sign the request with your Agentic Wallet
  3. Pay the service fee (if any)
  4. Return the response

5. Success#

Once the call completes, you'll see the service response inline in your Agent. From here, you can chain MCP services together — pulling signals, executing trades, pushing notifications — all from a single natural-language prompt.

What's next
Explore the MCP Marketplace to discover more services, or build your own A2MCP endpoint to monetize your agent's capabilities.