Skip to main content
Glama
BRVM MCP Server

BRVM MCP Server

by Dilane-Kamga

🇨🇮 BRVM MCP 服务器

西非区域证券交易所的首个 MCP 服务器。

将任何 AI 智能体(Claude、ChatGPT、Cursor、Copilot、LangGraph)连接到来自 BRVM(西非区域证券交易所)的实时市场数据,该交易所服务于西非 8 个 UEMOA 成员国。

MCP Python License


为什么选择它?

BRVM 在贝宁、布基纳法索、科特迪瓦、几内亚比绍、马里、尼日尔、塞内加尔和多哥上市了约 46 家公司,总市值约为 278 亿美元。然而,它没有公开的 API。此服务器弥补了这一差距,通过 模型上下文协议 (Model Context Protocol) 使 AI 生态系统能够访问 BRVM 数据。

BRVM 的未来发展

  • 2026 年 12 月 18 日:法语西非首个衍生品市场(指数和股票期货)

  • 2026–2027 年:ETF 上市

  • 2026 年:农产品交易所 (BMPA CI) — 腰果、玉米、可乐果

此服务器旨在随着这些发展而不断成长。

Related MCP server: Alpha Vantage MCP Server

功能

工具 (7)

工具

描述

get_market_summary

完整的交易时段概览:成交量、成交额、涨跌幅榜、指数

get_stock_price

特定股票代码的当前报价(价格、涨跌幅、成交量)

get_indices

所有 BRVM 指数:综合指数、BRVM 30、Prestige、Principal、行业指数

get_top_movers

当日涨幅和跌幅前 N 名

get_company_info

公司详情:名称、国家、行业、市值

search_stocks

按名称、国家或行业搜索股票

list_tickers

所有约 46 个 BRVM 股票代码及其元数据

资源

URI

描述

brvm://about

用于上下文注入的 BRVM 交易所概览

提示词

提示词

描述

analyze_stock

对 BRVM 股票的结构化分析

market_report

完整的每日市场报告模板

快速入门

先决条件

  • Python 3.11+

  • uv(推荐)或 pip

安装与运行

# Clone
git clone https://github.com/dilanefk/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

连接到 Claude Desktop

添加到您的 Claude Desktop 配置中(macOS 上位于 ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "brvm": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/brvm-mcp-server", "brvm-mcp"]
    }
  }
}

重启 Claude Desktop。您将在 🔨 菜单中看到 BRVM 工具。

使用 MCP Inspector 进行测试

npx @modelcontextprotocol/inspector uv run brvm-mcp

Docker(远程部署)

docker build -t brvm-mcp .
docker run -p 8000:8000 brvm-mcp

示例对话

连接后,您可以询问 Claude:

"今天 BRVM 市场表现如何?" → 调用 get_market_summary(),返回完整的会话数据

"显示 Sonatel 的股票价格" → 调用 get_stock_price("SNTS")

"哪些 BRVM 股票来自塞内加尔?" → 调用 search_stocks(country="Sénégal")

"给我一份完整的市场报告" → 使用 market_report 提示词来编排多个工具调用

"今天哪些股票跌幅最大?" → 调用 get_top_movers(),重点关注跌幅榜

架构

┌──────────────────┐     MCP (stdio/HTTP)     ┌──────────────────┐
│   AI Agent       │◄────────────────────────►│  BRVM MCP Server │
│ (Claude, GPT,    │                          │                  │
│  Cursor, etc.)   │                          │  FastMCP + Tools │
└──────────────────┘                          │  + Cache Layer   │
                                              └────────┬─────────┘
                                                       │ httpx
                                              ┌────────▼─────────┐
                                              │  Data Sources    │
                                              │  • afx.kwayisi   │
                                              │  • brvm.org      │
                                              │  • Rich Bourse   │
                                              └──────────────────┘
  • FastMCP:基于装饰器的 MCP 框架(官方 Python SDK)

  • httpx:用于抓取的异步 HTTP 客户端

  • BeautifulSoup4 + lxml:HTML 解析

  • diskcache:基于 TTL 的磁盘缓存(默认 5 分钟,尊重数据源)

  • Pydantic:结构化数据模型

路线图

  • [ ] v0.2 — 历史价格数据 (OHLCV K 线)

  • [ ] v0.3 — BRVM 官方公告 / 公司行动推送

  • [ ] v0.4 — BMPA CI 商品数据(可用时)

  • [ ] v0.5 — 衍生品数据(期货、期权 — 2026 年 12 月推出后)

  • [ ] v1.0 — 用于多用户部署的 OAuth + 速率限制

  • [ ] 在 MCP 注册表 上注册

数据来源与合理使用

此服务器抓取公开可用的数据。它实现了:

  • 缓存(5 分钟 TTL)以最小化请求

  • 礼貌的 User-Agent 标头以标识项目

  • 无身份验证绕过 — 仅限公开数据

如需实时 FIX 数据源,请直接联系 BRVM:brvm.org/real-time-data-feed

贡献

欢迎提交 PR!优先领域:

  1. 额外的数据源 (eodhd.com, Rich Bourse)

  2. 历史数据支持

  3. 测试 (pytest + 用于抓取测试的 VCR cassettes)

  4. 用于 Node.js MCP 主机的 TypeScript 移植

许可证

MIT


由 Dilane Fogué Kamga 在毛里求斯伴着 ☕ 构建 — 高级软件与 AI 工程师,金融工程硕士 (WorldQuant University)。

架起 AI 与非洲资本市场的桥梁。

Available Tools

7 tools
get_company_infoB

Get detailed information about a BRVM-listed company.

Args: ticker: The BRVM ticker symbol.

Returns company name, country, sector, and market cap.

NameRequiredDescriptionDefault
tickerYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must convey all behavioral traits. It describes a read operation but fails to mention any restrictions, side effects, or rate limits. The description is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: two sentences plus a bullet list. Every word carries weight. No repetition or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description need not detail return structure. It lists core fields (name, country, sector, market cap) adequately. Lacks error handling info but acceptable for a simple lookup.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage; the description adds 'The BRVM ticker symbol' for the ticker parameter, which provides exchange context. However, it lacks format examples or constraints like case sensitivity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the verb 'Get' and the resource 'detailed information about a BRVM-listed company'. The return fields help clarify scope. However, it does not explicitly differentiate from siblings like get_stock_price or get_market_summary, leaving some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like search_stocks or get_stock_price. Lacks any 'when not to use' or context about prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_indicesA

Get current values for all BRVM indices: BRVM Composite (BRVM-CI), BRVM 30, BRVM Prestige, BRVM Principal, and sector indices.

Returns a JSON array of index objects with value, change, and YTD performance.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description adequately discloses the return format (JSON array of index objects with specific fields) and implies a read-only, non-destructive operation, but it does not mention rate limits or authentication needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences: the first clearly states the action and scope, the second provides output details. No unnecessary words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no annotations, the description fully covers what the tool does and what it returns, being complete for a simple data retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so schema coverage is 100%. The description adds value by listing the specific indices returned, providing context beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves current values for all BRVM indices, listing specific index names, which differentiates it from sibling tools that focus on individual stocks or market summaries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for index data but does not explicitly state when to use this tool versus alternatives like get_stock_price or get_market_summary, lacking exclusions or context for choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_market_summaryA

Get today's BRVM market summary including total volume, value traded, number of gainers/losers, and all index values.

Returns a JSON object with the full trading session overview.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It states returns a JSON object with trading session overview, but no side effects, auth needs, or rate limits are mentioned. Adequately discloses return content.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly written sentences with no fluff. Front-loaded with key information and precise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so description needn't detail return values. Mentions key fields. For a parameterless market summary, description is complete given schema presence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in schema (100% coverage), so description naturally adds no extra parameter info. Baseline score of 4 applies as no compensation needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it gets today's BRVM market summary with specific data points (volume, value, gainers/losers, index values), distinguishing it from sibling tools like get_company_info (company-specific) and get_indices (just indices).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies use for a market overview, but lacks explicit when-to-use vs. alternatives. No guidance on when not to use or exclusions, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_stock_priceA

Get the current price and trading data for a specific BRVM-listed stock.

Args: ticker: The BRVM ticker symbol (e.g., SNTS for Sonatel, SGBC for Société Générale CI, ETIT for Ecobank Transnational, ORAC for Orange CI, ONTBF for Onatel).

Returns a JSON object with price, change, volume, and company details.

NameRequiredDescriptionDefault
tickerYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It describes return object fields but lacks details on data freshness, error handling, or required permissions. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two clear sentences plus a list of examples. No redundant information, though could be even more terse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose, required parameter, and output structure. Minor omissions like handling of invalid tickers or data source are not critical for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description adds meaningful examples and context for the ticker parameter, explaining it's a BRVM symbol and listing common values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it gets current price and trading data for a specific BRVM-listed stock. Verbs and resource are specific, and it distinguishes from siblings like get_company_info or get_market_summary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit comparison to sibling tools or guidance on when to use this tool over alternatives. Usage is implied but not directly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_top_moversA

Get today's top gaining and losing stocks on the BRVM.

Args: n: Number of stocks to return per category (default 5, max 10).

Returns a JSON object with 'gainers' and 'losers' arrays.

NameRequiredDescriptionDefault
nNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description bears full burden. It discloses basic behavior: returns JSON with 'gainers' and 'losers' arrays. However, it omits potential edge cases (e.g., market closed, no movers) and does not explicitly state it is read-only or require authentication.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences: one for purpose, one for parameter, one for return format. No extraneous information; every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, parameter, and return format. With an output schema present, return details are sufficient. However, it lacks a definition of 'top' (e.g., percentage change or absolute change), which would improve completeness for a first-time user.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0% description coverage, but the description clearly explains parameter 'n': its purpose ('Number of stocks to return per category'), default (5), and maximum (10). This fully compensates for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool retrieves 'today's top gaining and losing stocks on the BRVM,' specifying verb, resource, and scope. It distinguishes from siblings like 'get_stock_price' (single stock) and 'get_market_summary' (broader market data).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied (for daily top movers) but no explicit guidance on when to use this tool versus alternatives like 'get_stock_price' or 'search_stocks'. No exclusions or prerequisites mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tickersA

List all BRVM ticker symbols with their company names, countries, and sectors.

Useful for discovering available tickers before calling get_stock_price. Returns a JSON array of all ~46 listed companies.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description is the sole source. States returns a JSON array with approximate size (~46), implying read-only behavior. Could mention it's non-destructive, but adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences: purpose, usage hint, return format. No wasted words, front-loaded with key info.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose, usage, and return format. Output schema exists, so return details are not needed. Lacks info on ordering or filtering, but for a simple list tool, it's largely complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters (0 params), so baseline is 4. Description adds no parameter info, which is acceptable as schema is empty and coverage is 100%.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb (list), resource (BRVM ticker symbols), and scope (company names, countries, sectors). Distinguishes from siblings like get_stock_price by focusing on discovery.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly suggests using before get_stock_price, providing a clear use case. Lacks explicit 'when not to use' or alternatives beyond that.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_stocksA

Search BRVM-listed stocks by name, country, or sector.

Args: query: Free-text search on company name or ticker (e.g., 'orange', 'ecobank', 'SNTS'). country: Filter by UEMOA country (e.g., 'Sénégal', 'Côte d'Ivoire', 'Burkina Faso', 'Bénin', 'Togo', 'Mali', 'Niger', 'Guinée-Bissau'). sector: Filter by sector (e.g., 'Services Financiers', 'Agriculture', 'Services Publics', 'Industrie', 'Distribution', 'Transport').

Returns a JSON array of matching companies. At least one filter must be provided.

NameRequiredDescriptionDefault
queryNo
countryNo
sectorNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must carry the burden. It mentions the return type (JSON array) and the constraint, but does not disclose safety (e.g., read-only), idempotency, or potential rate limits. The behavior is implied as safe, but not stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose, followed by structured argument details. It is slightly verbose due to listing example values, but remains clear and functional without wasted sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of annotations and presence of an output schema, the description covers the core functionality, parameters, and return type. It also notes the constraint. Missing details like error handling or pagination but acceptable for a search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description provides rich semantic context for all three parameters: query as free-text on name/ticker, country with list of UEMOA countries, and sector with specific sector names. This fully compensates for the missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the tool searches BRVM-listed stocks by name, country, or sector, using precise verbs and distinct filtering dimensions. It distinguishes itself from siblings like get_company_info and list_tickers, which target specific data retrieval rather than search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states 'At least one filter must be provided,' setting a clear constraint. However, it lacks explicit guidance on when to prefer this tool over siblings, e.g., searching by criteria vs. fetching details for a known ticker.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.1.0
    • First observedget_company_info
    • First observedget_indices
    • First observedget_market_summary
    • First observedget_stock_price
    • First observedget_top_movers
    • First observedlist_tickers
    • First observedsearch_stocks

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

ActivityNo data
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Provides access to real-time stock prices, financial statements, news, and options data via the Model Context Protocol. It enables AI assistants to retrieve comprehensive market data, including historical prices and analyst recommendations, through a standardized interface.
    9
    55 PyPI
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides structured access to Nepal Stock Exchange market data through the Model Context Protocol, enabling AI integration for querying real-time stock data and market analysis.
    64
    MIT