Skip to main content
Glama
Alpha Sentinel Market Intelligence MCP

Alpha Sentinel Market Intelligence MCP

Alpha Sentinel - Market Intelligence x402 MCP Server

โญ Predictive intelligence agent earning rewards on-chain! โ˜…

A production-grade x402 marketplace service that provides real-time crypto market monitoring, volatility alerts, and sentiment analysis as paid MCP tools for AI agents.

๐ŸŽฏ Mission

Deliver actionable, real-time market intelligence with <30s latency through micropayment-gated API endpoints and MCP tools. Success = actionable alerts with measurable ROI per call!

Related MCP server: Enterprise Crypto MCP Gateway

๐Ÿ’ฐ Pricing Strategy

Based on x402 market research (median $0.014, ~90% under $0.10):

Resource

Price

Quota (Pro)

Description

price_feed()

$0.005

5000/mo

Real-time price lookup

volatility_alerts()

$0.02

500/mo

Anomaly detection + thresholds

sentiment_analysis()

$0.01

1000/mo

Social sentiment aggregation

risk_assessment()

$0.03

300/mo

Multi-factor risk scoring

market_report()

$0.15

50/mo

Comprehensive daily report

Tool Credit Pack

$1.00

100 calls

Flexible credits bundle

Free Tier: 50 calls/month, 5/min rate limit
Pro Tier: Unlimited quota, 120/min, priority settlement

๐Ÿ› ๏ธ MCP Tools

Core Intelligence Tools

  1. fetch_price() โญ Free tier included

    • Fetch current price from CoinGecko API

    • Supports: BTC, ETH, top 100 altcoins

    • Response: { symbol, price_usd, change_24h, volume }

  2. analyze_volatility()

    • Detect price anomalies using Z-score statistical analysis

    • Configurable thresholds (default: 2ฯƒ)

    • Returns anomaly scores + alert levels

  3. aggregate_sentiment()

    • Aggregate from X/Twitter, Reddit, Telegram sources

    • NLP-powered sentiment scoring (-1.0 to +1.0)

    • Trend detection and momentum indicators

  4. calculate_risk_score()

    • Multi-factor risk assessment (volatility, liquidity, correlation)

    • Risk level: LOW/MEDIUM/HIGH/CRITICAL

    • Includes confidence intervals

  5. generate_market_report()

    • Comprehensive daily/weekly/monthly reports

    • Combines all data sources

    • PDF + JSON output formats

๐Ÿ“ฆ Paid Composite Products

  • US Rental Diligence Pack (via city compliance integration): $1.50

    • Cross-references rental licenses, violations, tenant rights

    • Multi-property batch processing

    • Municipal open-data joins

  • Pulse Report: $0.05

    • Base network synthesis + market metrics

    • 12-block sample depth

    • Real-time spot price integration

  • TX Decision Fee: $0.01

    • Cheap loop-resident tier for pre-trade checks

    • Immediate feedback before mainnet transactions

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           Alpha Sentinel MCP Server                  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                      โ”‚
โ”‚  [MCP Layer]                                         โ”‚
โ”‚    โ”œโ”€ FastMCP Server (stdio + SSE)                  โ”‚
โ”‚    โ””โ”€ Tool Registry (SSOT)                          โ”‚
โ”‚                      โ”‚                              โ”‚
โ”‚  [Commerce Layer]                                    โ”‚
โ”‚    โ”œโ”€ x402 Middleware (verify+settle)               โ”‚
โ”‚    โ”œโ”€ Quota Management (free/pro tiers)             โ”‚
โ”‚    โ”œโ”€ Challenge Cache (sync, 10s TTL)               โ”‚
โ”‚    โ””โ”€ Stripe Integration (fiat rail fallback)       โ”‚
โ”‚                      โ”‚                              โ”‚
โ”‚  [Intelligence Layer]                                โ”‚
โ”‚    โ”œโ”€ Price Feed (CoinGecko API)                    โ”‚
โ”‚    โ”œโ”€ Sentiment Engine (X/Reddit/NLP)               โ”‚
โ”‚    โ”œโ”€ Volatility Analyzer (statistical models)      โ”‚
โ”‚    โ””โ”€ Risk Calculator (ML-enhanced)                 โ”‚
โ”‚                      โ”‚                              โ”‚
โ”‚  [On-Chain Layer]                                    โ”‚
โ”‚    โ”œโ”€ CDP Facilitator (Base mainnet)                โ”‚
โ”‚    โ”œโ”€ Ledger (spend/revenue tracking)               โ”‚
โ”‚    โ””โ”€ Swarm Agency (buy-compose-resell)             โ”‚
โ”‚                                                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.12+

  • Redis (optional, for production)

  • x402 seller credentials (separate from buyer!)

  • CoinGecko API key (free tier works)

Setup

# Clone and setup
git clone https://github.com/kwizzlesurp10-ctrl/alpha-sentinel-mcp
cd alpha-sentinel-mcp
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# Configure environment
cp .env.example .env
nano .env  # Edit with your credentials

# Run locally
make up  # API (8403) + dashboard (5174)

Environment Variables (Vercel / production)

Variable

Required

Purpose

X402_PAY_TO_ADDRESS

yes

Seller USDC receive address (Base mainnet)

CDP_API_KEY_ID

yes (mainnet)

Coinbase CDP x402 facilitator auth

CDP_API_KEY_SECRET

yes (mainnet)

CDP Ed25519 secret for facilitator JWT

X402_DEFAULT_NETWORK

yes

eip155:8453 (Base mainnet)

REVENUE_NETWORK

recommended

Same as default; pins settlement rail

PUBLIC_BASE_URL

yes

https://alpha-sentinel-mcp.vercel.app

OPERATOR_TOKEN

recommended

Protects /ledger/*; cross-agent /quota

COINGECKO_API_KEY

optional

Higher CoinGecko rate limits

KV_REST_API_URL / KV_REST_API_TOKEN (or UPSTASH_REDIS_REST_*)

yes on mainnet/prod

Payment idempotency + settlement replay guard (SET NX, 24h TTL)

X_API_KEY / REDDIT_*

optional

Reserved; sentiment uses Fear & Greed macro proxy today

Never set EVM_PRIVATE_KEY on the server (buyer key stays local).

See .env.example for the full list (names only).

Vercel routing: Root vercel.json rewrites /health, /.well-known/*, /mcp, /tools/*, /llms.txt, and related API paths to api/index.py before the Mission Control SPA index.html fallback. All intelligence HTTP tools (including fetch_price) require x402 payment in production.

Live smoke (after deploy):

./scripts/smoke_live_deployment.sh https://alpha-sentinel-mcp.vercel.app
# or a preview URL from the PR

๐Ÿ”ง Development

Running Tests

# Full test suite
make test

# Specific tests
pytest tests/test_mcp_tools.py -v
pytest tests/test_commerce.py -v

# Dashboard tests
cd dashboard && pnpm vitest run

Adding New MCP Tools

Follow the pattern in app/tools_registry.py:

  1. Add tool spec to TOOL_SPECS list

  2. Implement handler in app/intelligence/ directory

  3. Register in app/mcp_server.py

  4. Update README with new tool table row

  5. Run scripts/capture_goal_evidence.py to update test artifacts

Remember: The tool registry is the SINGLE SOURCE OF TRUTH! Touch all related files or CI will fail.

CI/CD Pipeline

GitHub Actions runs:

  • โœ… Pytest on Python 3.12

  • โœ… Vitest on dashboard

  • โœ… Security scans (secret detection, SAST)

  • โœ… Coverage checks (>80%)

  • โœ… Docker build & push

๐Ÿ“Š Observability

Metrics Endpoints

  • /stats - Live usage statistics

  • /ledger/{name} - Settlement history

  • /quota/{agent_id} - Remaining quota

  • /swarm/stats - Autonomous agency metrics

Event Stream

Subscribe to SSE at /events for real-time:

  • Tool execution logs

  • Settlement confirmations

  • Quota updates

  • Swarm phase transitions

๐Ÿ”’ Security

  • โœ… No private keys committed (.env always ignored)

  • โœ… SSRF guards on all URL probes

  • โœ… Rate limiting per agent_id

  • โœ… Idempotency keys for settlements

  • โœ… Key rotation support via KEY_PROVIDER seam

  • โœ… Never expose exception internals in responses

Seller vs Buyer Keys:

  • RECEIVE ADDRESS: Cold wallet for revenue (separate from buyer!)

  • BUYER KEY: Hot wallet ONLY for paying upstream costs (never used for receiving)

  • NEVER put EVM_PRIVATE_KEY on Render - local only!

|## ๐ŸŒ Deployment

Live Dashboard: https://alpha-sentinel-mcp.vercel.app/ (coming soon)

Quick Deploy to Vercel

Click below or follow steps in DEPLOYMENT.md:

Deploy with Vercel

Manual Deployment

# Install Vercel CLI
npm install -g vercel

# Deploy dashboard
cd /home/keef/alpha-sentinel-mcp
vercel --prod

The dashboard will proxy API calls to your deployed backend automatically!

Render (API)

Deploy via render.yaml - auto-configures:

  • Web service on port 8403

  • Redis instance (auto-provisioned)

  • Environment variables from secure store

  • Health check endpoint: /health

Docker

docker build -t alpha-sentinel-mcp .
docker run -p 8403:8403 \
  -e X402_PAY_TO_ADDRESS=$PAY_TO \
  -e EVM_PRIVATE_KEY=$BUYER_KEY \
  alpha-sentinel-mcp

๐Ÿค Swarm Agency Integration

When SWARM_ENABLED=true, Alpha Sentinel can:

  1. Scout discover upstream x402 data sources

  2. Warden enforce spend caps per ledger/policy.json

  3. Treasurer pay for upstream data (sole spender role)

  4. Archivist compose priced composites

  5. Sovereign reprice for target LTV:CAC โ‰ฅ 3.0

  6. Merchant list composite products

Example composite: Buy raw prices from 3 upstream โ†’ aggregate โ†’ resell as "Premium Bundle" @ 3x markup!

๐Ÿ“ˆ Bazaar Discovery

Listed on CDP Bazaar with:

  • Service name: Alpha Sentinel Volatility (CDP Bazaar โ‰ค32 chars)

  • Tags: volatility,crypto,intelligence,x402,mcp (max 5)

  • Ownership proof: signed with receive address

  • Catalog URL: https://alpha-sentinel-mcp.vercel.app/.well-known/x402

๐ŸŽ“ Documentation

๐Ÿ† Success Metrics

  • Alert Latency: <30s end-to-end

  • Settlement Success: >95% first-attempt

  • LTV:CAC Ratio: Target โ‰ฅ 3.0

  • Margin Floor: โ‰ฅ 50% on composites

  • Quota Utilization: >70% pro tier conversion

๐Ÿ™ Credits

Built by Keith (kwizzlesurp10-ctrl) as part of the AI Agency Factory ecosystem. Inspired by Karpathy's LLM Wiki approach to knowledge organization and x402 micropayment revolution!

Special thanks to:

  • Coinbase CDP team for x402 facilitator

  • FastAPI + FastMCP maintainers

  • The entire open-source x402 community

๐Ÿ“„ License

MIT - Free for commercial use, attribution appreciated! โ˜…ๅฝก


Ready to monetize market intelligence?
๐Ÿ‘‰ Deploy Now
๐Ÿ‘‰ Read User Guide
๐Ÿ‘‰ View Dashboard

(โ—•โ€ฟโ—•) โœจ Predictive intelligence, powered by on-chain economics! โ™ช

Available Tools

13 tools
aggregate_sentimentA
Read-onlyIdempotent
Inspect

Aggregate social media sentiment across multiple sources.

Combines Twitter/X, Reddit, and other platforms into unified sentiment scores (-1.0 to +1.0). Detects momentum shifts and trend changes in community opinion.

Use Case: Gauge market psychology before major moves.

Cost: $0.01 USD per call

Sources: twitter, reddit, telegram, news

Output: Overall sentiment category (bullish/neutral/bearish) with breakdown by source.

Inputs: symbols (required), sources, window_minutes.

analyze_volatilityA
Read-onlyIdempotent
Inspect

Analyze price volatility using statistical Z-score anomaly detection.

Calculates standard deviations from mean price to detect anomalous movements. Configurable thresholds and time windows for customized analysis.

Use Case: Identify unusual price movements before they become obvious trends.

Cost: $0.02 USD per call

Parameters:

  • symbol: Crypto symbol to analyze

  • window_minutes: Historical window (1-1440 min, default: 60)

  • z_threshold: Std dev threshold for anomalies (0.1-5.0ฯƒ, default: 2.0)

Alert Levels: NORMAL โ†’ MODERATE โ†’ HIGH โ†’ CRITICAL

Inputs: symbol (required), z_threshold, window_minutes.

calculate_risk_scoreA
Read-onlyIdempotent
Inspect

Calculate multi-factor risk assessment for cryptocurrencies.

Combines volatility, liquidity, market cap tier, and Bitcoin correlation into a comprehensive risk score (0-1 scale) with actionable recommendations.

Use Case: Assess position sizing and stop-loss levels.

Cost: $0.03 USD per call

Risk Levels: LOW | MEDIUM | HIGH | CRITICAL

Factors Analyzed:

  • Volatility risk (40% weight)

  • Liquidity risk (25% weight)

  • Market cap tier (20% weight)

  • BTC correlation (15% weight)

Inputs: symbols (required), include_factors.

fetch_priceA
Read-onlyIdempotent
Inspect

Fetch real-time cryptocurrency price from CoinGecko API.

Returns current price, 24h change, and trading volume for any supported cryptocurrency.

Use Case: Get instant price data before executing trades or analyzing positions.

Cost: $0.005 USD per call (cheapest tier - high frequency allowed)

Example Response: { "symbol": "bitcoin", "price_usd": 67842.50, "change_24h": 2.34, "volume_24h": 28500000000, "timestamp": "2026-08-24T15:30:00Z" }

Inputs: symbol (required).

generate_market_reportA
Read-onlyIdempotent
Inspect

Generate comprehensive market intelligence report.

Synthesizes price, volatility, sentiment, and risk data into actionable insights. Perfect for daily briefings or strategic planning.

Use Case: End-of-day summary or pre-trade due diligence.

Cost: $0.15 USD per report

Report Types:

  • daily: 24-hour overview

  • weekly: 7-day trends

  • monthly: 30-day strategic analysis

Includes: Executive summary, key signals, actionable recommendations

Inputs: format, symbols, report_type.

tokenized_stock_corporate_actionA
Read-onlyIdempotent
Inspect

Fetch one announced/applied corporate action by UUID (from onchain Announcement URI).

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.02 USD per call

Inputs: corporate_action_id (required).

tokenized_stock_listB
Read-onlyIdempotent
Inspect

List Coinbase tokenized stocks on Base (read-only catalog).

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.01 USD per call

Inputs: query, page_size, page_token.

tokenized_stock_lookupA
Read-onlyIdempotent
Inspect

Lookup metadata for one tokenized stock (contract, ISIN, multiplier, prospectus).

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.01 USD per call

Inputs: symbol (required).

tokenized_stock_model_portfolioA
Read-onlyIdempotent
Inspect

Model portfolio / rebalance suggestions (weights only โ€” no orders).

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.08 USD per call

Inputs: symbols (required), objective, current_weights.

tokenized_stock_nav_deviationB
Read-onlyIdempotent
Inspect

Compare Chainlink NAV/reference to underlying equity spot (research spread).

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.02 USD per call

Inputs: symbol (required).

tokenized_stock_peg_gap_radarA
Read-onlyIdempotent
Inspect

Peg-Gap Radar: onchain DEX price vs underlying reference, alerts over threshold %.

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.03 USD per call

Inputs: symbols, page_size, alert_threshold_pct.

tokenized_stock_research_briefB
Read-onlyIdempotent
Inspect

Multi-symbol research brief: metadata, NAV staleness, deviation notes.

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.05 USD per call

Inputs: symbols (required).

tokenized_stock_seal_receiptB
Idempotent
Inspect

Seal a Proof-of-Research receipt hash on Base (ResearchReceiptRegistry).

Prepares unsigned calldata by default; optional Sepolia submit via env. Not trading.

RESEARCH ONLY โ€” not investment advice. No trading, execution, custody, or swaps. Coinbase tokenized stocks are not offered to U.S. persons.

Cost: $0.03 USD per call

Inputs: content_hash (required), brief_id.

Tool Schema Changelog

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

Loading tool schema changelogโ€ฆ

    TDQS

    A3.5/5.0

    Scored across 13 tools

    Disambiguation3/5

    The set splits into two clusters that are individually readable, but within the tokenized_stock cluster several tools measure the same thing: nav_deviation and peg_gap_radar both compare onchain/DEX price to an underlying reference, and research_brief explicitly bundles metadata + NAV staleness + deviation, substantially overlapping lookup, corporate_action, and nav_deviation. The general crypto tools (fetch_price, analyze_volatility, aggregate_sentiment, calculate_risk_score, generate_market_report) are more distinct, though generate_market_report synthesizes the others and an agent could plausibly pick it instead of the individual signals.

    Naming Consistency3/5

    Five tools follow a clean verb_noun convention (fetch_price, analyze_volatility, aggregate_sentiment, calculate_risk_score, generate_market_report), while the other eight switch to a noun namespace prefix (tokenized_stock_list, tokenized_stock_lookup, tokenized_stock_seal_receipt). Each convention is internally consistent and the namespace is readable, but mixing verb-first and noun-prefixed forms in one server is a notable deviation from a single predictable pattern.

    Tool Count4/5

    Thirteen tools sits comfortably in the well-scoped range, and each maps to a concrete operation with a stated cost tier. The count is slightly heavy because roughly four of the tokenized-stock tools (lookup, nav_deviation, research_brief, peg_gap_radar) could likely collapse into two without losing capability.

    Completeness3/5

    The tokenized-stock surface is broad (catalog, metadata, corporate actions, NAV, peg, portfolio, receipt), but tokenized_stock_corporate_action only fetches by UUID with no announcement-listing tool to discover those UUIDs, which is a real dead end. On the general crypto side, price/volatility/sentiment/risk/report are covered but there is no historical OHLC or liquidity/order-book data to feed the volatility and risk models.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides AI agents with real-time, structured data feeds including news, trends, market sentiment, and crypto prices via MCP tools.
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP-compatible AI clients to access live crypto market data and AI-driven quantitative analysis, with structured outputs and full observability.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Live Base mainnet (eip155:8453) x402 micropayment MCP gateway by Keith S. (kwizzlesurp.com ยท Sevtech ยท Dragon&PandaDuo). Pairs a free open-data catalog with $0.01 USDC property & rental compliance checks across 14+ US cities, Base gas/finality intelligence, and x402 buyer/seller tools. Verified on x402-trust (82.5/100, 100% uptime) & 24K Labs.
      5
      20
      1
      MIT