- Explore MCP Servers
- langchain-mcp-adapters-example
Langchain Mcp Adapters Example
What is Langchain Mcp Adapters Example
langchain-mcp-adapters-example is a simple example of an MCP server designed for GigaChat, showcasing basic mathematical operations.
Use cases
Use cases include executing mathematical operations, developing and testing MCP clients, and integrating with GigaChat for enhanced functionalities.
How to use
To use langchain-mcp-adapters-example, set up GigaChat credentials in a .env file, install the required packages, and run the client using ‘uv run client.py’. For HTTP interactions, start the server in SSE mode with ‘uv run math_server.py sse’ and then run the HTTP client with ‘uv run client_http.py’.
Key features
Key features include a local MCP server with two mathematical functions, a local interaction client, and an HTTP interaction client that operates in SSE mode.
Where to use
langchain-mcp-adapters-example can be used in educational environments for teaching basic programming concepts, in development for testing MCP interactions, and in applications requiring simple mathematical computations.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Langchain Mcp Adapters Example
langchain-mcp-adapters-example is a simple example of an MCP server designed for GigaChat, showcasing basic mathematical operations.
Use cases
Use cases include executing mathematical operations, developing and testing MCP clients, and integrating with GigaChat for enhanced functionalities.
How to use
To use langchain-mcp-adapters-example, set up GigaChat credentials in a .env file, install the required packages, and run the client using ‘uv run client.py’. For HTTP interactions, start the server in SSE mode with ‘uv run math_server.py sse’ and then run the HTTP client with ‘uv run client_http.py’.
Key features
Key features include a local MCP server with two mathematical functions, a local interaction client, and an HTTP interaction client that operates in SSE mode.
Where to use
langchain-mcp-adapters-example can be used in educational environments for teaching basic programming concepts, in development for testing MCP interactions, and in applications requiring simple mathematical computations.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
langchain-mcp-adapters-example
Simple MCP example for GigaChat
Components
1. math_server.py – MCP server with two mathematical functions.
2. client.py – MCP client for local interactions (automatically starts the MCP server).
3. client_http.py – MCP client for HTTP interactions (requires the server to be started in SSE mode).
Stdio mode (local)
Configuration
- Setup GigaChat credentials in .env
- Install requirements
Run client and server (do not start server directly!)
uv run client.py
Example output:
uv run client.py [03/10/25 15:00:47] INFO Processing request of type ListToolsRequest server.py:534 [03/10/25 15:00:51] INFO Processing request of type CallToolRequest server.py:534 [03/10/25 15:00:52] INFO Processing request of type CallToolRequest server.py:534 Результат выражения (3 + 5) умноженное на 12 равен 96.
HTTP mode (SSE)
Start server
uv run math_server.py sse
Run client
uv run client_http.py
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










