JUHE API Marketplace
eriktilio avatar
MCP Server

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.

0
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. mcp-langchain-integration

README Documentation

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.

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved