How to Connect Your Own AI Agent to Your Crypto Portfolio with MCP
Most portfolio tools stop at dashboards. This guide shows how to connect any MCP-compatible AI agent to MyHold — giving it structured read/write access to your portfolios, wallets, notifications, and market context without brittle scraping or custom integration code.
Why agents need more than a dashboard
A dashboard shows you what your portfolio looks like. An agent needs to do something with it — read current weights, check drift, inspect a notification's firing history, and write back a rationale after acting.
Most portfolio tools were never designed for this. Their APIs, if they exist at all, return flat JSON blobs that agents have to interpret with no structure or context. The result is brittle glue code that breaks whenever the app changes.
MyHold is designed differently. Every piece of portfolio state — wallets, coins, weights, rebalancing suggestions, notifications, rationales, market insights — is exposed as structured tools over MCP (Model Context Protocol). An external agent connects once, discovers what tools exist, and starts operating without any custom integration work.
This guide walks through connecting your own agent from nothing: generating a token, configuring your MCP client, and running your first live tool call against your actual portfolio data.
What your agent can do through MCP
MyHold exposes over 50 tools through its MCP server. They map cleanly to the features you'd use manually in the app:
| Category | What your agent can do |
|---|---|
| Portfolios | List portfolios, get summaries, create or update, enable staged mode, get rebalancing suggestions |
| Wallets | List wallets, get balances, create or update, get wallet-level rebalancing |
| Coins | Search coins, read price and performance data, add or remove from wallets |
| Market Insights | Read the Fear & Greed Index and hourly global market metrics |
| Technical Indicators | Read RSI, MACD, ADX, Bollinger Bands, ATR, Stochastic RSI, EMA, SMA for any coin |
| Notifications | Create, read, update, and delete alerts; read firing history; check current context |
| Portfolio Agents | Read built-in agent configuration and execution history |
| Rationales | Read and write investment rationales on portfolios, commits, and notifications |
| Daily News | Read today's AI-generated market briefing |
| Commits | List staged commits, get commit detail, commit a staged portfolio |
A complete reference is available in the API docs.
Step 1 — Generate an API token
Your agent authenticates using an API token, not your account password.
- Open Settings → API Access in MyHold.
- Click Generate Token.
- Copy the token immediately — it is only shown once.
Store it in your agent's secrets manager or environment variables. Do not hardcode it in source files.
Step 2 — Configure your MCP client
The MCP server endpoint is:
POST https://api.myhold.app/mcp
Authentication uses a Bearer token in the Authorization header.
Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"myhold": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.myhold.app/mcp"
],
"env": {
"MYHOLD_API_TOKEN": "your-token-here"
}
}
}
}
mcp-remoteis a lightweight proxy that adds the Authorization header on every request. Install it withnpm i -g mcp-remoteif needed.
Cursor
In Cursor, go to Settings → MCP Servers → Add. Set the transport to SSE, the URL to https://api.myhold.app/mcp, and add an Authorization: Bearer your-token-here header.
Custom agent (Python / TypeScript)
If you are building your own LLM pipeline, pass the token in the request headers directly:
import httpx
headers = {
"Authorization": f"Bearer {MYHOLD_API_TOKEN}",
"Content-Type": "application/json",
}
response = httpx.post("https://api.myhold.app/mcp", headers=headers, json=payload)
Any MCP-compatible client that supports custom HTTP headers will work the same way.
Step 3 — Verify the connection
Before running portfolio operations, confirm the server is reachable. The connection-health tool is specifically designed for this:
Tool: connection-health
What it returns: Server status, version string, and current timestamp.
In Claude Desktop, type:
Use the MyHold MCP connection-health tool to check the server is up.
A successful response looks like:
{
"status": "ok",
"version": "1.0.0",
"timestamp": "2026-04-15T08:00:00.000Z"
}
If this call succeeds but subsequent calls fail, the connection is fine — check that your token has the correct permissions and that you are not hitting a rate limit.
Step 4 — Query your portfolio state
With the connection confirmed, your agent can start reading your actual data.
List your portfolios
Tool: list-portfolios
List all my portfolios in MyHold.
Returns all portfolios with their IDs, names, and basic metadata. Note the portfolioId values — you will need them for every subsequent call.
Get wallet balances and performance
Tool: get-portfolio-summary
Get the summary for portfolio {portfolioId}.
Returns total value, 24h performance, wallet breakdown, and coin-level data. This is the primary context tool for any analysis or rebalancing decision.
Read market context
Tool: get-market-insights
Get current market insights including Fear & Greed.
Returns the current Fear & Greed Index, global market cap, and hourly trend data. Combine with technical indicators from get-technical-indicators to give your agent the same market context a human trader would have.
Step 5 — Write back to MyHold
Reading state is half the picture. A well-connected agent also records what it decided and why.
Write a portfolio rationale
After your agent reviews a portfolio, record its reasoning:
Tool: set-portfolio-rationale
{
"portfolioId": "port_abc123",
"rationale": "Holding current BTC/ETH split. RSI(14) for both coins is above 50 with no divergence signals. Fear & Greed at 62 — neutral. No rebalancing warranted this cycle."
}
Rationales are visible in the MyHold UI and are retrieved by the built-in agent in future runs as part of its context window.
Create a notification
Let your agent register its own alert:
Tool: create-notification
{
"name": "Agent — BTC Oversold Alert",
"rule": {
"and": [
{ "<": [{ "var": "coins.coin_1CUG5Wrf3SdztDud.rsi14" }, 35] },
{ "<": [{ "var": "insights.fearAndGreed.value" }, 30] }
]
},
"channels": ["in-app", "email"],
"executionPolicy": "on-reset"
}
The agent can also read get-notification-current-context to see the live values of every variable in a rule before deciding whether to act.
When to use MCP vs. the built-in MyHold Portfolio Agent
Both paths can run on your portfolio. They are not mutually exclusive.
The built-in MyHold Portfolio Agent is the right choice when you want a managed, scheduled agent that reads your strategy description and acts on it automatically. Configure a cron schedule, write a strategy in plain text, and the agent handles the rest. No infrastructure to manage.
An external agent over MCP is the right choice when you already have an LLM pipeline — a Claude project, a Cursor workflow, a custom Python script — and want to operate on your live portfolio data from within it. You have full control over the model, prompt, memory, and execution logic. MyHold provides the structured state layer.
For most users, the best setup is both: the built-in agent runs on a cron to handle routine monitoring, while a custom agent gets invoked on-demand for deeper analysis.
A practical example: weekly portfolio review
Put it all together. Here is a prompt you could give Claude (with MyHold MCP configured) every week:
You are my portfolio review agent. Do the following in order:
1. Call list-portfolios to get my portfolios.
2. For each portfolio, call get-portfolio-summary and get-portfolio-rebalance.
3. Call get-market-insights to read the current Fear & Greed Index.
4. Call get-technical-indicators for Bitcoin and Ethereum.
5. Write a short assessment: Is rebalancing warranted? Why or why not?
6. Call set-portfolio-rationale for each portfolio to record your assessment.
7. If any portfolio has drift above 10%, create a notification named "Agent — Drift Alert" using create-notification.
Be concise. Focus on data, not narrative.
Claude will execute each step using the MCP tools in sequence, write back rationales to MyHold, and optionally create an alert — all without you touching the app.
Disclaimer
This post is for educational purposes only and does not constitute financial advice. Cryptocurrency markets are highly volatile and past patterns do not guarantee future results. Always do your own research and never invest more than you can afford to lose.