Get the FREE Ultimate OpenClaw Setup Guide →

mcp-stocks-info

MCP server from JkLondon/mcp-stocks-info-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jklondon-mcp-stocks-info-server docker run -i jklondon/mcp-stocks-info-server:latest \
  --env MONGO_URI="mongodb://localhost:27017" \
  --env REDIS_URI="localhost:6379" \
  --env ENVIRONMENT="development" \
  --env NEWSAPI_KEY="your_news_api_key_here"

How to use

This MCP server provides access to MOEX stock quotes and financial news, exposing a MCP-compatible API for LLMs. Through its tools, you can fetch current stock information, list top gainers or losers, search stocks by name or ticker, retrieve today’s financial news, search news by keywords, and get news related to specific tickers. The server is designed to cache data (in Redis or in-memory) and to store historical data in MongoDB, enabling fast responses for repeated queries. To interact with the server from an LLM, use the MCP protocol to call the available tools and pass natural language prompts that reference the stock data you need. Examples of supported tools include get_stock_info, get_top_gainers, get_top_losers, search_stocks, get_today_news, search_news, and get_news_by_ticker. These tools enable you to perform stock analysis, market overviews, and news-centric insights directly within your conversational flow.

How to install

Prerequisites:

  • Docker and Docker Compose installed on your machine
  • Git installed
  • Optional: a NewsAPI key if you want to fetch news data

Install and run using Docker Compose (recommended):

  1. Clone the repository: git clone https://github.com/jklondon/mcp-stocks-info-server.git cd mcp-stocks-info-server

  2. Create and configure environment variables: cp .env.example .env

    Edit .env to set your keys, e.g. NEWSAPI_KEY=your_news_api_key_here

  3. Start the services with Docker Compose: docker-compose up -d

  4. Verify services are running: docker-compose logs

    or to check a specific service

    docker-compose logs app

Alternative: Run the Go server locally (without Docker) Prerequisites:

  • Go 1.21+ installed
  • MongoDB (optional but recommended) and Redis (optional)
  1. Clone the repo: git clone https://github.com/jklondon/mcp-stocks-info-server.git cd mcp-stocks-info-server

  2. Download dependencies: go mod download

  3. Create a configuration file config.yaml based on the example in the repository (or use environment-driven configuration).

  4. Build the server: go build -o mcp-stocks-server ./cmd/server

  5. Run the server: ./mcp-stocks-server config.yaml

Additional notes

Notes and tips:

  • The server relies on external data sources. You may need API keys (e.g., NewsAPI) and access to MOEX data.
  • The project supports caching via Redis or in-memory; configure redisURI in your environment or config.
  • Docker Compose is the easiest way to get started; ensure Docker is running and that ports are accessible.
  • If you encounter connectivity issues, verify that MongoDB and Redis services are up (when using Docker, these are typically defined in docker-compose.yaml).
  • The MCP tools are designed to be invoked by LLM clients. Ensure your client respects MCP specifications for method names and parameter passing.
  • For production, consider securing API keys and using proper environment variable management (e.g., Docker secrets, env files in CI/CD).

Related MCP Servers

Sponsor this space

Reach thousands of developers