BCRP-MCP
Provides repository access for the MCP server code, allowing users to clone, contribute to, and report issues with the implementation.
Supports connecting to the remote MCP server using the npx command line tool, which is bundled with Node.js.
Hosts the remote version of the MCP server at bcrp-mcp.onrender.com, allowing users to connect to the service without running it locally.
Click on "Deploy 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-MCPshow me Peru's inflation rate over the last 5 years"
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
Model Context Protocol (MCP) Server for BCRP Economic and Financial Time Series Data
👨💻 Author
Ivan Yang Rodriguez Carranza
📋 Table of Contents
Related MCP server: FRED MCP Server
🎯 Overview
BCRP-MCP is a Model Context Protocol (MCP) server that provides seamless access to economic and financial time series data from the BCRP (Banco Central de Reserva del Perú) - Central Reserve Bank of Peru. This server enables AI agents and applications to search, explore, and analyze Peru's economic indicators, financial statistics, and monetary data through a standardized MCP interface.
🎬 Demo
https://github.com/user-attachments/assets/c42eb8c3-4a1c-442d-bd12-cc1fd4ff18ae
Demo (Spanish): https://youtube.com/shorts/gsjC07WR0n0
🔧 Tools
Name | Input | Description |
|
| Search for time series groups using one or multiple keywords |
|
| Find all time series within a specific group, returns code and name pairs |
|
| Retrieve time series data for a specific code within a date range |
Note: When using the remote server, the MCP client may require increased connection timeout settings.
💬 Prompts
Name | Input | Description |
|
| Guided workflow to find relevant time series using keyword search |
|
| Financial analysis workflow that extracts keywords, searches data, and answers questions |
🚀 How to Use
Claude Desktop (Remote Server)
Note: Requires
npxwhich comes bundled with npm. If you don't have npm installed, install Node.js which includes npm.
Add to Claude Desktop config (Claude > Settings > Developer > Edit Config):
{
"mcpServers": {
"bcrp_mcp_remote": {
"command": "npx",
"args": [
"mcp-remote",
"https://bcrp-mcp.onrender.com/mcp"
]
}
}
}Local Server
Note: Make sure you have
uvinstalled. If not, install it from uv.tool.
Clone and install:
git clone https://github.com/rodcar/bcrp-mcp.git
cd bcrp-mcp
uv syncAdd to Claude Desktop config (Claude > Settings > Developer > Edit Config):
Note: Replace
/path/to/bcrp-mcpwith the actual path where you cloned the repository.
{
"mcpServers": {
"simple_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/bcrp-mcp",
"run",
"main.py"
]
}
}
}MCP Inspector (Alternative)
Note: Requires
npxwhich comes bundled with npm. If you don't have npm installed, install Node.js which includes npm.
Note: Replace
/path/to/bcrp-mcpwith the actual path where you cloned the repository.
Run
npx @modelcontextprotocol/inspector \
uv \
--directory /path/to/bcrp-mcp \
run \
main.pyOpen MCP Inspector (URL displayed in the console) and configure the MCP client with the following settings:
Transport Type: Streamable HTTP
URL:
http://bcrp-mcp.onrender.com/mcpRequest Timeout: Increase from default values
Maximum Total Timeout: Increase from default values
Proxy Session Token: Use the token generated in the console
💡 Examples
Prompt | Language | Question | Conversation |
| Spanish | "¿Cómo ha evolucionado la tasa de interés de referencia en el último año?" | https://claude.ai/share/34df5f90-7a35-474d-b4cf-e8f48c3f9772 |
🏛️ Architecture Diagram
BCRP-MCP follows the Model Context Protocol specification and provides a clean abstraction layer over the BCRP API.
graph LR
CLIENT[MCP Client<br/>Claude Desktop, IDE, etc.] --> MCP_SERVER[BCRP-MCP Server]
subgraph TOOLS ["🔧 Tools"]
SEARCH_GROUP[search_time_serie_group]
SEARCH_SERIES[search_time_series_by_group]
GET_DATA[get_time_series_data]
end
subgraph "💬 Prompts"
SEARCH_PROMPT[search_data]
ASK_PROMPT[ask]
end
MCP_SERVER --> SEARCH_GROUP
MCP_SERVER --> SEARCH_SERIES
MCP_SERVER --> GET_DATA
MCP_SERVER --> SEARCH_PROMPT
MCP_SERVER --> ASK_PROMPT
TOOLS --> BCRP_API[BCRP API<br/>estadisticas.bcrp.gob.pe]
style CLIENT fill:#e3f2fd
style MCP_SERVER fill:#f3e5f5
style BCRP_API fill:#fff3e0📝 License
This project is licensed under the Apache License 2.0.
🙏 Acknowledgments
BCRP for providing open access to Peru's economic data
bcrpy library for the Python interface to BCRP data (https://github.com/andrewrgarcia/bcrpy)
Note: bcrpy was used in early development, is no longer a dependency. Unfortunately the performance for the remote MCP server led to response timeouts.
Available Tools
3 toolsget_time_series_dataA
Get the data for a specific time series within a date range.
This function retrieves time series data from the BCRP (Banco Central de Reserva del Perú) database for a specific time series code within the specified date range. The data is returned as a list of lists with dates formatted as 'YYYY-MM-DD'.
Args: time_series_code (str): The unique code identifier for the time series. start (str): The start date for the data retrieval. Format should be '2020-1' for monthly data or '2020-1-1' for daily data. end (str): The end date for the data retrieval. Format should be '2020-1' for monthly data or '2020-1-1' for daily data.
Returns: List[List[str]]: A list of lists where each inner list contains: [formatted_date, time_series_value] The date is formatted as 'YYYY-MM-DD' and the value is the corresponding data point for that date.
| Name | Required | Description | Default |
|---|---|---|---|
| time_series_code | Yes | ||
| start | Yes | ||
| end | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses the data source (BCRP database) and return format, but lacks information on rate limits, authentication requirements, error handling, or data freshness. It adequately describes the read-only nature but misses operational constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, args, returns) and avoids redundancy. However, the opening sentence could be more front-loaded with key distinctions from siblings, and some details about the BCRP source could be condensed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters with 0% schema coverage and an output schema present, the description does an excellent job explaining parameter semantics and return format. It covers the essential 'what' and 'how', though it lacks context on when to use versus siblings and behavioral constraints like rate limits.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate fully. It provides detailed semantics for all three parameters: explains what time_series_code is, specifies date format variations (monthly vs daily) for start and end, and clarifies their roles in data retrieval. This adds significant value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get the data for a specific time series within a date range' and specifies it retrieves from the BCRP database. It distinguishes from siblings by focusing on data retrieval for a specific code rather than searching by group, though the distinction could be more explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by specifying date ranges and time series codes, but does not explicitly state when to use this tool versus the sibling tools (search_time_series_by_group, search_time_series_groups). No guidance on prerequisites or alternative scenarios is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_time_series_by_groupA
Search for time series within a specific group from the BCRP database.
This function retrieves time series metadata from the BCRP (Banco Central de Reserva del Perú) database and filters it to find all time series that belong to a specific group. It returns a list of dictionaries containing the code and name of each matching time series.
Args: time_series_group (str): The name of the time series group to search within. This should match or be contained within the "Grupo de serie" field in the BCRP metadata.
Returns: List[Dict[str, str]]: A list of dictionaries where each dictionary contains: - "code": The unique identifier code for the time series - "name": The descriptive name of the time series If an error occurs, returns a list with a single dictionary containing an "error" key with the error message.
| Name | Required | Description | Default |
|---|---|---|---|
| time_series_group | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses that the tool retrieves metadata (not actual data), describes the return format in detail, and mentions error handling. However, it doesn't cover important behavioral aspects like rate limits, authentication requirements, or whether this is a read-only operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, Args, Returns), front-loads the core functionality, and every sentence adds value. No redundant information or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description does an excellent job explaining the tool's purpose, parameters, and return format. It could be more complete by addressing behavioral aspects like authentication or rate limits, but for a search tool with one parameter, it provides substantial context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must compensate fully. It provides excellent parameter semantics: explains what 'time_series_group' represents, specifies it should match the 'Grupo de serie' field, and clarifies matching/containment logic. This adds substantial value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('search for time series within a specific group'), identifies the resource (BCRP database), and distinguishes from siblings by focusing on group-based filtering rather than data retrieval (get_time_series_data) or group searching (search_time_series_groups).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool (searching within a specific group from BCRP database) but doesn't explicitly state when not to use it or name specific alternatives. The sibling tools suggest natural alternatives but aren't explicitly mentioned in the description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_time_series_groupsA
Search for time series groups using one or multiple keywords.
This function searches the BCRP (Banco Central de Reserva del Perú) database for time series groups that match the provided keywords. It returns a list of unique time series group names that contain or relate to the search terms.
Args: keywords (List[str]): A list containing one or more keywords to search for. Each keyword should be a single word without spaces.
Returns: List[str]: A list of unique time series group names that match the search criteria. Returns an empty list if no matches are found.
| Name | Required | Description | Default |
|---|---|---|---|
| keywords | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses that it returns a list of unique group names (not the data itself) and returns empty list for no matches, which is useful behavioral context. However, it doesn't mention performance characteristics, rate limits, authentication needs, or whether results are paginated/sorted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear purpose statement, detailed parameter explanation, and return value description. Every sentence adds value - no wasted words. It's appropriately sized for a single-parameter search tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (search operation), no annotations, and the presence of an output schema (which covers return values), the description is mostly complete. It explains the purpose, parameters, and basic behavior well. Minor gaps include lack of information about search algorithm (exact match, partial, case sensitivity) and result limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining the 'keywords' parameter in detail: it's a list of strings, each keyword should be a single word without spaces, and multiple keywords can be used. This adds crucial meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search for time series groups using one or multiple keywords' and specifies it searches the BCRP database. It distinguishes from siblings by focusing on groups rather than individual time series data (get_time_series_data) or searching within groups (search_time_series_by_group).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool (searching for time series groups by keywords in the BCRP database), but doesn't explicitly state when not to use it or directly compare it to sibling tools. It implies usage through its specific focus on groups rather than data or within-group searches.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
- First observed
get_time_series_data - First observed
search_time_series_by_group - First observed
search_time_series_groups
TDQS
Scored across 3 tools
The three tools have clearly distinct purposes with no overlap: get_time_series_data retrieves actual time series data, search_time_series_by_group finds series within a specific group, and search_time_series_groups searches for group names. Each tool serves a different function in the data discovery and retrieval workflow.
All tools follow a consistent snake_case naming pattern with clear verb_noun structure: get_time_series_data, search_time_series_by_group, and search_time_series_groups. The naming convention is predictable and readable throughout the set.
Three tools is reasonable for a specialized BCRP data server, though it feels slightly minimal. The tools cover core discovery and retrieval workflows, but additional utilities like metadata lookup or data transformation might enhance completeness. The count is appropriate but could benefit from slight expansion.
The toolset provides good coverage for the BCRP time series domain with clear data retrieval and discovery capabilities. Minor gaps exist, such as no direct metadata lookup by code or data transformation tools, but agents can work effectively with the provided search and get operations for most common use cases.
Maintenance
Related MCP Connectors
Banco Central de Reserva del Perú (BCRP) statistics series API MCP. Keyless.
A Model Context Protocol server exposing real-time and historical Colombo Stock Exchange (CSE) data to AI agents and LLM applications. Provides quotes and OHLCV price history, full financial statements (income, balance sheet, cash flow), pre-computed technicals (moving averages, RS ratings, volume signals), macroeconomic indicators, corporate actions, and rule-based screening across CSE stocks and sector indices, everything needed to build CSE-aware trading assistants, research tools, and market-analysis agents. This is the official MCP server of www.ceyloncharts.com
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
FRED macro data, Treasury yields, FX rates & macro indicators for AI agents. Pay-per-query via x402.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools to search and retrieve economic data series from the Federal Reserve Economic Data (FRED) API.2317 npm11AGPL 3.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides access to Federal Reserve Economic Data (FRED), enabling users to retrieve, analyze, and compare economic indicators and time series data through natural language.2-
- AlicenseAqualityBmaintenanceProvides access to over 5,000 macroeconomic indicators from the Banco Central de Reserva del Perú (BCRP) statistical database. It enables AI agents to search for indicators, fetch time-series data, and generate professional economic charts.41MIT
- AlicenseAqualityBmaintenanceEnables AI agents to access economic statistics from the Central Reserve Bank of Peru, including exchange rates, interest rates, and GDP, without requiring an API key.7MIT