BRVM MCP Server
by Dilane-Kamga
README.md
# ๐จ๐ฎ BRVM MCP Server
**An MCP server for West Africa's regional stock exchange.**
Connect any AI agent โ Claude, ChatGPT, Cursor, Copilot, LangGraph โ to live market data from the [BRVM](https://www.brvm.org/) (Bourse Rรฉgionale des Valeurs Mobiliรจres), serving 8 UEMOA member states across West Africa.



[](https://github.com/Dilane-Kamga/brvm-mcp-server/actions/workflows/ci.yml)
---
## Why?
The BRVM lists ~46 companies across Bรฉnin, Burkina Faso, Cรดte d'Ivoire, Guinรฉe-Bissau, Mali, Niger, Sรฉnรฉgal, and Togo, with a combined market cap of about 21 trillion XOF (brvm.org, 2026-10-14). Yet it has **no public API**. This server bridges that gap, making BRVM data accessible to the AI ecosystem via the [Model Context Protocol](https://modelcontextprotocol.io).
### What's coming on the BRVM
- **December 18, 2026**: First derivatives market in francophone West Africa (futures on indices and stocks)
- **2026โ2027**: ETF listings
- **2026**: Agricultural commodities exchange (BMPA CI) โ cashew, maize, cola nut
This server is built to grow alongside these developments.
## Features
### Tools (9)
| Tool | Description |
|------|-------------|
| `get_market_summary` | Full trading session overview: volume, value, gainers/losers, indices |
| `get_stock_price` | Current quote for a specific ticker (price, change, volume) |
| `get_indices` | All BRVM indices: Composite, BRVM 30, Prestige, Principal, sectors |
| `get_top_movers` | Top N gainers and losers of the day |
| `get_company_info` | Company details: name, country, sector, market cap |
| `search_stocks` | Search by name, country, or sector |
| `list_tickers` | All ~46 BRVM tickers with metadata |
| `get_sika_stock_page` | Sikafinance page of a ticker: beta, RSI, % of capital traded, dividend history, price ranges, recent headlines, investor poll |
| `get_sika_news` | Dated news headlines of a ticker, from Sikafinance |
### Resources
| URI | Description |
|-----|-------------|
| `brvm://about` | BRVM exchange overview for context injection |
### Prompts
| Prompt | Description |
|--------|-------------|
| `analyze_stock` | Structured analysis of a BRVM stock |
| `market_report` | Full daily market report template |
## Quick Start
### Prerequisites
- Python 3.11+
- [uv](https://docs.astral.sh/uv/) (recommended) or pip
### Install & Run
```bash
# Clone
git clone https://github.com/Dilane-Kamga/brvm-mcp-server.git
cd brvm-mcp-server
# Install
uv sync
# Run (stdio โ for Claude Desktop / Cursor)
uv run brvm-mcp
# Run (HTTP โ for remote agents / web apps)
uv run brvm-mcp --transport streamable-http --port 8000
```
### Connect to Claude Desktop
Add to your Claude Desktop config: `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows.
```json
{
"mcpServers": {
"brvm": {
"command": "uv",
"args": ["run", "--directory", "/path/to/brvm-mcp-server", "brvm-mcp"]
}
}
}
```
Quit Claude Desktop completely and start it again: it reads the config only at startup. The BRVM tools then appear in the tools menu of a conversation.
### Test with MCP Inspector
```bash
npx @modelcontextprotocol/inspector uv run brvm-mcp
```
### Docker (remote deployment)
```bash
docker build -t brvm-mcp .
docker run -p 8000:8000 brvm-mcp
```
## Example Conversations
Once connected, you can ask Claude:
> *"What's the BRVM market doing today?"*
> โ Calls `get_market_summary()`, returns full session data
> *"Show me Sonatel's stock price"*
> โ Calls `get_stock_price("SNTS")`
> *"What does Sikafinance show for Sonatel: RSI, beta, latest news?"*
> โ Calls `get_sika_stock_page("SNTS")`
> *"Which BRVM stocks are from Sรฉnรฉgal?"*
> โ Calls `search_stocks(country="Sรฉnรฉgal")`
> *"Give me a full market report"*
> โ Uses the `market_report` prompt to orchestrate multiple tool calls
> *"Which stocks dropped the most today?"*
> โ Calls `get_top_movers()`, focuses on losers
## Architecture
```
โโโโโโโโโโโโโโโโโโโโ MCP (stdio/HTTP) โโโโโโโโโโโโโโโโโโโโ
โ AI Agent โโโโโโโโโโโโโโโโโโโโโโโโโโโบโ BRVM MCP Server โ
โ (Claude, GPT, โ โ โ
โ Cursor, etc.) โ โ FastMCP + Tools โ
โโโโโโโโโโโโโโโโโโโโ โ + Cache Layer โ
โโโโโโโโโโฌโโโโโโโโโโ
โ httpx
โโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
โโโโโโโโโโผโโโโโโโโโโ โโโโโโโโโโโผโโโโโโโโโ
โ brvm.org โ โ sikafinance.com โ
โ โข Homepage (same-โ โ โข Ticker pages โ
โ day price/idx) โ โ (beta, RSI, โ
โ โข BOC PDF (volumeโ โ dividends) โ
โ /YTD/Principal,โ โ โข News headlines โ
โ 1h cache) โ โ (15 min delay) โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
```
- **FastMCP**: Decorator-based MCP framework (official Python SDK)
- **httpx**: Async HTTP client for scraping
- **BeautifulSoup4 + lxml**: HTML parsing
- **pdfplumber**: BOC PDF parsing (index summary regex + per-stock table extraction)
- **diskcache**: TTL-based disk caching (5min default, respectful of sources)
- **Pydantic**: Structured data models
Prices, indices and volumes come from the exchange's own site (`brvm.org`). Sikafinance adds
fields the exchange does not publish. An earlier version scraped `afx.kwayisi.org` as its primary
source; it lagged a full trading session and had uptime problems, so it was dropped.
## Roadmap
- [ ] **v0.2** โ Historical price data (OHLCV bars)
- [ ] **v0.3** โ BRVM official announcements / corporate actions feed
- [ ] **v0.4** โ BMPA CI commodities data (when available)
- [ ] **v0.5** โ Derivatives data (futures, options โ post Dec 2026 launch)
- [ ] **v1.0** โ OAuth + rate limiting for multi-user deployment
- [ ] Register on [MCP Registry](https://registry.modelcontextprotocol.io)
## Data sources and terms
| Source | What it provides | Freshness |
|--------|------------------|-----------|
| [brvm.org](https://www.brvm.org/) homepage | Prices, % change, market cap, value traded, BRVM Composite / 30 / Prestige | Same day |
| Bulletin Officiel de la Cote (PDF on brvm.org) | Volume per stock, year-to-date % of the indices, BRVM Principal | One session behind |
| [Sikafinance](https://www.sikafinance.com/) | Beta, RSI, % of capital traded, dividend history, dated headlines, investor poll | 15 minutes delayed (Sikafinance's own notice) |
This project is not affiliated with the BRVM or with Sikafinance, and the data belongs to them. The
server reads public pages when a tool is called, for research and personal use; it does not host
or redistribute a copy of them. brvm.org's legal notice reserves all reproduction rights, so check
each source's terms before you redistribute its data.
How the server treats its sources:
- **robots.txt is respected**: no request to a disallowed path. brvm.org's robots.txt asks for
10 seconds between requests; the cache keeps repeated tool calls off the site, so avoid calling
tools in a tight loop.
- **Caching**: 5 minutes per tool call, 1 hour for the BOC PDF.
- **Polite User-Agent** that names the project.
- **Public pages only**: no login and no paywall. Sikafinance's premium articles come back as
headlines only.
For real-time FIX feeds, contact BRVM directly: [brvm.org/real-time-data-feed](https://www.brvm.org/en/real-time-data-feed)
## Contributing
Contributions are welcome, in English or French. Start with
[CONTRIBUTING.md](CONTRIBUTING.md): setup, checks, how to add a tool, and the rules for collecting
data. Issues labelled
[`good first issue`](https://github.com/Dilane-Kamga/brvm-mcp-server/labels/good%20first%20issue)
are a good way in.
Priority areas:
1. Historical data (OHLCV bars, roadmap v0.2)
2. Offline tests on saved pages (VCR cassettes) for the scrapers
3. Additional data sources, once their terms allow it
4. TypeScript port for Node.js MCP hosts
If the project is useful to you, a star on GitHub helps other people find it.
## Contributors
- [@AmadouAz](https://github.com/AmadouAz): brvm.org as the primary source, with the BOC PDF (#1);
Sikafinance stock pages and news (#2).
## License
MIT
---
Built with โ in Mauritius by [Dilane Foguรฉ Kamga](https://www.linkedin.com/in/dilane-fogue-kamga/) โ Senior Software & AI Engineer, Financial Engineering MSc ([WorldQuant University](https://www.wqu.edu/mscfe)).
*Bridging AI and African capital markets.*
TDQS
A4/5.0
Scored across 7 tools
Disambiguation5/5
Each tool targets a distinct function: company info, price data, indices, market summary, movers, ticker list, and search. Minimal overlap; descriptions clarify boundaries.
Naming Consistency5/5
All tool names follow a clear verb_noun pattern in snake_case (e.g., get_company_info, list_tickers, search_stocks), providing predictability for agents.
Tool Count5/5
Seven tools cover the essential operations for a stock exchange information server without redundancy or unnecessary complexity, fitting well within the ideal 3-15 range.
Completeness4/5
The set covers core information retrieval needs (price, company details, indices, search, movers). Minor gaps like historical data or dividend info exist but do not critically impair typical workflows.
Maintenance
ActivityMaintained
ResponsivenessUnresponsive