一个基于 TypeScript 的 MCP 服务器,用于获取股票市场数据。该服务器通过 Alpha Vantage API 提供实时股票市场信息和公司财务数据。
1.Plan mode
help me build a stock market mcp server that uses the AlphaVantage public API
I want it to have these tools:
- generate US market report/briefing
- generate financial statement for company
- get ticker price for company
- any other basic tools you think would be helpful
- api key: <you api key>
2. please test all the tools to confirm their functionality
get_ticker_price
- 获取股票实时价格
get_market_report
- 获取美国市场报告
get_financial_statement
- 获取公司财务报表
get_company_overview
- 获取公司概览信息
npm install
npm run build
npm run watch
要在 Claude Desktop 中使用此服务器,需要添加服务器配置:
配置文件路径:~/Library/Application Support/Claude/claude_desktop_config.json
配置文件路径:%APPDATA%/Claude/claude_desktop_config.json
配置示例:
{
"mcpServers": {
"stock-market-server": {
"command": "/path/to/stock-market-server/build/index.js"
}
}
}
由于 MCP 服务器通过标准输入输出(stdio)通信,调试可能比较困难。推荐使用 MCP Inspector 工具进行调试:
npm run inspector
运行后,Inspector 将提供一个浏览器访问地址,可以通过浏览器使用调试工具。
[添加许可证信息]
{
"mcpServers": {
"stock-market-server": {
"env": {},
"args": [
"/path/to/stock-market-server/build/index.js"
],
"command": "node"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.