# QuantContext MCP server

> Enables AI agents to perform deterministic stock screening, historical backtesting, and Fama-French factor analysis using real market data.

- Repository: https://github.com/zomma-dev/quantcontext-mcp-server
- Page: https://hostedmcp.org/servers/zomma-dev/quantcontext-mcp-server
- Transport: stdio
- Stars: 10
- License: MIT
- Latest version: 0.1.2

## Install

### Claude Code

```sh
claude mcp add quantcontext-mcp-server -- uvx quantcontext-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "quantcontext-mcp-server": {
      "command": "uvx",
      "args": [
        "quantcontext-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "quantcontext-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "quantcontext-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"quantcontext-mcp-server","type":"stdio","command":"uvx","args":["quantcontext-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "quantcontext-mcp-server": {
      "command": "uvx",
      "args": [
        "quantcontext-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add quantcontext-mcp-server -- uvx quantcontext-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.quantcontext-mcp-server]
command = "uvx"
args = ["quantcontext-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user quantcontext-mcp-server uvx -- quantcontext-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "quantcontext-mcp-server": {
      "command": "uvx",
      "args": [
        "quantcontext-mcp"
      ]
    }
  }
}
```

## Tools (3)

- `screen_stocks`
- `backtest_strategy`
- `factor_analysis`

## FAQ

### Does this server require any API keys?

No, the server requires no API keys or configuration to work.

### Can I use these tools in my own Python scripts?

Yes, the tools are importable directly for use in existing Python scripts without needing an AI agent.

### How long does it take to get data?

The first tool call downloads and caches data, which takes 10-30 seconds, but subsequent calls use the local cache for much faster results.
