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?

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

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

What it needs from you

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

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.