blpapi-mcp

MCP.Pizza Chef: djsamseng

blpapi-mcp is a Model Context Protocol (MCP) server that provides real-time financial data by integrating Bloomberg's blpapi. It requires a running Bloomberg Terminal with accessible BBComm for data access. This server enables developers and financial applications to stream structured Bloomberg market data into LLM-powered workflows, facilitating advanced financial analysis and decision-making.

Use This MCP server To

Stream real-time Bloomberg financial data into AI workflows Integrate Bloomberg market data with LLM-based trading assistants Fetch structured financial metrics for automated report generation Enable financial data querying within coding environments Combine Bloomberg data with other APIs for enriched analysis Support algorithmic trading strategies with live market data Provide financial context to AI models for investment research

README

BLPAPI-MCP

A MCP server providing financial data from Bloomberg's blpapi.

Note: A Bloomberg Terminal must be running (BBComm must be accessible) for data access.

Installation

Using UV

uv add git+https://github.com/djsamseng/blpapi-mcp

Run the MCP Server

uv run blpapi-mcp --sse --host 127.0.0.1 --port 8000

Using blpapi-cmp from Cursor

  • For project only: create .cursor/mcp.json in your project directory
  • For global: create ~/.cursor/mcp.json
  • Replace the host and port with the MCP server running from above
{
  "mcpServers": {
    "server-name": {
      "url": "http://127.0.0.1:8000/sse",
    }
  }
}

Using blpapi-mcp from Claude Code

  • Replace the url with the MCP server running from above
claud mcp add --transport sse blpapi-mcp http://127.0.0.1:8000/sse

Using blpapi-mcp from Aider

Development

Requirements

  1. Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone this repository
git clone https://github.com/djsamseng/blpapi-mcp
  1. Setup the venv
uv venv
source .venv/bin/activate
  1. Run the MCP server
uv run blpapi-mcp --sse --host 127.0.0.1 --port 8000
  1. Run a test client that starts up it's own server in stdio mode
uv run examples/clients/blp_stdio_client.py
  1. Run a test client that uses an existing running sse server
uv run examples/clients/blp_sse_client.py --host http://127.0.0.1 --port 8000

Trademark Note

This project not affiliated with Bloomberg Finance L.P. The use of the name Bloomberg is only descriptive as towards what this package is used with.

blpapi-mcp FAQ

What prerequisites are needed to run blpapi-mcp?
A Bloomberg Terminal must be running with BBComm accessible to provide data.
How do I install blpapi-mcp?
Install via UV using 'uv add git+https://github.com/djsamseng/blpapi-mcp'.
How do I start the blpapi-mcp server?
Run 'uv run blpapi-mcp --sse --host 127.0.0.1 --port 8000' to start the server.
How can I connect blpapi-mcp to my MCP client?
Configure your MCP client with the server URL, e.g., 'http://127.0.0.1:8000/sse' in mcp.json.
Is blpapi-mcp compatible with multiple LLM providers?
Yes, it works with OpenAI, Anthropic Claude, and Google Gemini via MCP protocol.
Can blpapi-mcp be used for historical financial data?
It primarily streams real-time data; historical data support depends on Bloomberg API capabilities.
What security considerations exist for blpapi-mcp?
Ensure Bloomberg Terminal access is secured and MCP server endpoints are protected appropriately.
Can I run blpapi-mcp on remote servers?
Yes, as long as the Bloomberg Terminal and BBComm are accessible from the server environment.