1. Conduid
  2. Agents
  3. MCPSERVERLangchain
MCP server · Agents

MCPSERVERLangchain

Notebook-first MCP Server with LangChain: tools, clients, agents, and LLM-driven tool calling over the Model Context Protocol.

Unclaimed agents
34Low

Scored 9 days ago · breakdown

About MCPSERVERLangchain

MCPSERVERLangchain is an MCP server in the Agents category: notebook-first MCP Server with LangChain: tools, clients, agents, and LLM-driven tool calling over the Model Context Protocol.

Install

From source
git clone https://github.com/gauravtailor8520/MCPSERVERLangchain

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about MCPSERVERLangchain

Powered by Claude · Grounded in docs

I know everything about MCPSERVERLangchain. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

MCP Server Langchain Demo

A demonstration project showing how to integrate Model Context Protocol (MCP) servers with LangChain and LangGraph agents. Image

Overview

This project demonstrates how to create MCP servers for math and weather operations and integrate them with LangChain agents using the langchain-mcp-adapters library. The agents can perform calculations and get weather information through the MCP protocol.

Features

  • Math Server: Provides addition and multiplication operations via MCP
  • Weather Server: Provides weather information via MCP
  • LangChain Integration: Uses LangGraph agents to interact with MCP servers
  • Multiple Transports: Demonstrates both stdio and HTTP transports

Project Structure

MCPSERVERLangchain/
├── client.py          # Main client that uses LangChain agents with MCP tools
├── mathserver.py      # MCP server for math operations (stdio transport)
├── weather.py         # MCP server for weather operations (HTTP transport)
├── main.py           # Basic entry point
├── requirements.txt   # Python dependencies
├── pyproject.toml    # Project configuration
├── .env              # Environment variables (API keys)
└── README.md         # This file

Setup

Prerequisites

  • Python 3.13 or higher
  • A Groq API key

Installation

  1. Clone or download this repository

  2. Navigate to the project directory:

    cd MCPSERVERLangchain
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Create a .env file with your API key:

    GROQ_API_KEY=your_groq_api_key_here
    

Usage

Running the Complete Demo

Run the main client that demonstrates both math and weather servers:

python client.py

This will:

  1. Start the math server as a subprocess
  2. Connect to a weather server (if running on localhost:8000)
  3. Ask the agent to solve a math problem: "what's (3 + 5) x 12?"
  4. Ask the agent for weather information: "what is the weather in California?"

Running Individual Servers

Math Server (stdio transport)

python mathserver.py

Weather Server (HTTP transport)

python weather.py

MCP Servers

Math Server (mathserver.py)

Provides mathematical operations via stdio transport:

  • add(a: int, b: int): Adds two numbers
  • multiple(a: int, b: int): Multiplies two numbers

Weather Server (weather.py)

Provides weather information via HTTP transport:

  • get_weather(location: str): Returns weather for a location

Configuration

The client is configured to use:

  • Groq LLM: qwen-qwq-32b model
  • Math Server: stdio transport, subprocess execution
  • Weather Server: HTTP transport on localhost:8000

Dependencies

  • langchain-groq: Groq LLM integration
  • langchain-mcp-adapters: MCP protocol adapters for LangChain
  • langgraph: Agent framework for LangChain
  • mcp: Model Context Protocol implementation
  • python-dotenv: Environment variable management

Troubleshooting

Math Server Returns Blank Response

Common issues:

  1. Missing dependencies: Ensure all packages are installed
  2. Path issues: Make sure mathserver.py is in the current directory
  3. Transport configuration: Verify stdio transport is properly configured

Weather Server Not Responding

  1. Make sure the weather server is running on localhost:8000
  2. Check that the HTTP transport is properly configured
  3. Verify network connectivity

API Key Issues

  1. Ensure your .env file contains a valid GROQ_API_KEY
  2. Check that the API key has sufficient credits/permissions

Development

Adding New Tools

To add new mathematical operations to the math server:

@mcp.tool()
def subtract(a: int, b: int) -> int:
    """Subtract two numbers"""
    return a - b

Modifying Transport

To change from stdio to HTTP transport in the math server:

if __name__ == "__main__":
    mcp.run(transport="sse", port=8001)

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

If you encounter issues:

  1. Check the troubleshooting section above
  2. Verify all dependencies are properly installed
  3. Ensure API keys are correctly configured
  4. Check the MCP server logs for error messages

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About MCPSERVERLangchain

How do I install MCPSERVERLangchain?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is MCPSERVERLangchain safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is MCPSERVERLangchain still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.