Skip to main content
Glama
prithvi1029

fred-economic-intelligence-mcp

by prithvi1029
README.md
# FRED Agentic Economic Intelligence MCP

An open-source, MCP-native economic intelligence server built on the Federal Reserve Economic Data API. The project combines deterministic FRED tools with a curated economic knowledge graph, graph-enhanced retrieval, explainability, an Economic Digital Twin, scenario simulation, and a LangGraph-compatible multi-agent workflow.

## Capabilities

- FRED series search, metadata, observations, comparison, snapshots, and calendar-aware growth calculations
- MCP tools for economic graph queries and evidence retrieval
- Curated macroeconomic knowledge graph with transparent edges and confidence metadata
- Lightweight GraphRAG using graph traversal plus local evidence retrieval
- Economic Digital Twin with growth, inflation, labor, policy, housing, and financial-condition states
- Directional scenario simulation with propagation traces and explicit limitations
- Explainability through data provenance, domain attribution, graph paths, and citations
- Supervisor-led multi-agent workflow compatible with LangGraph
- Deterministic fallback mode that does not require an LLM API key

## Important scope statement

This is a research-grade decision-support project. The digital twin and scenario engine are transparent directional models, not validated causal macroeconomic forecasts or investment advice.

## Install

```powershell
uv sync
```

Create a `.env` file locally:

```text
FRED_API_KEY=your_fred_api_key
```

Never commit the `.env` file.

## Run

```powershell
uv run python -m fred_economic_intelligence_mcp.server
```

Or:

```powershell
uv run fred-economic-intelligence-mcp
```

## Main MCP tools

### FRED data

- `health_check`
- `search_series`
- `get_series_metadata`
- `get_series_observations`
- `compare_series`
- `latest_snapshot`
- `calculate_growth_rate`

### Agentic intelligence

- `query_economic_graph`
- `retrieve_economic_evidence`
- `build_economic_digital_twin`
- `simulate_economic_scenario`
- `explain_economic_signal`
- `run_agent_workflow`

## Normalized signal convention

Digital-twin inputs use values from `-1.0` to `1.0`:

- positive: indicator increased or strengthened
- negative: indicator decreased or weakened
- zero: neutral or unavailable

The twin applies indicator-specific interpretation. For example, increases in unemployment or initial claims contribute negatively to labor-market strength.

Example:

```json
{
  "CPIAUCSL": 0.25,
  "UNRATE": 0.40,
  "PAYEMS": -0.10,
  "HOUST": -0.30,
  "T10Y2Y": -0.50
}
```

## Scenario shocks

Supported MVP shocks:

- `policy_rate_change`
- `unemployment_change`
- `inflation_change`

Example:

```json
{
  "policy_rate_change": -0.5
}
```

## Test

```powershell
uv run pytest -v --cov=fred_economic_intelligence_mcp --cov-report=term-missing
```

## Open-source release

Before publishing, ensure `.env`, `.venv`, `.coverage`, caches, and Git internals are excluded from the archive and repository.

<!-- mcp-name: io.github.prithvi1029/fred-economic-intelligence -->

TDQS

B3.3/5.0

Scored across 12 tools

Disambiguation4/5

Most tools have clearly distinct purposes, but there is slight potential for confusion between advanced tools like 'simulate_economic_scenario' and 'build_economic_digital_twin' or 'explain_economic_signal' and 'query_economic_graph'. Overall, an agent can differentiate them with careful description reading.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case, e.g., 'search_series', 'get_series_observations', 'simulate_economic_scenario'. This makes the set predictable and easy to navigate.

Tool Count5/5

With 12 tools, the server is well-scoped. It covers data retrieval, analysis, and advanced simulation without being overwhelming. Each tool contributes meaningfully to the economic intelligence domain.

Completeness5/5

The tool set is comprehensive for a FRED-based economic intelligence server. It includes search, metadata, observations, multiple series operations, growth rates, and advanced features like digital twin, scenario simulation, and agent workflows. No obvious gaps are present.

Maintenance

ActivityStale
ResponsivenessNo issues