Skip to main content
Glama
cfocoder

Banxico MCP Server

get_cetes_28_data

Retrieve current and historical 28-day CETES interest rate data from Mexico's central bank for financial analysis and decision-making.

Instructions

Get CETES 28-day interest rate data from Banxico.

Args: limit: Maximum number of recent data points (default: 30)

Returns: Current and historical CETES 28-day rates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • The main handler function for the 'get_cetes_28_data' tool. It is registered via the @mcp.tool() decorator. Fetches CETES 28-day interest rate data from the Banxico API (series SF282), handles optional limit parameter, and formats the response using format_interest_rate_data.
    @mcp.tool() async def get_cetes_28_data(limit: Optional[int] = 30) -> str: """ Get CETES 28-day interest rate data from Banxico. Args: limit: Maximum number of recent data points (default: 30) Returns: Current and historical CETES 28-day rates """ if not BANXICO_TOKEN: return "Error: BANXICO_API_TOKEN environment variable not set. Please configure your API token." endpoint = "series/SF282/datos" data = await make_banxico_request(endpoint, BANXICO_TOKEN) if not data: return "Failed to retrieve CETES 28-day data. Please check your API token and network connection." # Apply limit if specified if limit and data.get("bmx", {}).get("series"): for series in data["bmx"]["series"]: if "datos" in series and len(series["datos"]) > limit: series["datos"] = series["datos"][-limit:] return format_interest_rate_data(data)

Latest Blog Posts

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/cfocoder/banxico_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server