boc-valet-mcp
Provides LLM agents with live access to Canadian economic and financial data (exchange rates, interest rates, inflation, etc.) through the Bank of Canada Valet API, with no API key required.
README
🇨🇦 Bank of Canada Valet MCP Server
An MCP server that gives LLM agents (Claude, and any other MCP-compatible client) live access to Canadian economic and financial data through the Bank of Canada Valet API — exchange rates, interest rates, inflation series, and thousands more.
The Valet API is free and requires no API key, so this server runs out of the box.
Ask "What's the latest USD/CAD exchange rate?" or "Chart CORRA over the last month" and the agent pulls the numbers straight from the source.
Why this exists
Large language models don't know today's exchange rate — their training data is frozen in the past. MCP closes that gap by letting a model call live tools. This server is a small, focused, production-shaped example of that pattern: clean tool design, input validation, actionable errors, and tests.
Features
- 5 well-scoped tools covering discovery → metadata → data retrieval
- No API key — the Valet API is public
- Dual output — human-readable Markdown or structured JSON, per call
- Search + pagination over the large series/group catalogue
- Multi-series comparison — pull several series side by side in one call
- Agent-friendly errors — every failure explains what to try next
- Typed & validated — Pydantic
Fieldconstraints on every parameter - Tested — offline unit tests, no network needed for CI
Tools
| Tool | What it does |
|---|---|
boc_list_series |
Search / list the available data series (start here) |
boc_list_groups |
Search / list curated groups of related series |
boc_get_series_info |
Fetch metadata (label, description) for one series |
boc_get_observations |
Core: get data points for one or more series, by date range or most-recent |
boc_get_group_observations |
Get every series in a group in a single call |
Architecture
src/boc_valet_mcp/
├── server.py # MCP tool definitions (the interface agents see)
├── client.py # Async httpx client + centralized, actionable errors
└── formatting.py # Markdown / JSON rendering (shared by every tool)
The separation keeps each layer testable: tools stay thin, HTTP concerns live in one place, and presentation logic is unit-tested offline against representative payloads.
Quickstart
git clone https://github.com/Chatusvi-Karnati/boc-valet-mcp.git
cd boc-valet-mcp
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
Run it directly (it speaks MCP over stdio):
boc-valet-mcp
Inspect it interactively
The MCP Inspector is the fastest way to click through the tools:
npx @modelcontextprotocol/inspector boc-valet-mcp
Use it with Claude Desktop
Add this to your claude_desktop_config.json (see examples/):
{
"mcpServers": {
"bank-of-canada": {
"command": "boc-valet-mcp"
}
}
}
Restart Claude Desktop and ask it something like "Compare the USD/CAD and EUR/CAD rates over the past week."
Example
Calling boc_get_observations with series_names="FXUSDCAD", recent=1:
**Series:**
- `FXUSDCAD` — US dollar to Canadian dollar daily exchange rate
| Date | FXUSDCAD |
|------------|----------|
| 2024-06-03 | 1.3654 |
_1 observation(s)._
Development
pip install -e ".[dev]"
pytest # run the test suite
ruff check . # lint
How it was built
Designed and built following Anthropic's MCP server best practices — comprehensive tool coverage, readOnly/idempotent annotations, Pydantic-validated inputs, and error messages written for an agent audience. Developed with an AI-assisted workflow using Claude Code.
License
MIT — see LICENSE.
Acknowledgements
Data is provided by the Bank of Canada Valet API. This project is not affiliated with or endorsed by the Bank of Canada. Please review the Bank of Canada's terms of use for the data.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。