Skip to main content
Glama
ctoouli

MCP Stock Market

by ctoouli

MCP股票市场

一个使用 Alpha Vantage API 检索股票市场数据的模型上下文协议 (MCP) 工具。该工具通过简单的 MCP 界面提供任何股票代码的每日股票市场数据访问。

要求

  • Node.js v18 或更高版本

  • Alpha Vantage API 密钥(提供免费套餐)

Related MCP server: Stock Ticker MCP Server

设置

  1. 安装依赖项

    npm install
  2. 根据.env.example创建一个.env文件并添加您的 Alpha Vantage API 密钥

    ALPHA_VANTAGE_API_KEY=your_api_key_here

    您可以从Alpha Vantage获取免费的 API 密钥。

  3. 构建项目

    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 调用

如果您需要更多容量,请考虑升级到他们的高级计划。

故障排除

如果您遇到问题:

  1. 确保您的 Alpha Vantage API 密钥在.env文件中正确设置

  2. 检查您是否正在使用 Node.js 版本 18 或更高版本

  3. 验证 MCP 客户端配置中的路径是否正确

  4. 重启 MCP 客户端

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    D
    quality
    D
    maintenance
    Allows 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.
    3
    6
    6
    MIT
  • -
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
  • A
    license
    C
    quality
    D
    maintenance
    Provides access to real-time and historical stock market data through the Alpha Vantage API, enabling financial analysis and market data queries through natural language.
    100
    74
    Apache 2.0
  • F
    license
    B
    quality
    C
    maintenance
    Provides 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

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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