Get the FREE Ultimate OpenClaw Setup Guide →

stock

A MCP server for real-time stock quotes, using Model Context Protocol (MCP).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yongyangli-stock-mcp-server npx -y stock-mcp-server

How to use

This Stock MCP Server provides a real-time stock quote service via the MCP (Model Context Protocol) interface. The primary tool exposes a get-quote operation that accepts a stock symbol (for example, sh600000 or sz000001) and returns the current quote data. You can configure clients to communicate with the server using the provided MCP endpoints, enabling conversational or programmatic access to live stock prices through the stock context.

To run locally, start the server using the configured command (for example, via npx with stock-mcp-server). Once running, you can request quotes by invoking the get-quote tool with the symbol parameter. If you already have the underlying package installed globally or locally, you can also run the node entry point directly (as shown in the alternative configuration) to start the server using your own path to the built index. This flexibility allows you to integrate the stock quotes capability into chatbots, apps, or scripting environments that support MCP-style interactions.

How to install

Prerequisites:

  • Node.js and npm installed on your system.
  • Access to the internet to install the stock-mcp-server package.

Installation steps:

  1. Install Node.js and npm from the official website or via your package manager.
  2. Install dependencies and build from source (if cloning the repository):
    • Run: npm install
  3. Build the project (if a build step exists):
    • Run: npm run build
  4. Run the MCP server using the recommended command:
    • For npm/npx approach: npx -y stock-mcp-server
    • Or, if you prefer to run via a local node command after building: node path/to/build/index.js
  5. Verify the server is running by issuing a test get-quote request for a known symbol (e.g., sh600000) using your MCP client.

Additional notes

Tips and notes:

  • The provided configuration demonstrates using npx with the stock-mcp-server package. If you already have the package installed locally, you can switch to a direct node execution by pointing to the built index (path/to/build/index.js).
  • If you encounter symbol resolution issues, ensure the data source for real-time quotes is reachable and that any API keys are configured if required by the stock provider.
  • The environment is often sensitive to network restrictions; ensure outbound access for fetching live quotes.
  • When using Claude Desktop or similar IDEs, copy the stock configuration snippet into your MCP settings under the appropriate server name (e.g., stock) to enable quick testing.
  • If you need to support multiple symbols or batch queries, consider extending the configuration to include additional end-points or using the MCP tool’s batch capabilities if provided by the server.

Related MCP Servers

Sponsor this space

Reach thousands of developers