BCRP MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BCRP MCP ServerWhat is today's USD/PEN exchange rate?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BCRP MCP Server
Connects any MCP-compatible AI agent to BCRPData — the official open-access economic statistics database of the Banco Central de Reserva del Perú (BCRP).
Access real-time and historical data for exchange rates, interest rates, international reserves, monetary liquidity, private sector credit, commodity prices, stock market indicators, and GDP — no API key required.
Works with: Claude Desktop · Claude Code · Cursor · VS Code Copilot · Windsurf · Zed · Continue.dev · any MCP client
Quickstart (2 minutes)
1. Install the server
# Option A: uvx (recommended — zero setup)
uvx bcrp-mcp
# Option B: pip
pip install bcrp-mcpNo API key needed. BCRPData is a fully public API.
2. Add to your AI client — see the Configuration section.
3. Start using it:
> What is the current BCRP policy rate and exchange rate?
> Use bcrp_get_macro_snapshot to get a snapshot of Peru's key economic indicators.
> Show me the evolution of Peru's international reserves since 2020.Related MCP server: Economía Venezuela MCP
Prerequisites
Python 3.11+
python --version # needs 3.11 or higheruv (recommended)
# Windows
winget install astral-sh.uv
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | shInstallation
Option A — uvx (zero configuration)
uvx bcrp-mcp
# Upgrade later
uv tool upgrade bcrp-mcpOption B — pip
pip install bcrp-mcp
bcrp-mcp # starts the serverOption C — From source (development)
git clone https://github.com/JOSETRA44/bcrp-mcp.git
cd bcrp-mcp
uv sync
cp .env.example .env # optional — customize settings
uv run bcrp-mcpConfiguration (Optional)
All settings have sensible defaults. Override via environment variables or .env file:
Variable | Default | Description |
|
| Response cache in seconds (0 = disabled) |
|
| HTTP timeout in seconds |
|
| Retries on transient errors |
|
| Default language: |
|
|
|
No API key required — BCRPData is fully open access.
Configuration by Client
Claude Desktop
Config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"bcrp": {
"command": "uvx",
"args": ["bcrp-mcp"]
}
}
}Restart Claude Desktop after saving. You'll see a hammer icon (🔨) confirming the server is loaded.
Claude Code (CLI)
Add to your .mcp.json or .antigravity.json:
{
"mcpServers": {
"bcrp": {
"command": "uvx",
"args": ["bcrp-mcp"]
}
}
}From source:
{
"mcpServers": {
"bcrp": {
"command": "uv",
"args": [
"--directory", "/absolute/path/to/bcrp-mcp",
"run", "bcrp-mcp"
]
}
}
}Run /mcp in the Claude Code prompt to confirm — you should see bcrp with 6 tools.
Cursor
{
"mcpServers": {
"bcrp": {
"command": "uvx",
"args": ["bcrp-mcp"]
}
}
}VS Code + GitHub Copilot
Create .vscode/mcp.json:
{
"servers": {
"bcrp": {
"type": "stdio",
"command": "uvx",
"args": ["bcrp-mcp"]
}
}
}Windsurf
Config: %APPDATA%\Codeium\windsurf\mcp_config.json
{
"mcpServers": {
"bcrp": {
"command": "uvx",
"args": ["bcrp-mcp"]
}
}
}Zed
Edit ~/.config/zed/settings.json:
{
"context_servers": {
"bcrp": {
"command": {
"path": "uvx",
"args": ["bcrp-mcp"]
}
}
}
}Continue.dev
Edit .continue/config.yaml:
mcpServers:
- name: bcrp
command: uvx
args:
- bcrp-mcpGeneric stdio
command: uvx
args: ["bcrp-mcp"]Available Tools (6)
Tool | Description |
| Fetch 1–10 series with optional date range (all same frequency) |
| Get the most recent N data points for 1–10 series |
| Metadata only: series names, frequency, available date range |
| Search built-in catalog of important series by keyword |
| List all catalog categories with series counts |
| Real-time snapshot of Peru's key macroeconomic indicators |
Available Prompts (3)
Prompt | Arguments | Description |
|
| Structured workflow: policy rate, liquidity (M2), credit growth |
|
| Exchange rate dynamics, reserves, dollarization |
|
| GDP growth, monetary multiplier, credit cycle |
Available Resources (3)
Resource URI | Contents |
| Complete API reference: URL structure, period formats, response schema |
| Quick reference table for all period formats by frequency |
| Curated catalog of important series with codes, names, units |
Key Series Codes
Daily (format: DD-MM-YYYY)
Code | Indicator | Unit |
| TC Interbancario Compra (USD/PEN) | S/ por US$ |
| TC Interbancario Venta (USD/PEN) | S/ por US$ |
| Tasa de Referencia BCRP | % anual |
| Tasa Interbancaria, S/ | % anual |
| Reservas Internacionales Netas | Millones US$ |
| Índice General Bursátil BVL | Índice |
| Precio del Cobre | cUS$ por libra |
| Precio del Petróleo WTI | US$ por barril |
| Índice Dow Jones | Índice |
Monthly (format: YYYY-M)
Code | Indicator | Unit |
| Liquidez Total (M2) | Millones S/ |
| Circulante (M0) | Millones S/ |
| Liquidez en Soles | Millones S/ |
| Liquidez var% 12 meses | % anual |
| Crédito Sector Privado | Millones S/ |
| Crédito var% 12 meses | % anual |
Quarterly (format: YYYY-Q)
Code | Indicator | Unit |
| PBI Nominal var% | % trimestral |
| Liquidez MN var% | % trimestral |
| Emisión Primaria var% | % trimestral |
| Multiplicador Monetario var% | % trimestral |
Example Queries
# Get the current exchange rate (last 5 trading days)
bcrp_get_latest(series_codes=["PD04637PD", "PD04638PD"], n_periods=5)
# BCRP policy rate since 2022
bcrp_get_series(
series_codes=["PD12301MD"],
start_period="01-01-2022",
end_period="30-06-2026"
)
# Monthly liquidity (M2) and credit growth last 2 years
bcrp_get_series(
series_codes=["PN00196MM", "PN00496MM", "PN00500MM"],
start_period="2024-1",
end_period="2026-6"
)
# Complete macro snapshot
bcrp_get_macro_snapshot()
# Search for more series
bcrp_search_catalog(query="tipo de cambio", frequency="monthly")
bcrp_search_catalog(query="exportaciones")API Notes
No authentication required — BCRPData is fully public.
Multiple series in one call must be the same frequency (all daily, all monthly, etc.).
Period formats differ by frequency — see
bcrp://period-formatsresource.The BCRP database has 8,000+ monthly, 2,700+ quarterly, and 800+ daily series. Browse the full catalog at estadisticas.bcrp.gob.pe.
Verify It's Working
# Interactive browser UI
npx @modelcontextprotocol/inspector uvx bcrp-mcp
# Quick smoke test
echo "" | uvx bcrp-mcp
# Unit tests (from source)
uv sync --group dev
uv run pytest tests/ -vTroubleshooting
command not found: uvx
Install uv: https://docs.astral.sh/uv/getting-started/installation/
Empty results for a series
The series code may be discontinued or the period range may not have data.
Run bcrp_describe_series first to check available date range.
Series codes with mismatched frequencies All series in a single call must share the same frequency. Daily and monthly series cannot be mixed — make two separate calls.
Slow first start uv downloads and caches the package on first run. Subsequent starts take ~0.2s.
Project Structure
bcrp-mcp/
├── src/bcrp_mcp/
│ ├── server.py # FastMCP entry point
│ ├── config.py # Settings (pydantic-settings, no auth required)
│ ├── client.py # Async HTTP client + TTL cache + retry
│ ├── exceptions.py # Error hierarchy
│ ├── formatters.py # Raw BCRP JSON → clean AI-friendly dicts
│ ├── catalog.py # Curated series catalog + search
│ ├── tools/ # 6 MCP tools
│ ├── prompts/ # 3 MCP prompts (analysis workflows)
│ └── resources/ # 3 MCP resources (guides + catalog)
├── tests/ # Unit tests (no network required)
├── .env.example # Optional configuration
└── pyproject.tomlLicense
MIT — © 2026 JOSETRA44
Data Source
All data comes from BCRPData — the official open statistics platform of the Banco Central de Reserva del Perú. For terms of use, see: https://estadisticas.bcrp.gob.pe/estadisticas/series/ayuda/condicionesUso
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JOSETRA44/BCRP-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server