neuralware/mcp-client-server-demo
If you are the rightful owner of mcp-client-server-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project demonstrates the integration of a simple MCP server with LangGraph, showcasing calculator tools via the MCP protocol.
MCP Server with LangGraph Integration
This project demonstrates how to create a simple MCP server exposing calculator tools and connect it to a LangGraph agent using the MCP protocol.
Project Structure
mcp_server/
: Contains the MCP server implementation.langgraph_client/
: Contains the LangGraph client code that connects to the MCP server.pyproject.toml
: Python dependencies.
Setup
- Clone the repository
git clone https://github.com/neuralware/mcp-client-server-demo.git
- Create environment and install dependencies
uv sync
- Activate the environment
source .venv/bin/activate
Running the MCP Server
You can run the MCP server over HTTP as follows -
python mcp_server/server.py
This runs the MCP server locally using http transport.
Running the LangGraph Client
In a separate terminal (with the virtual environment activated), run:
python langgraph_client/client.py
This will start the LangGraph agent, connect to the MCP server, and send a sample query to calculate (3 + 5) * 12
.
Notes
- The current example uses
streamable-http
transport, other options available arestdio
andsse
. - Extend the MCP server with more tools and resources as needed.
- Use secure authentication and TLS when exposing MCP servers over networks.
Feel free to explore and expand this toy project for your AI tool integrations!