home / mcp / naveenveeramreddy mcp server
Provides a multi-server MCP integration that connects Weather, Stocks, MongoDB, and Elasticsearch with LangChain agents for real-time data processing and storage.
Configuration
View docs{
"mcpServers": {
"naveenveeramreddy-mcp_server": {
"command": "python3",
"args": [
"weather_server.py"
]
}
}
}You deploy a multi-server MCP that connects Weather, Stocks, MongoDB, and Elasticsearch with a LangChain agent to process queries, fetch live data, and automatically store conversations and data for quick retrieval.
Interact with the LangChain MCP client to ask questions that require data from multiple sources. The agent will automatically call the appropriate tools: weather alerts from the weather server and stock holdings from the stocks server. It will then respond in plain language and store the conversation in Elasticsearch.
Typical usage patterns include asking for live weather alerts for a state, checking current stock holdings, exploring how weather trends might affect a portfolio, or saving weather and conversation data for later analysis.
Prerequisites are Python 3.8 or newer and Docker for local services. You also need Elasticsearch running on localhost:9200 and optional MongoDB on localhost:27017 if you want to store conversations in MongoDB.
# Prerequisites
python3 --version
pip3 --version
docker --version
# Optional: verify Elasticsearch is running
curl -s http://localhost:9200/ && echoClone the project and prepare the MCP components.
git clone https://github.com/vamsivenkat987/langchain_mcp_server.git
cd langchain_mcp_server/mcpInstall required Python dependencies for the MCP server and adapters.
pip install langchain-mcp-adapters langchain-openai elasticsearch pymongo kiteconnect requestsStart the required services for local testing. This includes Elasticsearch and MongoDB if you opt to use MongoDB.
# Start Elasticsearch (single-node for development)
docker run -d -p 9200:9200 -e "discovery.type=single-node" elasticsearch:8.11.0
# Start MongoDB (optional)
docker run -d -p 27017:27017 mongo:latestConfigure credentials using a local credentials file. The setup uses a .netrc file to manage API keys and access tokens.
Create a .netrc file in your project directory with the following structure to securely provide credentials to the MCP clients.
machine llm.model
login your_api_key_here
password https://your-llm-endpoint-here
machine stocks.data
login your_kite_api_key
password your_kite_api_secret
account your_kite_access_tokenYou can test each MCP server individually to verify it runs and connects to its respective data source.
# Quick start for the MCP client
python3 mcp_client.py
# Test individual servers
python3 weather_server.py
python3 stocks_server.py
python3 elastic_search_server.py
python3 mongo_server.pyCredentials are stored in .netrc files and not embedded in code. SSL certificates are supported and environment variables can be used to configure runtime behavior.
Fetch active weather alerts for a US state using the Weather MCP server.
Retrieve current stock portfolio holdings from the Kite Connect MCP server.
Store documents in Elasticsearch with automatic timestamp and UUID handling.
Persist conversation exchanges to MongoDB or Elasticsearch as part of chat history.
Store customer data entries in the MongoDB MCP server.