I built an MCP server for my crypto trading signal API — here’s how (and why)

altFINS just launched an MCP server for crypto analytics. Alpaca has one for trade execution. I built one for directional AI signals — OPEN_LONG, OPEN_SHORT, NO_SIGNAL — with confidence, TP, SL, and a human-readable thesis.

Here’s the 30-line implementation and why pre-computed signals are the missing piece.

Why trading APIs need MCP right now

Every algo trading API forces you to write the same boilerplate: HTTP client setup, auth headers, JSON parsing, error handling. You do it once and forget about it — until you’re in Claude Code or Cursor trying to ask “what’s BTC doing right now?” and realize your AI assistant has no idea your trading API even exists.

MCP flips this. Instead of your AI generating code to call your API, your AI just… calls it. Natively. Like a built-in tool.

altFINS gives you 150 raw indicators — you still have to compute the signal yourself. NeuroTrade gives you the decision already made: direction, confidence, entry, TP, SL, and a one-sentence thesis explaining why. The difference matters when you’re building a bot and want to describe the reasoning in plain English, not reconstruct it from RSI values.

The implementation (the interesting part)

The whole server is about 30 lines of real logic. FastMCP handles the MCP protocol; you just decorate async functions:

from mcp.server.fastmcp import FastMCP
import httpx, os

BASE_URL = os.getenv("NEUROTRADE_BASE_URL", "https://neurotrade.a3eecosystem.com")
API_KEY  = os.getenv("NEUROTRADE_API_KEY", "")

mcp = FastMCP("neurotrade-signal-api")

@mcp.tool()
async def generate_signal(symbol: str, timeframe: str = "1h") -> dict:
    """Generate an AI trading signal. Returns direction, confidence, TP, SL, thesis."""
    async with httpx.AsyncClient(timeout=30) as client:
        resp = await client.post(
            f"{BASE_URL}/api/v1/signals/generate",
            headers={"Authorization": f"Bearer {API_KEY}"},
            json={"symbol": symbol, "timeframe": timeframe},
        )
    resp.raise_for_status()
    return resp.json()

if __name__ == "__main__":
    mcp.run()

Three tools total: generate_signal, get_quota (check remaining monthly calls), and list_symbols (returns the full list of supported pairs). The stdio transport FastMCP uses by default works with Claude Code, Cursor, and Windsurf out of the box — no extra config needed beyond pointing the client at the script.

Set it up in 3 steps

Step 1. Get a free API key at RapidAPI — 10 signals/month, no card required.

Step 2. Add .mcp.json to your project root:

{
  "mcpServers": {
    "neurotrade": {
      "command": "python",
      "args": ["-m", "mcp_server.neurotrade_mcp"],
      "cwd": "/path/to/neurotrade-mcp",
      "env": {
        "NEUROTRADE_API_KEY": "nt_your_key_here"
      }
    }
  }
}

Step 3. Ask your AI assistant:

“Check the BTC/USDT signal on the 4h timeframe.”

You’ll get back something like:

{
  "signal": "OPEN_LONG",
  "confidence": 0.78,
  "entry_price": 76200,
  "tp": 77500,
  "sl": 75900,
  "thesis": "Bullish EMA stack + volume surge → 2.2:1 R:R",
  "reasoning": "EMA 9/21/50 aligned bullish. Volume +34% vs 20-period avg...",
  "risk_flags": [],
  "_quota": { "calls_remaining": 9 }
}

Your AI assistant can now reason over that output — “confidence is 0.78, that’s above my 0.75 threshold, position size should be X” — without you writing a single line of HTTP code.

What I learned building this

FastMCP makes MCP servers trivial. If your API has fewer than 10 endpoints worth exposing, an MCP adapter is 1–2 hours of work. The protocol complexity is fully hidden.

The real value isn’t saving HTTP boilerplate. It’s that the AI can now chain your API’s output with its own reasoning. “Signal says OPEN_LONG at 0.78 confidence, my rule set says size up when confidence > 0.75, current BTC drawdown is 3%, position size should be X with Y stop.” That chain only works if the signal is a first-class tool, not a copy-pasted JSON blob.

First-mover gap is real. I checked RapidAPI before building this. altFINS has an MCP server for analytics data. Alpaca has one for US equities execution. No directional signal API had one. That’s the gap we’re filling — and it matters for discoverability now that AI assistants are checking tool registries before suggesting manual API calls.

Try it free

Freemium tier: 10 signals/month, no card requiredrapidapi.com/cooa3e/api/neurotrade-signal

Supports 25 pairs across majors (BTC, ETH, SOL, XRP, DOGE) and high-cap movers (TAO, FET, SUI, PEPE, AVAX, ARB, and more). Paid plans unlock higher call limits and additional features.

If you build something with it, drop a comment — genuinely curious what people do with pre-computed AI signals in their assistant workflows.

Leave a Reply