墨西哥股市数据服务器

DataBursatil MCP Server是一个提供墨西哥股票市场(BMV、BIVA)数据的API服务器,支持多种金融数据查询和分析功能。

  • by angel7i
  • Python
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 angel7i/databursatil-mcp

使用说明

数据库MCP服务器

MCP服务器访问 数据交易所 API,提供墨西哥股票市场(BMV,BIVA)的数据。

需求

  • Python 3.10或更高版本
  • 紫外线 (推荐)或pip
  • DataBursatil API令牌(在 数据库)

安装

紫外线(推荐)

# Clone or download the project
cd databursatil-mcp

# Install dependencies
uv sync

使用pip

cd databursatil-mcp
pip install -e .

配置

服务器需要DataBursatil身份验证令牌。配置 DATABURSATIL_TOKEN 环境变量:

# Linux/macOS
export DATABURSATIL_TOKEN="your_30_character_token"

# Windows (PowerShell)
$env:DATABURSATIL_TOKEN = "your_30_character_token"

# Windows (CMD)
set DATABURSATIL_TOKEN=your_30_character_token

Claude中的配置

将以下配置添加到您的 claude_desktop_config.json 文件:

Claude代码中的配置

{
  "mcpServers": {
    "databursatil": {
      "command": "uv",
      "args": ["--directory", "/path/to/databursatil-mcp", "run", "databursatil-mcp"],
      "env": {
        "DATABURSATIL_TOKEN": "your_token_here"
      }
    }
  }
}

可用工具

1. get_emisoras

获取有关发行人及其系列的一般信息。

参数 类型 必填 说明
letra string 否 按首字母或单词筛选
mercado string 否 “本地”、“全局”或两者都有

使用示例:

"Show me issuers starting with A"
"List all issuers in the global market"

2. get_intradia

在交易时间获取日内报价。

参数 类型 必填 说明
emisora_serie string 是 最多10个发行者。例如:“AMXL*,FEMSAUBD”
bolsa string 是 “BMV”或“BIVA”
intervalo string 是 “1米”、“5米”或“1小时”
inicio string 是 日期YYYY-MM-DD
final string 是 日期YYYY-MM-DD

使用示例:

"Show me intraday prices for AMXL* in 5-minute intervals for today"

3. get_cotizaciones

获取发行人的当前价格。

参数 类型 必填 说明
emisora_serie string 是 最多50个发行人
concepto string Yes u,p,a,x,n,c,m,v,o,i(见下表)
bolsa string 是 “BMV”、“BIVA”或两者都有

可用概念:

代码 描述
u 最新价格
p 加权平均价格
a 以前的价格
x 最高价格
n 最低价格
c 百分比变化
m 比索变化
v 体积
o 运营
i 累计金额

使用示例:

"What is the current price of AMXL* and FEMSAUBD?"
"Show me the volume and percentage change for GFNORTEO"

4. get_top

按不同标准获取发行人的排名。

参数 类型 必填 说明
variables 字符串 是 “上升”,“下降”,“金额”,“数量”,“交易”
bolsa string 是 “BMV”或“BIVA”(只有一个)
cantidad int 是 1-50
mercado string 是 “本地”或“全局”
inicio string 是 日期YYYY-MM-DD
final string 是 日期YYYY-MM-DD

使用示例:

"What are the top 10 stocks gaining today on the BMV?"
"Top 5 issuers with highest volume this week"

5. get_historicos

获取历史收盘价。

参数 类型 必填 说明
emisora_serie string 是 单一发行人
inicio string 是 日期YYYY-MM-DD
final string 是 日期YYYY-MM-DD

使用示例:

"Show me the price history for AMXL* for the last month"
"BIMBOA closing prices for 2024"

6. get_financieros

获取发行人的财务报表。

参数 类型 必填 说明
emisora string Yes Ticker WITHOUT系列。例如:“AMXL”
periodo string 是 格式“1T_2025”(季度_年)
financieros 字符串 是 “位置”,“流量”,“结果季度”,“累计结果”

使用示例:

"Show me FEMSA's balance sheet for Q1 2025"
"AMXL quarterly results for Q4 2024"

7. get_indices

获取股票市场指数价格。

参数 类型 必填 说明
ticker string 否 按索引筛选。例如:“IPC”、“DJI”

使用示例:

"How is the IPC today?"
"Show me all stock market indices"

8. get_tasas

获取墨西哥货币市场利率。

参数 类型 必填 说明
ticker string 否 按速率筛选。例如:“TIIE28”

使用示例:

"What is the 28-day TIIE rate?"
"Show all reference rates"

9. get_divisas

获取货币汇率。

参数 类型 必填 说明
ticker string 否 货币对。例如:“USDMXN”

使用示例:

"What's the dollar exchange rate?"
"Euro to peso exchange rate"

10. get_commodities

获取商品价格。

参数 类型 必填 说明
ticker string 否 商品。例如:“WTI”、“GOLD”

使用示例:

"WTI oil price"
"How is gold doing today?"

11. get_noticias

获取商业和经济新闻。

没有必需的参数。

使用示例:

"What are the latest financial news?"

12. get_cables

从墨西哥发行人那里获取新闻电报。

参数 类型 必填 说明
categorias 字符串 否 “公告”,“顶部”,“评估”,“闪光”,“将军”

使用示例:

"Show me today's issuer bulletins"
"Market flash news"

13. get_descargas

下载日终事实或估值。

参数 类型 必填 说明
archivo string 是 “hechos”或“guber”
fecha string 是 日期YYYY-MM-DD(工作日)

使用示例:

"Download last Friday's facts"
"Government valuations for January 15"

14. get_hechos

获取经过筛选的单个操作。

参数 类型 必填 说明
emisora_serie string 是 最多10个发行人
fecha string 是 日期YYYY-MM-DD
horai string 是 开始时间HH:MM
horaf string 是 结束时间HH:MM

使用示例:

"Show me AMXL* operations for today between 9:00 and 11:00"

15. get_creditos

显示令牌的可用积分。

没有必需的参数。

使用示例:

"How many credits do I have left?"

发展

在本地测试服务器

# With MCP inspector
uv run mcp dev src/databursatil_mcp/server.py

# Run directly
uv run databursatil-mcp

常见错误

错误 原因 解决方案
“令牌未配置” 环境变量未设置 配置 DATABURSATIL_TOKEN
“无效或过期的令牌” 不正确的令牌 在databursatil.com上验证您的令牌
“积分用尽” 没有可用积分 等到本月1日
“无效参数” 格式不正确 检查日期和参数格式

许可证

麻省理工学院

链接