mcp-stocks-info
MCP server from JkLondon/mcp-stocks-info-server
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):
-
Clone the repository: git clone https://github.com/jklondon/mcp-stocks-info-server.git cd mcp-stocks-info-server
-
Create and configure environment variables: cp .env.example .env
Edit .env to set your keys, e.g. NEWSAPI_KEY=your_news_api_key_here
-
Start the services with Docker Compose: docker-compose up -d
-
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)
-
Clone the repo: git clone https://github.com/jklondon/mcp-stocks-info-server.git cd mcp-stocks-info-server
-
Download dependencies: go mod download
-
Create a configuration file config.yaml based on the example in the repository (or use environment-driven configuration).
-
Build the server: go build -o mcp-stocks-server ./cmd/server
-
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
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go