
Math Expression MCP Server
A tool server that processes mathematical expressions via Multi-Chain Protocol (MCP), allowing LLMs to solve math problems through tool integration.
README
LangChain + Gemini + MCP (Tool Server)
Este projeto demonstra como criar um chain com LangChain usando o modelo gemini-2.0-flash do Google e integrá-lo com ferramentas customizadas usando o MCP (Multi-Chain Protocol), via conexão stdio
.
✨ Funcionalidade
A chain é capaz de:
- Interpretar linguagem natural com o Gemini.
- Usar ferramentas externas via MCP — neste exemplo, uma calculadora de expressões matemáticas.
- Executar localmente um servidor de ferramentas que se conecta à chain automaticamente.
🔧 Requisitos
- Python 3.10+
- uv (ou
pip
tradicional)
📦 Instalação
Com uv (recomendado)
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
Ou com pip tradicional
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Crie um arquivo .env:
GOOGLE_API_KEY=sua_chave_google_api
🚀 Execução
1. Execute o servidor de ferramentas (MCP)
Primeiro, execute o servidor de ferramentas. Este servidor vai processar as expressões matemáticas.
python server.py
2. Execute o cliente
Em seguida, execute o cliente, que se conecta ao servidor e faz as requisições, passando a pergunta para a chain e recebendo o resultado do cálculo.
python client.py
Como Funciona?
- O chain usa o modelo Gemini-Pro do Google para interpretar a linguagem natural.
- Uma LLMChain é criada usando o modelo e um PromptTemplate para extrair a expressão matemática de uma pergunta.
- A expressão extraída é então passada para uma ferramenta de cálculo via o protocolo MCP.
- O servidor MCP calcula a expressão matemática e retorna o resultado.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.