Indian Stock Analysis MCP Server

# Indian Stock Analysis MCP Server A Model Context Protocol (MCP) server for interacting with MongoDB stock data to provide portfolio recommendations

Local serverstdioPython

What is the Indian Stock Analysis MCP server?

Most database access work still happens through a UI a human drives. Indian Stock Analysis MCP server moves it into the conversation instead. # Indian Stock Analysis MCP Server A Model Context Protocol (MCP) server for interacting with MongoDB stock data to provide portfolio recommendations and market insights, exclusively for the Indian stock market (NSE/BSE). ## Overview This.

The short version

This MCP server integrates with: 1. MongoDB database (stock_data) for direct stock data access 2. Alpha Vantage API for Indian market data (NSE/BSE only) with free tier limitations 3. Knowledge Graph for persistent Indian stock analysis

  • Exclusive Indian Market Focus — Designed specifically for NSE and BSE listed stocks
  • Direct MongoDB Access — Queries MongoDB directly without going through an API layer
  • Knowledge Graph Integration — Maintains persistent analysis data for Indian stocks
  • Alpha Vantage Rate Limiting — Handles free tier API limitations with automatic rate limiting
  • Modular Architecture — Clean, maintainable code structure with separation of concerns
  • Environment Configuration — Uses .env for easy configuration

The tools it exposes

The server publishes 3 tools. What each one is for:

  • Notes — - Shows available API calls remaining in current minute window
  • Prerequisites — The Prerequisites tool exposed by this server
  • Setup — 1. Clone this repository: bash git clone cd stock-mcp-server

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

What it needs from you

Configuration is passed through the environment: ALPHA_VANTAGE_API_KEY, MONGODB_URI, MONGODB_DB_NAME, MONGODB_HOLDINGS_COLLECTION, MONGODB_FINANCIALS_COLLECTION, MONGODB_KNOWLEDGE_GRAPH_COLLECTION, ALPHA_VANTAGE_BASE_URL, ALPHA_VANTAGE_RATE_LIMIT_MINUTE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

How it compares

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Indian Stock Analysis's toolset — Notes, Prerequisites, Setup — is a fair guide to whether it matches your workflow. It is maintained by ingpoc; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
Notes- Shows available API calls remaining in current minute window
PrerequisitesThe Prerequisites tool exposed by this server.
Setup1. Clone this repository: bash git clone <repository-url> cd stock-mcp-server

How to install the Indian Stock Analysis MCP server

{
  "mcpServers": {
    "stock-analysis-mcp": {
      "command": "/path/to/your/python",
      "args": [
        "/path/to/stock_mcp_server/server.py"
      ],
      "cwd": "/path/to/stock_mcp_server",
      "env": {
        "ALPHA_VANTAGE_API_KEY": "your_api_key_here",
        "MONGODB_URI": "mongodb://localhost:27017",
        "MONGODB_DB_NAME": "stock_data",
        "MONGODB_HOLDINGS_COLLECTION": "holdings",
        "MONGODB_FINANCIALS_COLLECTION": "detailed_financials",
        "MONGODB_KNOWLEDGE_GRAPH_COLLECTION": "stock_knowledge_graph",
        "ALPHA_VANTAGE_BASE_URL": "https://www.alphavantage.co/query",
        "ALPHA_VANTAGE_RATE_LIMIT_MINUTE": "5",
        "ALPHA_VANTAGE_RATE_LIMIT_DAY": "500",
        "ALPHA_VANTAGE_DEFAULT_EXCHANGE": "NSE",
        "MCP_SERVER_NAME": "stock-analysis-mcp",
        "MCP_SERVER_VERSION": "0.1.0",
        "LOG_LEVEL": "INFO",
        "CACHE_ENABLED": "True",
        "CACHE_TTL": "3600"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
ALPHA_VANTAGE_API_KEYCredential the server authenticates with.Yes
MONGODB_URIConfiguration value read at startup.Optional
MONGODB_DB_NAMEConfiguration value read at startup.Optional
MONGODB_HOLDINGS_COLLECTIONConfiguration value read at startup.Optional
MONGODB_FINANCIALS_COLLECTIONConfiguration value read at startup.Optional
MONGODB_KNOWLEDGE_GRAPH_COLLECTIONConfiguration value read at startup.Optional
ALPHA_VANTAGE_BASE_URLEndpoint or connection string the server talks to.Yes
ALPHA_VANTAGE_RATE_LIMIT_MINUTEConfiguration value read at startup.Optional

Example prompts to try

  • Use Indian Stock Analysis to Notes.
  • Use Indian Stock Analysis to Prerequisites.
  • Use Indian Stock Analysis to Setup.

Frequently asked questions

Python 3.9+, a running MongoDB instance on localhost:27017 with a `stock_data` database, an Alpha Vantage API key (free tier), and the Claude Desktop app.