🚀 IBEX 35 MCP 服務器
IBEX 35 MCP 服務器基於 模型上下文協議(MCP),讓 Claude 等大語言模型能夠全面獲取西班牙 IBEX 35 股票市場數據、公司治理信息和財務分析數據。
🚀 快速開始
前提條件
- Node.js 18 及以上版本
- Claude 桌面應用程序(或任何兼容 MCP 的客戶端)
安裝
選項 1:使用 NPM 全局安裝(推薦)
npm install -g ibex35-mcp-server
選項 2:從源代碼安裝
git clone https://github.com/anbrme/ibex35-mcp-server.git
cd ibex35-mcp-server
npm install
npm run build
配置
環境變量
IBEX35_API_URL:Cloudflare Worker API 的 URL(默認為 https://ibex35-api.ncdata.eu)
IBEX35_API_KEY:可選的 API 密鑰,用於身份驗證(如果你的 Worker 需要)
Cloudflare Worker 配置
該服務器連接到現有的 Cloudflare Worker,該 Worker 提供對 D1 數據庫的 API 訪問,無需進行本地數據庫設置。
使用方法
獨立模式
npm start
Claude 桌面應用程序配置
將以下內容添加到 claude_desktop_config.json 文件中:
如果使用 NPM 安裝:
{
"mcpServers": {
"ibex35-database": {
"command": "ibex35-mcp",
"env": {
"IBEX35_API_URL": "https://ibex35-api.ncdata.eu"
}
}
}
}
如果從源代碼安裝:
{
"mcpServers": {
"ibex35-database": {
"command": "node",
"args": ["/path/to/ibex35-mcp-server/dist/index.js"],
"env": {
"IBEX35_API_URL": "https://ibex35-api.ncdata.eu"
}
}
}
}
配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
開始使用
- 完全重啟 Claude 桌面應用程序。
- 開始新的對話。
- 詢問有關 IBEX 35 數據的問題!
✨ 主要特性
核心數據訪問
- 公司信息:提供所有 IBEX 35 公司的即時價格和關鍵指標。
- 歷史數據:提供 OHLCV 數據、業績跟蹤和趨勢分析。
- 股東信息:提供股權結構、集中度分析和交叉持股信息。
- 董事會成員:提供公司治理、董事會互鎖和高管關係信息。
- 新聞與情緒分析:提供近期新聞,並進行情緒分析和相關性評分。
- ESG 數據:提供環境、社會和治理評分及指標。
高級分析 ⚡ 增強功能
- 自然語言處理:支持用普通英語提出複雜問題。
- 公司比較:可對財務、治理和業績指標進行全面的公司對比分析。
- 趨勢分析與預測:提供高級價格趨勢分析和簡單的預測功能。
- 投資風險評估:綜合評估市場、治理和運營等多方面的投資風險。
- 分析師報告生成:生成專業的公司深度分析、行業概述和治理分析報告。
- 投資機會篩選:根據自定義標準對公司進行篩選和排名。
- 網絡分析:分析董事會互鎖關係和股東重疊情況。
- 治理風險評估:識別治理風險的警示信號和集中度指標。
- 市場相關性分析:分析行業表現和相關性。
- 遊說情報:跟蹤歐盟透明度數據和政治影響力。
特殊功能
- 即時同步:從 Google Sheets 和多個數據源同步數據。
- 週報生成:自動生成市場分析和治理亮點報告。
- 自定義查詢:可在數據庫上執行安全的 SQL 查詢。
- 全面索引:針對複雜的關係查詢進行了優化。
💻 使用示例
可用工具
公司數據
get_all_companies - 列出所有 IBEX 35 公司的當前數據。
get_company_by_symbol - 根據股票代碼獲取詳細的公司信息。
get_companies_by_sector - 按行業篩選公司。
get_companies_with_pe_ratio - 按市盈率範圍篩選公司。
治理與領導
get_company_directors - 獲取公司的董事會成員信息。
get_board_interlocks - 查找在多個董事會任職的董事。
get_directors_by_name - 在所有公司中搜索特定姓名的董事。
股權分析
get_company_shareholders - 獲取公司的股東結構信息。
get_shareholder_overlap - 查找在多家公司持有股份的股東。
get_top_shareholders_by_sector - 按行業查找頂級股東。
市場數據
get_historical_prices - 獲取歷史 OHLCV 數據。
get_top_performers - 查找特定時間段內表現最佳或最差的公司。
新聞與情緒分析
get_recent_news - 獲取最新的新聞文章,並附帶情緒分析。
get_news_by_sentiment - 按情緒(積極/消極/中性)篩選新聞。
遊說與透明度
get_lobbying_meetings - 獲取歐盟的遊說會議和活動信息。
get_most_active_lobbyists - 查找遊說活動最活躍的組織。
高級分析
get_network_analysis - 對治理關係進行全面的網絡分析。
get_sector_correlation_analysis - 分析行業表現的相關性。
⚡ 增強功能 人工智能分析
analyze_natural_query - 通過智能路由處理複雜的自然語言查詢。
compare_companies - 對公司進行多維度(財務、治理、業績)比較。
analyze_trends - 進行高級趨勢分析和預測(公司、行業、市場、相關性)。
assess_investment_risk - 全面評估投資風險(市場、治理、行業、流動性、集中度)。
generate_analyst_report - 生成專業的分析師報告(公司深度分析、行業概述、治理分析)。
screen_opportunities - 根據自定義標準和評分篩選投資機會。
報告
get_weekly_reports - 獲取生成的每週市場和治理報告。
get_esg_scores - 獲取 ESG 評分和可持續發展指標。
自定義訪問
execute_custom_query - 執行自定義 SQL 查詢(僅支持 SELECT 語句)。
示例查詢
公司治理
"Show me all directors who serve on multiple IBEX 35 boards"
"Which directors have political backgrounds or government connections?"
"Find potential conflicts of interest in IBEX 35 corporate governance"
"Who are the most connected directors in the Spanish corporate network?"
財務分析
"What are the largest IBEX 35 companies by market capitalization?"
"Show me companies with P/E ratios below 15"
"Which energy sector companies are in IBEX 35?"
"Compare the performance of banking vs telecommunications stocks"
股東情報
"Find institutional investors with holdings in multiple IBEX 35 companies"
"Show me the ownership structure of Banco Santander"
"Which companies have the most concentrated ownership?"
"Identify shareholder overlaps in the energy sector"
市場表現
"What are the best performing IBEX 35 stocks this month?"
"Show me companies that have dropped more than 10% recently"
"Compare sector performance across IBEX 35"
"Find undervalued companies based on P/E ratios"
研究與分析
"Analyze the political connections within IBEX 35 boards"
"Show me recent news sentiment for renewable energy companies"
"Which companies have the most diverse boards?"
"Find companies with suspicious governance patterns"
⚡ 增強功能 自然語言分析
"Which banking stocks have grown most in the last month?"
"Show me companies with high governance risk and explain why"
"Compare Santander vs BBVA across all metrics"
"Find undervalued large-cap companies with good governance scores"
"Generate a comprehensive report on the energy sector outlook"
"What are the price trends for telecommunications stocks?"
"Assess the investment risks of the banking sector"
"Screen for opportunities: P/E under 15, market cap over 10B, exclude energy"
📚 詳細文檔
安全機制
- 只讀訪問:數據庫連接為只讀模式。
- 查詢限制:自定義查詢僅允許使用 SELECT 語句。
- 輸入驗證:所有參數都經過驗證和清理。
- 禁止危險操作:禁止執行 DROP、DELETE、UPDATE 等危險操作。
數據庫架構
該服務器使用的綜合數據庫架構包括:
- companies:核心公司數據和指標。
- company_directors:董事會和高管信息。
- company_shareholders:股權結構信息。
- historical_prices:每日 OHLCV 市場數據。
- company_news:帶有情緒分析的新聞文章。
- lobbying_meetings:歐盟透明度和遊說數據。
- company_esg:ESG 評分和可持續發展指標。
- weekly_reports:生成的分析報告。
開發
npm run dev
npm run build
npm start
貢獻代碼
此 MCP 服務器旨在與 IBEX 35 儀表盤生態系統配合使用。請確保任何更改都能與現有數據庫架構和同步流程保持兼容。
📊 數據來源
該 MCP 服務器從以下權威西班牙數據源聚合數據:
- 馬德里證券交易所(BME) - 即時市場數據和交易信息。
- CNMV - 官方監管文件和股東披露信息。
- 歐盟透明度登記冊 - 企業遊說活動和會議信息。
- 公司網站 - 董事會組成和治理結構信息。
- 金融新聞來源 - 市場情緒和公司特定新聞。
🔒 隱私與安全
- 無需 API 密鑰:使用公開可用的數據源。
- 不涉及個人數據:僅使用公開披露的企業信息。
- 無跟蹤機制:直接進行 API 訪問,不收集數據。
- 開源透明:數據處理和分析過程完全透明。
- 只讀訪問:無法修改或刪除任何數據。
📈 使用場景
金融專業人士
- 盡職調查和投資研究。
- 通過治理分析進行風險評估。
- 識別市場趨勢和行業分析。
- 競爭情報和基準測試。
學術研究人員
- 公司治理研究和分析。
- 西班牙政治經濟學研究。
- 企業關係網絡分析。
- 金融市場行為研究。
合規與風險管理人員
- 驗證董事會獨立性。
- 識別政治關聯。
- 分析股權集中度。
- 檢測治理風險警示信號。
記者與分析師
- 對企業關聯進行調查性研究。
- 繪製政治影響力地圖。
- 市場分析和報告。
- 評估企業透明度。
🛠 故障排除
Claude 無法識別服務器
- 檢查配置文件位置和 JSON 語法。
- 完全重啟 Claude 桌面應用程序(⌘+Q,等待片刻後重新打開)。
- 驗證 Node.js 版本(需為 18 及以上)和安裝情況。
安裝問題
node --version
npm cache clean --force
npm install -g ibex35-mcp-server
API 連接問題
該服務器使用公共 API,無需身份驗證。如果遇到錯誤,請執行以下命令測試 API 可達性:
curl https://ibex35-api.ncdata.eu/api/companies
📄 許可證
本項目採用 MIT 許可證,可用於商業和非商業用途。
🔗 相關資源
為 Claude 和 MCP 社區精心打造 ❤️
為全球的 AI 助手提供西班牙企業情報支持