Skip to main content
Glama
Trading Signals MCP

Trading Signals MCP

by gdietsch

Trading Signals MCP

An MCP server that gives Claude, Cursor, LangChain and any other MCP-capable agent one-line access to the Trading Signals Toolkit: a $0.10 GO / CAUTION / NO_GO pre-trade check, a futures event-risk gate and session brief built from US government macro data (BLS, Federal Reserve, Treasury, CFTC), SEC Form 4 insider buys and cluster buys, Base token safety verdicts, and small quant calculators. There are no API keys or sign-ups: each tool call pays for itself automatically over x402 in USDC on Base, from a wallet you control, with a per-call spend cap.

Tools and prices

Tool

Price (USDC)

What it returns

pre_trade_check

$0.10

One GO / CAUTION / NO_GO verdict with plain reasons for ES/NQ/CL/GC/ZN: event gate + session brief + SEC insider activity (+ optional Base token verdict)

event_gate

$0.01

safeToTrade + next high-impact US release (CPI, NFP, PPI, FOMC, Treasury auctions)

session_brief

$0.03

Upcoming releases, latest BLS values, Treasury 2y/10y/2s10s, CFTC COT positioning, holidays, verdict

token_verdict

$0.02

A-F verdict for a Base ERC-20: owner, proxy, liquidity, honeypot simulation, taxes

insider_buys

$0.01

SEC Form 4 open-market insider purchases for one ticker

insider_clusters

$0.02

Tickers with several distinct insiders buying in the last N days

vwap_bands

$0.005

VWAP + standard-deviation bands from your bars

opening_range

$0.005

Opening range, breakout state and targets from your bars

atr_stop

$0.005

Wilder ATR, stop price and position size

backtest_opening_range_breakout

$0.02

Opening-range-breakout backtest on your bars

Failed calls (bad input, upstream outage) return an error and are not charged.

Related MCP server: Alien Plugg x402 MCP Server

Setup

You need Node.js 18.17+ and a dedicated Base wallet private key holding a few dollars of USDC on Base mainnet (no ETH needed; the facilitator pays gas).

Env var

Required

Default

Meaning

X402_PRIVATE_KEY

yes (to call tools)

–

0x-prefixed private key of the paying wallet

MAX_USD_PER_CALL

no

0.50

Hard cap per call; anything pricier is refused before signing

TRADING_SIGNALS_BASE_URL

no

https://trading-signals-toolkit.onrender.com

API base URL

Run it directly:

X402_PRIVATE_KEY=0xYOUR_DEDICATED_WALLET_KEY npx -y github:gdietsch/trading-signals-mcp

Claude Desktop

claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "trading-signals": {
      "command": "npx",
      "args": ["-y", "github:gdietsch/trading-signals-mcp"],
      "env": {
        "X402_PRIVATE_KEY": "0xYOUR_DEDICATED_WALLET_KEY",
        "MAX_USD_PER_CALL": "0.50"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "trading-signals": {
      "command": "npx",
      "args": ["-y", "github:gdietsch/trading-signals-mcp"],
      "env": {
        "X402_PRIVATE_KEY": "0xYOUR_DEDICATED_WALLET_KEY",
        "MAX_USD_PER_CALL": "0.50"
      }
    }
  }
}

Claude Code

claude mcp add trading-signals \
  --env X402_PRIVATE_KEY=0xYOUR_DEDICATED_WALLET_KEY \
  --env MAX_USD_PER_CALL=0.50 \
  -- npx -y github:gdietsch/trading-signals-mcp

LangChain (langchain-mcp-adapters)

# pip install langchain-mcp-adapters langgraph "langchain[anthropic]"
import asyncio, os
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent

async def main():
    client = MultiServerMCPClient({
        "trading-signals": {
            "command": "npx",
            "args": ["-y", "github:gdietsch/trading-signals-mcp"],
            "transport": "stdio",
            "env": {**os.environ, "X402_PRIVATE_KEY": os.environ["X402_PRIVATE_KEY"], "MAX_USD_PER_CALL": "0.50"},
        }
    })
    tools = await client.get_tools()
    agent = create_react_agent("anthropic:claude-sonnet-4-5", tools)
    out = await agent.ainvoke({"messages": "Run a pre-trade check for NQ with ticker NVDA."})
    print(out["messages"][-1].content)

asyncio.run(main())

How payment works

Each tool calls one HTTPS route. The API answers 402 Payment Required with the exact USDC amount; this server signs an EIP-3009 transferWithAuthorization for that amount (only USDC on Base mainnet, only up to MAX_USD_PER_CALL) and retries. Paid results include a _payment field with the settlement transaction and a BaseScan link. Without X402_PRIVATE_KEY the server still starts and lists its tools; calling one returns a clear "no wallet configured" error and charges nothing.

Security

  • Use a dedicated, low-balance wallet. Create a fresh wallet just for this, fund it with only what you are willing to spend (for example $2–$5 of USDC on Base), and never use a key that holds other funds.

  • The key stays on your machine: it is read from the environment, used only to sign payment authorizations locally, and never sent to the API or logged.

  • Keep MAX_USD_PER_CALL low. The default ($0.50) allows every tool; set 0.05 to block the $0.10 bundle.

  • Your MCP client config file now contains a private key: don't commit or share it.

Development

npm install
npm run build   # syntax/import check (plain ESM, no compile step)
npm test        # starts the server over stdio, lists tools, checks unpaid/capped errors (spends nothing)

Disclaimer

Informational only, not investment advice. Data comes from public sources (US government agencies, SEC EDGAR, Base mainnet) and may be delayed, incomplete or wrong. You are responsible for your own trading decisions and for the funds in the wallet you configure.

MIT License.

Available Tools

10 tools
atr_stopATR Stop + Position Size ($0.005)B
Read-only

Price: $0.005 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. Wilder ATR, ATR-multiple stop price and position size from account risk %. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: bars (required), side, entry, period, +4 more.

backtest_opening_range_breakoutOpening-Range-Breakout Backtest ($0.02)B
Read-only

Price: $0.02 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. Opening-range-breakout backtest on your intraday bars: trades, win rate, avg R, total R, profit factor, max drawdown, exits, long/short split and recent trades. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: bars (required), rr, tz, stop, +5 more.

event_gateEvent-Risk Gate ($0.01)A
Read-only

Price: $0.01 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. safeToTrade verdict plus the next high-impact US release (BLS CPI/NFP/PPI, FOMC, Treasury auctions) within a minutes window. US public-domain agency data. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: window.

insider_buysSEC Insider Buys (ticker) ($0.01)A
Read-only

Price: $0.01 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. SEC Form 4 open-market insider purchases (code P) for one ticker: insider, role, shares, price, value, dates, per-insider totals and a cluster flag. From SEC EDGAR. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: ticker (required), days.

insider_clustersSEC Insider Cluster Buys (market-wide) ($0.02)A
Read-only

Price: $0.02 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. Listed tickers where several distinct insiders made open-market purchases (Form 4 code P) in the last N days, with buyers, roles, totals and VWAP. From SEC EDGAR. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: days, minBuyers.

opening_rangeOpening Range ($0.005)A
Read-only

Price: $0.005 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. Opening range (first N minutes) high/low/size for the latest session in your bars, breakout state, first breakout and 1x/2x extension targets. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: bars (required), tz, minutes, sessionEnd, +1 more.

pre_trade_checkPre-Trade Check (bundle) ($0.10)A
Read-only

Price: $0.10 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. One GO / CAUTION / NO_GO answer with plain reasons before trading a futures contract: event-risk gate + session brief (US macro calendar, Treasury yields, CFTC positioning, holidays) + SEC Form 4 insider activity (for ticker, else top market-wide insider clusters) + optional Base token verdict (token). Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: symbol (required), token, ticker, window.

session_briefFutures Session Brief ($0.03)A
Read-only

Price: $0.03 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. Session brief for ES/NQ/CL/GC/ZN: upcoming US high-impact releases with ET times and minutes-to, latest/prior BLS values, Treasury 2y/10y/2s10s with daily change, CFTC COT net positioning with 3y percentile, holiday/early-close flags, and a safeToTrade verdict. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: symbol (required), window.

token_verdictBase Token Verdict ($0.02)A
Read-only

Price: $0.02 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. A-F safety verdict for a Base ERC-20: metadata and supply, owner/renounced, upgradeable-proxy check, Uniswap/Aerodrome liquidity vs WETH/USDC, buy→sell honeypot simulation with taxes, known-holder concentration. Read from Base mainnet. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: address (required).

vwap_bandsVWAP + Bands ($0.005)A
Read-only

Price: $0.005 USDC per call on Base, paid automatically via x402 from X402_PRIVATE_KEY. VWAP with standard-deviation bands from your OHLCV bars (session-anchored or full), z-score and band position. Failed calls (4xx/5xx) are not charged. Informational only, not investment advice.

Inputs: bars (required), tz, bands, anchor, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 10 tools

    Disambiguation4/5

    Each tool has a distinct role, but pre_trade_check deliberately bundles event_gate, session_brief, insider activity, and token_verdict, so an agent may wonder whether to call the composite or its components. The descriptions largely resolve this by scoping pre_trade_check to a single futures pre-trade verdict and the others to focused data products.

    Naming Consistency4/5

    All names are lowercase snake_case and mostly descriptive noun phrases, which is readable and consistent in style. The main deviation is that a few are verb-led (backtest_opening_range_breakout) and the set does not follow a uniform verb_noun action pattern.

    Tool Count5/5

    10 tools is well within the 3-15 range and each maps to a distinct signal or check. The composite pre_trade_check is justified as a convenience wrapper, and there is no obvious bloat.

    Completeness4/5

    The surface covers event risk, session context, insider activity, token safety, several technical indicators, and a backtest, so core trading-signal workflows are represented. Minor gaps remain for broader market data or portfolio-level risk, but agents can work around them with supplied OHLCV bars.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers