Skip to content

Installation

  • Python 3.10+
  • Bloomberg Terminal or B-PIPE connection
  • Bloomberg C++ SDK

For ZFP over leased lines, you also need Bloomberg-provided TLS client credentials and trust material. See Configuration: ZFP over Leased Lines for the exact configure() call and mutually exclusive connection options.

Terminal window
pip install xbbg

xbbg requires the Bloomberg C++ SDK shared library. You have several options:

Install the official Bloomberg Python bindings:

Terminal window
pip install blpapi --index-url https://blpapi.bloomberg.com/repository/releases/python/simple/

xbbg will automatically detect and use the bundled SDK.

import xbbg
# Check SDK detection
print(xbbg.get_sdk_info())
# {'sources': [{'name': 'blpapi_python', 'version': '3.25.x.x', ...}], 'active': 'blpapi_python'}
# Check version
print(xbbg.__version__)

If you want Claude Code or OpenCode to call Bloomberg directly, install the local MCP launcher and binary from GitHub Releases:

Terminal window
curl -fsSL https://raw.githubusercontent.com/alpha-xone/xbbg/main/scripts/install-xbbg-mcp.sh | sh

This installer currently targets macOS arm64 and Linux amd64. Windows release .zip assets are attached to GitHub Releases for manual installation.

GitHub release assets include only the xbbg wrapper/binary pair. They do not bundle Bloomberg SDK files or the Bloomberg runtime; you must provide those locally via blpapi, BLPAPI_ROOT, or another supported runtime source.

The launcher uses the same Bloomberg runtime detection order as the Python package family:

  1. XBBG_MCP_LIB_DIR
  2. BLPAPI_LIB_DIR
  3. BLPAPI_ROOT
  4. vendored SDK under vendor/blpapi-sdk/
  5. the official Python blpapi package
Terminal window
claude mcp add --transport stdio xbbg -- ~/.local/bin/xbbg-mcp
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"xbbg": {
"type": "local",
"command": ["/Users/you/.local/bin/xbbg-mcp"],
"enabled": true
}
}
}

For the full env surface and local smoke test instructions, see apps/xbbg-mcp/README.md.

Continue to Quick Start to make your first Bloomberg request.