1. Conduid
  2. AI
  3. Tool Calling Langchain
MCP server · AI

Tool Calling Langchain

MCP with langchain

Unclaimed last commit a year ago aimcp-serverlangchain
48Fair

Scored 5 months ago · breakdown

About Tool Calling Langchain

Tool Calling Langchain is an MCP server published by wassupjay in the AI category: mCP with langchain.

The repository has 2 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/wassupjay/MCP-server-tool-calling-langChain

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 Tool Calling Langchain

Powered by Claude · Grounded in docs

I know everything about Tool Calling Langchain. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 5 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

MCP Server Tool Calling with LangChain

A demonstration of using MCP (Model Control Protocol) servers with LangChain to create and manage custom tools for language models.

This project consists of three main components:

  1. Client (client.py): The main application that uses LangChain and a Groq model to answer questions. It connects to the MCP servers to get a list of available tools.
  2. Math Server (mathserver.py): An MCP server that provides basic arithmetic operations (add and multiply). It communicates over standard input/output.
  3. Weather Server (weather.py): An MCP server that provides a simple weather lookup service. It communicates over HTTP.

Project Structure

  • client.py: Main client application that connects to MCP servers and uses LangChain for tool calling.
  • mathserver.py: MCP server providing math operations (add, multiply).
  • weather.py: MCP server providing weather information.
  • main.py: Simple entry point for the application.
  • .env: For storing environment variables (e.g., GROQ_API_KEY).
  • requirment.txt: Python dependencies.

Features

  • Math Server: Provides two basic arithmetic tools:
    • add(a, b): Adds two numbers.
    • multiply(a, b): Multiplies two numbers.
  • Weather Server: Provides a tool to get weather information:
    • get_weather(location): Returns a mock weather forecast for a given location.
  • LangChain Integration: The client uses LangChain to create a ReAct agent that can intelligently use the tools provided by the MCP servers to answer questions.
  • Multi-Protocol Communication: Demonstrates two different MCP transport protocols: stdio for the math server and streamable_http for the weather server.

Prerequisites

  • Python 3.8+
  • A Groq API key.

Setup and Running the Application

  1. Clone the repository:

    git clone <repository-url>
    cd MCP-server-tool-calling-langChain
    
  2. Install dependencies:

    pip install -r requirment.txt
    
  3. Set up environment variables: Create a file named .env in the project root and add your Groq API key:

    GROQ_API_KEY="your-groq-api-key"
    
  4. Run the Weather Server: In a terminal, run the weather server:

    python weather.py
    

    This will start an HTTP server on localhost:8000.

  5. Run the Client: In a separate terminal, run the client application:

    python client.py
    

    The client will automatically start the mathserver.py as a subprocess and then connect to both the math and weather servers. It will then proceed to ask two questions to the LangChain agent to demonstrate the tool-calling capabilities. You should see output in the client's terminal showing the available tools, the response to the math question, and the response to the weather question.

README fetched from the repository 5 days ago. The original is authoritative.

Questions

About Tool Calling Langchain

How do I install Tool Calling Langchain?

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

Is Tool Calling Langchain safe to use with an AI agent?

Its trust score is 48 out of 100 (fair). It passes 3 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Tool Calling Langchain still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.