Skip to main content
Glama

title: MonteWalk emoji: πŸ”οΈ colorFrom: blue colorTo: purple sdk: gradio sdk_version: 6.0.0 app_file: app.py pinned: true tags:

  • building-mcp-track-enterprise

  • building-mcp-track-consumer

  • MODAL.com


πŸ”οΈ MonteWalk

Institutional-grade quantitative trading tools for AI agents
Built for the MCP 1st Birthday Hackathon πŸŽ‰

License: MIT MCP Compatible Gradio 6

πŸ“Š MCP Server Stats:
πŸ› οΈ 25+ Tools | πŸ“‘ 4 Resources | 🎯 6 Agentic Prompts


🎯 The Problem

Retail traders face an overwhelming flood of market data, news, and analysis toolsβ€”but lack the institutional-grade infrastructure to make sense of it all:

  • Data Overload: Thousands of stocks, crypto assets, news sourcesβ€”impossible to monitor manually

  • Risk Blindness: No access to professional risk metrics (VaR, drawdown, Monte Carlo)

  • Execution Friction: Scattered tools across multiple platforms, no unified workflow

  • AI Disconnect: Existing AI assistants can't access real-time market data or execute trades

What if your AI assistant could be your quantitative analyst, risk manager, and trading deskβ€”all in one?


Related MCP server: FinanceKit MCP

✨ The Solution

MonteWalk is a Model Context Protocol (MCP) server that transforms AI assistants like Claude into institutional-grade trading terminals. It provides:

πŸ”Œ MCP Integration

Connect to Claude Desktop, VSCode, or any MCP-compatible client to give your AI:

  • Real-time market data (stocks, crypto, news)

  • Portfolio management and execution

  • Risk analytics and backtesting

  • Intelligent workflows and automation

🎨 Beautiful Gradio 6 Interface

Test all tools through a polished, professional UI featuring:

  • Live Dashboard: Portfolio, watchlist, crypto trends, news feed

  • Interactive Toolbox: Direct access to 25+ trading tools

  • MCP Client Setup: Copy-paste configuration for instant connection

  • Dark Theme: Sleek glassmorphism design with smooth animations

🧠 Agentic Workflows

Pre-built prompts that guide AI through complex multi-step analyses:

  • Morning Briefing: Portfolio review, market scan, risk check

  • Gamma Hunt: Find unusual market activity and deep-dive top picks

  • Ticker Analysis: Comprehensive research (fundamentals, technicals, sentiment)

  • Portfolio Rebalancing: Optimize weights using modern portfolio theory


πŸš€ Key Features

πŸ“Š Market Intelligence

  • Multi-source Data: Yahoo Finance, Alpaca, CoinGeckoβ€”all cached for speed

  • Crypto Support: Live prices, trending coins, comprehensive market data

  • News Aggregation: yfinance β†’ NewsAPI β†’ GNews fallback pipeline

  • Sentiment Analysis: FinBERT-powered financial sentiment scoring (via Modal)

  • Unusual Activity Scanner: Detect big movers, volume spikes, reversal candidates

πŸ“ˆ Advanced Visualizations

  • Candlestick Charts: Professional OHLC charts with volume bars

  • Interactive Charts: Line, bar, histogram, scatter, heatmap support

  • Dark Theme: Charts styled to match UI with custom color palette

  • Base64 Encoding: Charts returned as embeddable images for AI consumption

  • Integrated with Tools: get_price(visualize=True), monte_carlo_simulation(visualize=True), etc.

⚑ Paper Trading Engine

  • $100K Virtual Capital: Risk-free strategy testing on Alpaca Paper Trading

  • Smart Execution: Simulated slippage and transaction costs

  • Pre-trade Risk Checks: Prevents portfolio concentration >50%

  • Position Management: Instant portfolio view and one-click flatten

πŸ›‘οΈ Institutional Risk Analytics

  • Value at Risk (VaR): Historical simulation at any confidence level

  • Monte Carlo Forecasting: GBM-based portfolio path simulations

  • Volatility Metrics: Annualized portfolio standard deviation

  • Drawdown Analysis: Track maximum peak-to-trough decline

πŸ”¬ Professional Backtesting

  • Walk-Forward Analysis: Out-of-sample validation to prevent overfitting

  • Strategy Lab: Test MA crossovers, custom indicators, any logic

  • Transaction Costs: Realistic modeling with slippage and fees

πŸ“ˆ Technical Analysis Suite

  • Smart Signals: Automated Buy/Sell/Neutral recommendations

  • 20+ Indicators: RSI, MACD, Bollinger Bands, SMAs, and more

  • Portfolio Optimization: Mean-variance, risk parity algorithms

🎯 Intelligent Watchlist

  • Auto-sync: Detects owned stocks not in watchlist and prompts addition

  • Live Prices: Real-time updates for tracked symbols

  • News Feed: Aggregated headlines for all watched assets


🎨 UI/UX Showcase

MonteWalk features a professionally designed Gradio 6 interface optimized for traders:

Landing Page

  • Hero Section: Clear value proposition with feature cards

  • Glassmorphism Design: Modern dark theme with subtle transparency

  • Smooth Navigation: Instant page transitions with scroll-to-top

Dashboard

  • 4-Panel Layout: Portfolio, Watchlist, Crypto, Newsβ€”all in one view

  • One-Click Refresh: Update all data sources simultaneously

  • Responsive Design: Works seamlessly on desktop and tablet

Toolbox

  • Organized by Category: 9 tool groups with collapsible accordions

  • Dynamic Forms: Auto-generated from function signatures

  • Clear Results: Formatted outputs with syntax highlighting

Settings

  • API Configuration: Secure credential management with password fields

  • Instant Feedback: Clear success/error messages

  • Restart Prompt: Guides users on applying changes


πŸ”§ Technical Implementation

Built with Gradio 6

  • Native MCP Support: demo.launch(mcp_server=True) enables seamless integration

  • Custom Theming: Professional dark palette using gr.themes.Base

  • Advanced CSS: Glassmorphism effects, custom animations, responsive grid

  • Navigation State: Visibility control for multi-page SPA experience

MCP Architecture

  • 25+ Tools: Comprehensive trading toolkit spanning 9 categories

  • 4 Resources: Live portfolio, watchlist, news, crypto feeds

  • 6 Prompts: Guided workflows for complex multi-step analyses

  • Error Resilience: Automatic fallbacks and graceful degradation

Data Pipeline

  • Caching Strategy: 5-minute TTL on market data requests

  • Multi-source Fallback: yfinance β†’ NewsAPI β†’ GNews β†’ CoinGecko

  • FinBERT Sentiment: Serverless GPU inference via Modal endpoint

  • Local Storage: JSON-based portfolio and watchlist persistence

Visualization System

  • Matplotlib + Seaborn: Professional charts with dark theme

  • 6 Chart Types: Candlestick, line, bar, histogram, scatter, heatmap

  • mplfinance Integration: Specialized candlestick rendering with volume

  • Base64 Images: Charts encoded for AI/web consumption

  • Tool-Integrated: Optional visualize parameter in key functions

Market Scanner

  • 3 Scan Types: Big movers, volume spikes, reversal candidates

  • Real-time Data: Powered by Alpaca market data API

  • Smart Filtering: Configurable thresholds and limits

  • Visualization Support: Bar charts for scan results

Security & Safety

  • Paper Trading Only: Zero real money risk

  • Environment Variables: API keys never committed to code

  • Position Limits: Hard-coded risk checks on every trade

  • Audit Logging: Complete action trail with timestamps


🌍 Real-World Impact

MonteWalk democratizes institutional-grade quantitative finance for retail traders and developers:

For Individual Traders

  • Learn by Doing: Practice strategies with $100K virtual capital

  • Risk Education: Understand VaR, drawdown, volatility in real-time

  • Time Savings: Automate research with AI-powered workflows

  • Better Decisions: Combine fundamentals, technicals, and sentiment

For Developers

  • MCP Template: Reference implementation for financial tool servers

  • Gradio Best Practices: Professional UI patterns with Gradio 6

  • API Integration: Multi-source data aggregation examples

  • Testing Framework: Safe paper trading environment for strategy validation

For AI Assistants

  • Context Enhancement: Give Claude/GPT financial superpowers

  • Agentic Workflows: Enable complex multi-step trading strategies

  • Real-time Data: Connect LLMs to live market information

  • Tool Orchestration: Demonstrate MCP's composability potential

Potential Extensions

  • Live Trading: Production Alpaca integration (easy switch from paper)

  • Advanced Strategies: Options, futures, arbitrage implementations

  • Social Trading: Share and clone successful agent workflows

  • Educational Platform: Interactive finance courses powered by AI


πŸŽ₯ Demo Video

Coming Soon: Full walkthrough of MonteWalk's features, MCP integration, and agentic workflows.


πŸš€ Quick Start

Click the Gradio UI above to:

  1. Explore the dashboard and toolbox

  2. View MCP client setup instructions

  3. Test tools directly in your browser

Option 2: Run Locally

Prerequisites

Installation

git clone https://github.com/N-lia/MonteWalk.git
cd MonteWalk
# Option 1: Using uv (recommended) - handles venv creation and dependency install
uv sync
# Option 2: Using pip
# python3 -m venv .venv
# source .venv/bin/activate  # Windows: .venv\Scripts\activate
# pip install -r requirements.txt

Configuration

cp .env.example .env
# Edit .env with your API keys:
# ALPACA_API_KEY=your_key
# ALPACA_SECRET_KEY=your_secret
# NEWSAPI_KEY=your_key (optional)

Run

# Gradio UI + MCP Server
uv run app.py

# Or pure MCP Server (for Claude Desktop)
uv run server.py

Option 3: Connect to Claude Desktop

1. Add to claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "montewalk": {
      "command": "/absolute/path/to/MonteWalk/.venv/bin/python",
      "args": ["/absolute/path/to/MonteWalk/server.py"]
    }
  }
}

2. Restart Claude Desktop

3. Start using MonteWalk:

  • "What's my portfolio risk?"

  • "Analyze AAPL technicals and sentiment"

  • "Backtest a 10/50 MA crossover on MSFT"

  • "Run morning briefing"


πŸ“š Documentation


πŸ—οΈ Architecture

MonteWalk/
β”œβ”€β”€ app.py              # Gradio 6 UI + MCP server
β”œβ”€β”€ server.py           # Pure MCP server (stdio)
β”œβ”€β”€ theme.py            # Custom Gradio theme
β”œβ”€β”€ config.py           # Environment config
β”œβ”€β”€ tools/              # 25 trading tools
β”‚   β”œβ”€β”€ market_data.py
β”‚   β”œβ”€β”€ execution.py
β”‚   β”œβ”€β”€ risk_engine.py
β”‚   β”œβ”€β”€ backtesting.py
β”‚   β”œβ”€β”€ feature_engineering.py
β”‚   β”œβ”€β”€ portfolio_optimizer.py
β”‚   β”œβ”€β”€ news_intelligence.py
β”‚   β”œβ”€β”€ watchlist.py
β”‚   β”œβ”€β”€ crypto_data.py
β”‚   └── ...
β”œβ”€β”€ resources/          # Educational materials
└── data/               # Local storage (gitignored)

Tech Stack

  • Frontend: Gradio 6.0, Custom CSS, Google Fonts

  • MCP: FastMCP, stdio/HTTP protocols

  • Data: yfinance, Alpaca SDK, CoinGecko, NewsAPI

  • Analysis: NumPy, SciPy, Pandas, pandas_ta

  • Sentiment: FinBERT (Modal serverless GPU)

  • Deployment: Hugging Face Spaces, Python 3.12


πŸŽ“ Learn More


πŸ™ Acknowledgments

Built for the MCP 1st Birthday Hackathon by N-lia.

Special thanks to:

  • Anthropic for the Model Context Protocol specification

  • Gradio for the amazing UI framework and MCP support

  • Alpaca for free paper trading infrastructure

  • Modal for serverless GPU inference


πŸ“„ License

MIT License - see LICENSE for details.



Made with ❀️ for the trading community

Available Tools

31 tools
add_to_watchlistC

Adds a symbol to the monitoring watchlist.

Inputs: symbol (required). Returns: result

analyze_sentimentB
Analyzes the sentiment of a given text using FinBERT on Modal (via Public Endpoint).

Args:
    text: Text to analyze (e.g., news headline, article).

Returns:
    Dictionary with polarity, confidence, and classification.

Inputs: text (required). Returns: result

cancel_orderB
Cancels a specific open order.

Args:
    order_id: The Alpaca order ID to cancel
    
Returns:
    Confirmation message

Inputs: order_id (required). Returns: result

compute_indicatorsC
Calculates technical indicators for a symbol.

Args:
    symbol: Ticker symbol.
    indicators: List of indicators (e.g., ['RSI', 'MACD', 'BBANDS']).

Inputs: symbol (required), indicators. Returns: result

flattenA
Immediately closes all open positions.

Returns:
    Summary of closed positions

Inputs: no named parameters. Returns: result

get_account_infoB

Get detailed Alpaca account information including equity, buying power, and day trade status.

Inputs: no named parameters. Returns: result

get_crypto_market_dataB
Gets comprehensive market data for a cryptocurrency.

Args:
    coin_id: CoinGecko ID (e.g., 'bitcoin', 'ethereum')
    
Returns:
    Formatted string with market data

Inputs: coin_id (required). Returns: result

get_crypto_priceB
Gets the current price of a cryptocurrency.

Args:
    coin_id: CoinGecko ID (e.g., 'bitcoin', 'ethereum', 'solana')
    vs_currency: Currency to compare against (default: 'usd')
    
Returns:
    Dictionary with price information

Inputs: coin_id (required), vs_currency. Returns: result

get_fundamentalsC
Retrieves core financial and fundamental data.

Args:
    symbol: The ticker symbol.
    
Returns:
    Dictionary containing fundamental data.

Inputs: symbol (required). Returns: result

get_newsB
Retrieves recent news headlines for a given symbol.

Args:
    symbol: Ticker symbol.
    max_items: Maximum number of news items to return.

Returns:
    JSON string of news articles with titles and publishers.

Inputs: symbol (required), max_items. Returns: result

get_orderbookB
Fetches the current order book. 
NOTE: yfinance does not provide Level 2 data. This is a placeholder to demonstrate tool registration.

Args:
    symbol: The ticker symbol.
    
Returns:
    Message indicating unavailability.

Inputs: symbol (required). Returns: result

get_order_historyC
Get order history from Alpaca.

Args:
    status: "all", "open", or "closed"
    
Returns:
    Formatted order history

Inputs: status. Returns: result

get_positionsA
Retrieves the current state of all held positions and cash balance.

Returns:
    Dict with 'cash' and 'positions' keys

Inputs: no named parameters. Returns: result

get_priceA
Retrieves historical price data (OHLCV) for a given symbol.

Args:
    symbol: The ticker symbol (e.g., 'AAPL', 'BTC-USD').
    interval: Data interval. Valid values: "1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1wk", "1mo", "3mo".
    period: Data period to download. Valid values: "1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max".
    visualize: If True, returns a candlestick chart instead of raw data.
    
Returns:
    JSON string of OHLCV data or base64-encoded candlestick chart.

Inputs: symbol (required), interval, period, visualize. Returns: result

get_symbol_sentimentC
Fetches recent news for a symbol and calculates aggregate sentiment.

Args:
    symbol: Ticker symbol.

Returns:
    Aggregate sentiment analysis of recent news.

Inputs: symbol (required). Returns: result

get_technical_summaryC

Performs a technical analysis summary (RSI, MACD, Moving Averages). Returns a 'Buy', 'Sell', or 'Neutral' signal based on aggregated indicators.

Inputs: symbol (required). Returns: result

health_checkB

Returns the health status of the MonteWalk server.

Inputs: no named parameters. Returns: result

log_actionA
Logs an agent action or reasoning step for audit purposes.

Args:
    action_type: Category (e.g., 'REASONING', 'TRADE_DECISION', 'ERROR').
    details: Description of the action.

Inputs: action_type (required), details (required). Returns: result

max_drawdownB

Calculates Maximum Drawdown.

Inputs: no named parameters. Returns: result

mean_variance_optimizeC

Calculates optimal portfolio weights using Mean-Variance Optimization (Max Sharpe).

Inputs: tickers (required), lookback. Returns: result

monte_carlo_simulationB
Runs a Monte Carlo simulation using Geometric Brownian Motion (Log Returns).

Args:
    simulations: Number of paths to simulate.
    days: Number of days to project forward.
    visualize: If True, returns a histogram of final outcomes.

Inputs: simulations, days, visualize. Returns: result

place_orderA
Submits a market or limit order to Alpaca paper trading.

Args:
    symbol: Ticker symbol.
    side: 'buy' or 'sell'.
    qty: Quantity to trade.
    order_type: 'market' or 'limit'.
    limit_price: Required if order_type is 'limit'.
    
Returns:
    Confirmation message or error

Inputs: symbol (required), side (required), qty (required), order_type, +1 more. Returns: result

portfolio_riskB

Returns annualized volatility of the portfolio.

Inputs: no named parameters. Returns: result

remove_from_watchlistC

Removes a symbol from the watchlist.

Inputs: symbol (required). Returns: result

risk_parityC

Calculates weights based on Inverse Volatility (Naive Risk Parity).

Inputs: tickers (required). Returns: result

rolling_statsB

Computes rolling mean and volatility.

Inputs: symbol (required), window. Returns: result

run_backtestA
Backtests a Moving Average Crossover strategy.

Args:
    symbol: Ticker symbol
    fast_ma: Fast moving average period
    slow_ma: Slow moving average period  
    start_date: Backtest start date
    end_date: Backtest end date
    visualize: If True, returns equity curve chart

Inputs: symbol (required), fast_ma (required), slow_ma (required), start_date, +2 more. Returns: result

search_cryptoC
Searches for cryptocurrencies by name or symbol.

Args:
    query: Search term (e.g., 'bitcoin', 'BTC', 'ethereum')
    
Returns:
    Formatted string with search results

Inputs: query (required). Returns: result

varD

Calculates Value at Risk (VaR).

Inputs: confidence. Returns: result

walk_forward_analysisC

Performs Walk Forward Analysis on MA Crossover. Optimizes (Fast, Slow) on Train, tests on Test.

Inputs: symbol (required), start_date, end_date, train_months, +1 more. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 31 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is some overlap that could cause confusion. For example, 'get_price' and 'get_crypto_price' both retrieve price data but for different asset classes, and 'analyze_sentiment' and 'get_symbol_sentiment' both handle sentiment analysis with slightly different scopes. The descriptions help clarify, but an agent might misselect between similar tools.

    Naming Consistency4/5

    Tool names predominantly follow a consistent verb_noun pattern (e.g., 'add_to_watchlist', 'cancel_order', 'get_account_info'), with only minor deviations like 'flatten' (a verb without a noun) and 'var' (an abbreviation). The naming is readable and predictable overall, though not perfectly uniform.

    Tool Count2/5

    With 31 tools, the count is excessive for a trading/analysis server, leading to potential bloat. Many tools (e.g., 'max_drawdown', 'rolling_stats', 'var') could be consolidated into broader functions, and the inclusion of placeholders like 'get_orderbook' adds unnecessary complexity. A more focused set of 15-20 tools would be more appropriate.

    Completeness4/5

    The toolset covers a wide range of trading and analysis functions, including market data, order management, portfolio analysis, and backtesting. However, there are minor gaps, such as the lack of tools for modifying watchlist entries or handling more advanced order types (e.g., stop-loss). Overall, it supports core workflows effectively with few dead ends.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      Not graded
      maintenance
      Enables LLMs to retrieve, analyze, and visualize stock prices and financial report data for quantitative trading research and investment analysis. Provides real-time and historical stock data, financial statement analysis, key metric calculations, and trading signal visualization.
      13
      -
    • A
      license
      A
      quality
      D
      maintenance
      Provides AI agents with real-time financial market intelligence including stock quotes, crypto data, technical analysis, and portfolio insights. Enables natural language queries for current prices, technical indicators, asset comparisons, and portfolio analysis.
      17
      9
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Provides real-time market data tools (quotes, news, earnings calendar, watchlist scanner, and composite analysis) for AI agents via Finnhub, with optional Alpaca broker integration and graceful degradation.
      6
      MIT