# pyeconomics

pyeconomics — an MCP server with 50 families of economics and finance models: fixed income, derivatives, portfolios, risk, econometrics, macro and asset pricing. Every result ships with a provenance manifest.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11 repo stars
- Author: pyeconomics-dev
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pyeconomics-dev/pyeconomics
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/pyeconomics

## What it does

The server covers 13 domains: finance foundations, fixed income, derivatives, international finance, equity, corporate finance, accounting, portfolios, performance measurement, risk management, econometrics, macroeconomics and asset pricing. The data platform connects 31 providers and 171 catalog concepts with real-time vintages. Typed inputs declare units and bounds; rates and percentages are decimals — `0.05` stands for 5%.

Each model runs through the Python API, the `pyeconomics` CLI, the REST API (`pyeconomics serve`) or the MCP server (`pyeconomics mcp`). Requires Python 3.12 or later; beta version 1.0.0b1 needs explicit installation: `pip install --pre pyeconomics==1.0.0b1`. To run the server with MCP support, install the extra package: `pip install --pre "pyeconomics[mcp]==1.0.0b1"` or launch directly with `uvx --from "pyeconomics[mcp]==1.0.0b1" pyeconomics mcp`.

Results export to tables or reproducibility bundles. The stable 0.2.6 release includes four monetary policy rules over FRED data and remains MIT-licensed; the new version moves to Apache 2.0.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add pyeconomics -- uvx pyeconomics
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyeconomics <command>

### Codex

**Platform CLI**
```bash
codex mcp add pyeconomics -- uvx pyeconomics
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyeconomics <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "pyeconomics": {
            "command": "uvx",
            "args": [
                "pyeconomics"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyeconomics <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "pyeconomics": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "pyeconomics"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyeconomics <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add pyeconomics uvx pyeconomics
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyeconomics <command>

## When to use it
- price a bond or derivative with specified parameters
- compute portfolio metrics and risk profile
- run an econometric model on live data
- get a result with full provenance manifest
- export a calculation to a reproducible bundle

## Example prompts
- Calculate portfolio return with 0.6 equity weight and 0.4 bonds
- Run an option pricing model with volatility 0.25 and strike 100
- Show the provenance manifest for the last calculation

## Similar
- [forward-risk](https://affpapa.org/en/nevibecode/skills/forward-risk.md) — skill · 766 installs
- [diversification](https://affpapa.org/en/nevibecode/skills/diversification.md) — skill · 811 installs
- [llmquant-risk](https://affpapa.org/en/nevibecode/skills/llmquant-risk.md) — skill · 561 installs
- [AgentEcon](https://affpapa.org/en/nevibecode/mcp/agentecon.md) — MCP server · 3813 installs
- [Open Markets](https://affpapa.org/en/nevibecode/mcp/open-markets.md) — MCP server · ★ 8 repo stars
- [quantoracle](https://affpapa.org/en/nevibecode/mcp/quantoracle.md) — MCP server · ★ 14 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
