bloomberg-mcp
Provides Model Context Protocol tools for accessing Bloomberg Terminal data including BDP, BDH, BDIB, BQL, bond analytics, screening, and field search.
README
Bloomberg MCP Server
A self-documenting Model Context Protocol server for Bloomberg Terminal data access. Works with any MCP client — Claude Code, Cursor, VS Code, LM Studio, or custom agents — without requiring a separate skill file or prompt injection.
Features
- 12 tools — status/reset, BDP, BDH, BDIB, BQL, bond analytics, screening, field search, reference docs, examples
- 17 BQL reference files — comprehensive syntax documentation served as MCP resources
- 27 verified test queries — covering equity, fixed income, credit, CDS, returns, curves, and funds
- xbbg-first execution - BDP, BDH, BDIB, BQL, screening, field search, and bond analytics use xbbg with stable pandas/wide output
- In-process BQL - BQL runs in-process via blpapi; no separate BQNT environment required
- Self-documenting — BQL syntax rules embedded in tool descriptions; no external skill file needed
Prerequisites
- Bloomberg Terminal — must be running and logged in
- uv — provisions the project's Python 3.11+ environment automatically; the setup script installs it if missing
Installation
Agent-friendly setup
On a Bloomberg Terminal workstation, Claude or Codex can install and configure the MCP with:
git clone https://github.com/sbctreasury/bloomberg-mcp.git
cd bloomberg-mcp
powershell -ExecutionPolicy Bypass -File .\scripts\setup-bloomberg-mcp.ps1
The setup script:
- Finds or installs
uvfor the current Windows user - Runs
uv syncagainst the repo lockfile to create/update the project.venv - Persists the
BLOOMBERG_MCP_HOMEuser environment variable - Writes a project
.mcp.json - Updates Claude Desktop at
%APPDATA%\Claude\claude_desktop_config.json - Optionally registers Claude Code with
-RegisterClaudeCode(Claude Code auto-discovers the bundled plugin otherwise) - Updates Codex at
%USERPROFILE%\.codex\config.tomlor$CODEX_HOME\config.toml - Verifies Bloomberg Terminal/API connectivity with a bounded probe
Restart Claude Desktop, Claude Code, or Codex after setup so the client reloads MCP configuration.
Manual setup
1. Clone the repo
git clone https://github.com/sbctreasury/bloomberg-mcp.git
2. Configure your MCP client
Option A: Setup script (recommended)
The setup script installs uv if needed, syncs the project environment, and writes MCP configs with resolved user-specific paths.
powershell -ExecutionPolicy Bypass -File .\scripts\setup-bloomberg-mcp.ps1
Option B: uv MCP config
Use this shape if writing a config manually:
claude mcp add bloomberg -- uv run --project /path/to/bloomberg-mcp python /path/to/bloomberg-mcp/launcher.py
Or add to .mcp.json:
{
"mcpServers": {
"bloomberg": {
"command": "uv",
"args": ["run", "--project", "C:/path/to/bloomberg-mcp", "python", "C:/path/to/bloomberg-mcp/launcher.py"],
"env": {
"BLOOMBERG_MCP_HOME": "C:/path/to/bloomberg-mcp",
"PYTHONUTF8": "1"
}
}
}
}
Cursor / VS Code / LM Studio JSON shape:
{
"bloomberg": {
"command": "uv",
"args": ["run", "--project", "C:/path/to/bloomberg-mcp", "python", "C:/path/to/bloomberg-mcp/launcher.py"],
"env": {
"BLOOMBERG_MCP_HOME": "C:/path/to/bloomberg-mcp",
"PYTHONUTF8": "1"
}
}
}
Tip: The setup script resolves the full
uv.exepath automatically. If writing config by hand, find it withwhere uv.
Option C: Manual install
cd bloomberg-mcp
pip install -r server/requirements.txt
pip install --index-url=https://blpapi.bloomberg.com/repository/releases/python/simple/ blpapi
Then configure with python directly:
{
"command": "python",
"args": ["C:/path/to/bloomberg-mcp/launcher.py"]
}
Tools
| Tool | Description |
|---|---|
bloomberg_status |
Check terminal connectivity, warm the xbbg data backend, and show circuit-breaker state |
bloomberg_bdp |
Reference/snapshot data (current values) |
bloomberg_bdh |
Historical time series |
bloomberg_bdib |
Intraday bar data |
bloomberg_bql |
Execute BQL queries (with syntax validation + error hints) |
bloomberg_bql_build |
Natural language → BQL query template |
bloomberg_bond_info |
Fixed income analytics (yield, duration, spreads) |
bloomberg_screen |
Saved or ad-hoc security screening |
bloomberg_field_search |
Discover Bloomberg field mnemonics |
bloomberg_bql_reference |
Get BQL syntax docs for a domain |
bloomberg_bql_examples |
Get verified BQL examples + test queries |
MCP Resources
The server exposes BQL reference documentation as MCP resources:
bloomberg://references/index— navigation indexbloomberg://references/{domain}/{file}— domain-specific referencebloomberg://tests/{file}— verified test queries
BQL Reference Domains
| Domain | Coverage |
|---|---|
equity |
Prices, volumes, market cap, EPS, PE, screening |
fixed-income |
Bond yield, spread, duration, DV01, universe screening |
credit |
Ratings, CDS, issuance |
returns |
Total return, cross-asset return series |
curves |
Sovereign, BVAL, HSA, issuer curves |
funds |
NAV, AUM, risk/return, screening |
functions |
50+ BQL functions (groupAvg, cumProd, rolling, etc.) |
securitized |
Agency CMBS, TRACE trades |
Critical BQL Syntax Rules
These rules are embedded in tool descriptions so any MCP client learns them automatically:
| Wrong | Correct |
|---|---|
yield(type=ytw) |
yield(yield_type=YTW) |
duration(type=modified) |
duration(duration_type=modified) |
spread(type=oas) |
spread(spread_type=OAS) |
bondsUniv(...) |
bondsuniv(Active) (lowercase) |
rating(source=SP) >= 'AA-' |
rating(source=SP).source_scale <= 4 |
Project Structure
bloomberg-mcp/
├── pyproject.toml # uv project config (auto-installs deps)
├── launcher.py # Public MCP entrypoint / dependency bootstrapper
├── server/
│ ├── server.py # Internal FastMCP implementation (12 tools + resources)
│ ├── bloomberg_client.py # Unified xbbg data access (BQL in-process via blpapi)
│ ├── bql_builder.py # BQL validation + template builder
│ ├── chart_engine.py # Chart rendering helpers
│ ├── utils.py # Helpers (status check, serialization)
│ └── requirements.txt
├── references/ # 17 BQL reference files
│ ├── _tree-index.md
│ ├── equity/
│ ├── fixed-income/
│ ├── credit/
│ ├── returns/
│ ├── curves/
│ ├── funds/
│ ├── functions/
│ └── securitized/
└── tests/ # 27 verified .bql test queries
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。