mcp_server

kerrybackapps/mcp_server

3.1

If you are the rightful owner of mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Rice Business MCP Server is a remote Model Context Protocol server designed to integrate Claude Code with Rice University's stock market data portal, providing access to extensive financial data.

Tools
5
Resources
0
Prompts
0

Rice Business MCP Server

Remote MCP (Model Context Protocol) server for Rice University Business School's stock market data portal. This service enables Claude Code integration with the Rice Data Portal through HTTP API endpoints.

Overview

This server acts as a bridge between Claude Code's custom connector feature and the existing Rice Data Portal, providing access to comprehensive stock market data including:

  • 15,000+ stock tickers with sector/industry classifications
  • Daily price data and market metrics
  • Fundamental financial data from SEC filings
  • Advanced financial ratio calculations
  • Growth rate analysis
  • Investment screening tools

Architecture

Claude Code → HTTP API → Rice MCP Server → Rice Data Portal → MotherDuck Database

Features

🔍 Core Data Tools

  • Search Tickers: Find stocks by sector, industry, exchange, or listing status
  • Ticker Details: Complete company information and classifications
  • List Sectors: Market sector overview with company counts
  • Database Stats: Comprehensive database statistics

📊 Advanced Analysis Tools

  • Financial Ratios: P/E, P/B, ROE, ROA using MRT (Most Recent Trailing 12M) data
  • Growth Rates: Quarter-over-quarter and year-over-year analysis
  • Stock Queries: Multi-table joins with flexible filtering
  • Investment Screens: Pre-built strategies (value, growth, dividend, momentum, quality)

API Endpoints

Core Endpoints

  • GET / - API documentation
  • GET /health - Health check
  • GET /api/tools - List available tools

Data Endpoints

  • POST /api/search_tickers - Search for stock tickers
  • POST /api/ticker_details - Get detailed ticker information
  • POST /api/list_sectors - List market sectors
  • POST /api/ticker_stats - Database statistics
  • POST /api/financial_ratios - Calculate financial ratios
  • POST /api/growth_rates - Calculate growth rates
  • POST /api/query_stocks - Advanced stock queries
  • POST /api/financial_screen - Investment screening

Authentication

All endpoints require a Rice Data Portal access token:

  1. Visit https://data-portal.rice-business.org
  2. Enter your Rice University email address (@rice.edu)
  3. Check email for confirmation link
  4. Copy your access token

Include the token in all requests:

{
  "access_token": "your_rice_token_here",
  "sector": "Technology",
  "limit": 10
}

Example Usage

Search Technology Stocks

curl -X POST https://your-mcp-server.com/api/search_tickers \
  -H "Content-Type: application/json" \
  -d '{
    "access_token": "your_token",
    "sector": "Technology",
    "limit": 10
  }'

Calculate Financial Ratios

curl -X POST https://your-mcp-server.com/api/financial_ratios \
  -H "Content-Type: application/json" \
  -d '{
    "access_token": "your_token",
    "tickers": ["AAPL", "MSFT"],
    "ratios": ["pe", "pb", "roe", "roa"]
  }'

Claude Code Configuration

Once deployed, configure Claude Code's custom connector:

{
  "customConnectors": {
    "rice-stock-data": {
      "url": "https://your-deployed-mcp-server.com",
      "description": "Rice Business stock market data"
    }
  }
}

Environment Variables

Development

Local Setup

git clone https://github.com/kerrybackapps/mcp_server.git
cd mcp_server
pip install -r requirements.txt
python app.py

Testing

# Health check
curl http://localhost:8000/health

# List available tools
curl http://localhost:8000/api/tools

Deployment

This application is designed for deployment on cloud platforms like:

  • Koyeb (recommended)
  • Heroku
  • Railway
  • DigitalOcean App Platform
  • Google Cloud Run

Simply connect your GitHub repository and the platform will automatically detect the Flask application.

Data Sources

The Rice Data Portal provides access to:

  • Tickers: Company identifiers and classifications
  • Daily: Daily stock prices and market data
  • SF1: Fundamental data from SEC filings (quarterly and annual)
  • Metrics: Technical indicators and derived metrics
  • SEP: S&P 500 historical data

All data is sourced from reliable financial data providers and updated regularly.

Rate Limits

  • Reasonable usage limits apply
  • Authentication required for all data requests
  • Contact support for high-volume research needs

Support

License

Developed by Kerry Back, J. Howard Creekmore Professor of Finance and Professor of Economics, Rice University Business School.

For academic research usage, please cite:

Rice University Business School Stock Market Data Portal, accessed via MCP Server, https://github.com/kerrybackapps/mcp_server