MCP Stock Market
MCP股票市场
一个使用 Alpha Vantage API 检索股票市场数据的模型上下文协议 (MCP) 工具。该工具通过简单的 MCP 界面提供任何股票代码的每日股票市场数据访问。
要求
Node.js v18 或更高版本
Alpha Vantage API 密钥(提供免费套餐)
Related MCP server: Stock Ticker MCP Server
设置
安装依赖项
npm install根据
.env.example创建一个.env文件并添加您的 Alpha Vantage API 密钥ALPHA_VANTAGE_API_KEY=your_api_key_here您可以从Alpha Vantage获取免费的 API 密钥。
构建项目
npm run build
MCP 客户端配置
要将此工具与您的 MCP 客户端一起使用,您需要更新 MCP 服务器配置。请将以下内容添加到您的客户端配置中:
{
"mcpServers": {
"stock-market": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-stock-market/build/index.js"
]
}
}
}确保将/ABSOLUTE/PATH/TO/PARENT/FOLDER替换为包含此存储库的父目录的实际绝对路径。
可用工具
获取股票数据
检索特定股票代码的每日股票市场数据。
参数:
symbol:股票代码(例如 IBM、AAPL、MSFT、GOOG、AMZN)
MCP 客户端中的示例用法:
@stock-market get-stock-data symbol=AAPL响应示例:
Stock: AAPL
Last Updated: 2025-03-12
Time Zone: US/Eastern
Daily Prices:
Date: 2025-03-12
Open: $178.35
High: $180.13
Low: $177.53
Close: $179.63
Volume: 58,492,206
---
Date: 2025-03-11
Open: $177.99
High: $179.70
Low: $176.86
Close: $178.95
Volume: 62,630,570
---发展
项目结构
src/index.ts- 包含 MCP 服务器和工具实现的主应用程序文件build/——编译后的 JavaScript 输出.env- 环境变量(API 密钥)
命令
npm run build构建 TypeScript 代码
API 使用说明
此工具使用 Alpha Vantage API 检索股票市场数据。Alpha Vantage 的免费套餐有以下限制:
每天 25 次 API 调用
每分钟 5 次 API 调用
如果您需要更多容量,请考虑升级到他们的高级计划。
故障排除
如果您遇到问题:
确保您的 Alpha Vantage API 密钥在
.env文件中正确设置检查您是否正在使用 Node.js 版本 18 或更高版本
验证 MCP 客户端配置中的路径是否正确
重启 MCP 客户端
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseDqualityDmaintenanceAllows Claude and other MCP clients to access real-time and historical stock market data from Alpha Vantage API, including intraday and daily stock data with customizable intervals.366MIT
- -licenseNot gradedqualityDmaintenanceProvides real-time and historical stock market data through the Alpha Vantage API. Enables users to get current stock prices and retrieve historical stock data for any major stock symbol via natural language queries.
- AlicenseCqualityDmaintenanceProvides access to real-time and historical stock market data through the Alpha Vantage API, enabling financial analysis and market data queries through natural language.10074Apache 2.0
- FlicenseBqualityCmaintenanceProvides a suite of stock analysis tools for Claude, enabling real-time price tracking, financial data retrieval, and technical indicator calculations like RSI and MACD. It leverages Finnhub and Alpha Vantage APIs to deliver comprehensive market insights through the Model Context Protocol.8
Related MCP Connectors
Alpha Vantage MCP — Stock market data, fundamentals, and earnings
Twelve Data MCP: real-time & historical market data (stocks, crypto, forex, etc).
Live financial data MCP: FX, crypto, stocks, news, URL reader. x402 on Base: $0.001/call.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ctoouli/mcp-stock-market'
If you have feedback or need assistance with the MCP directory API, please join our Discord server