QuantContext

v1.0.0Finance & Fintechstable

QuantContext is an MCP server that gives AI agents real quant computation for better trading: stock screening, strategy backtesting, and factor analysis.

quantcontextmcpai-integration
Share:
8
Stars
0
Downloads
0
Weekly
0/5

What is QuantContext?

QuantContext is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to quantcontext is an mcp server that gives ai agents real quant computation for better trading: stock screening, strategy backtesting, and factor analysis.

QuantContext is an MCP server that gives AI agents real quant computation for better trading: stock screening, strategy backtesting, and factor analysis.

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • QuantContext is an MCP server that gives AI agents real quan

Use Cases

Screen stocks and backtest trading strategies with AI.
Perform factor analysis for quantitative trading.
zomma-dev

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 1, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx quantcontext

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use QuantContext

QuantContext is a Python MCP server that gives AI agents real quantitative computation for equity research and trading. It provides three core tools — stock screening across major indices, historical strategy backtesting with performance metrics, and Fama-French factor analysis — all using free public data sources. No API keys or paid subscriptions are required.

Prerequisites

  • Python 3.9 or later installed
  • pip package manager
  • Claude Desktop or Claude Code
  • Internet access to Yahoo Finance and Kenneth French Data Library
1

Install the quantcontext-mcp package

Install QuantContext from PyPI. This also installs the quantcontext CLI entry point.

pip install quantcontext-mcp
2

Verify the installation

Confirm the CLI is available and the server starts without errors.

quantcontext --help
3

Add to Claude Code

Register the QuantContext server with Claude Code using the mcp add command.

claude mcp add quantcontext -- quantcontext
4

Configure Claude Desktop

Add the server to your Claude Desktop configuration file. No environment variables are needed — the server requires no credentials.

{
  "mcpServers": {
    "quantcontext": {
      "command": "quantcontext"
    }
  }
}
5

Restart Claude Desktop and verify tools

Restart Claude Desktop. The three QuantContext tools should appear: screen_stocks, backtest_strategy, and factor_analysis.

QuantContext Examples

Client configuration

Minimal Claude Desktop configuration for QuantContext — no API keys required.

{
  "mcpServers": {
    "quantcontext": {
      "command": "quantcontext"
    }
  }
}

Prompts to try

Quantitative research prompts to use with QuantContext in Claude.

- "Screen the S&P 500 for value stocks with PE ratio under 15 and ROE above 12%"
- "Find the top 20% momentum stocks in the Nasdaq 100 over the past 200 days"
- "Backtest a monthly-rebalanced momentum strategy on the S&P 500 over the last 3 years and show CAGR and Sharpe ratio"
- "Run factor analysis on my portfolio returns and show the Fama-French factor loadings"
- "Which Russell 2000 stocks have the highest quality scores?"

Troubleshooting QuantContext

'quantcontext' command not found after pip install

The pip install target bin directory may not be in your PATH. Run 'python -m quantcontext' as an alternative, or add the pip bin directory to PATH (e.g., ~/.local/bin on Linux/macOS). In Claude Desktop config, use the full path: 'command': '/Users/you/.local/bin/quantcontext'.

screen_stocks returns an error fetching data for the S&P 500 universe

QuantContext fetches constituent lists from Wikipedia and price data from Yahoo Finance. A network timeout or Wikipedia formatting change may cause failures. Check your internet connection and retry — the data sources are public and occasionally change structure.

backtest_strategy returns NaN for Sharpe ratio

A Sharpe ratio of NaN usually means the strategy had zero or near-zero returns variance over the test period. Try a longer backtest window (e.g., 3-5 years) or a different universe/strategy combination.

Frequently Asked Questions about QuantContext

What is QuantContext?

QuantContext is a Model Context Protocol (MCP) server that quantcontext is an mcp server that gives ai agents real quant computation for better trading: stock screening, strategy backtesting, and factor analysis. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install QuantContext?

Follow the installation instructions on the QuantContext GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with QuantContext?

QuantContext works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is QuantContext free to use?

Yes, QuantContext is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "quantcontext": { "command": "npx", "args": ["-y", "quantcontext"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use QuantContext?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides