Related MCP Server Resources

Explore more AI models, providers, and integration options:

  • Explore AI Models
  • Explore AI Providers
  • Explore MCP Servers
  • LangDB Pricing
  • Documentation
  • AI Industry Blog
  • Math MCP Server for MacOS
  • Powertools MCP Search Server
  • MongoDB MCP Server for LLMs
  • Azure Cosmos DB MCP Server
  • AVA MCP Server
Back to MCP Servers
Math Expression MCP Server

Math Expression MCP Server

Public
eriktilio/mcp-langchain-integration

Enables natural language interpretation using Google's Gemini model combined with external tool integration via Model Context Protocol to process and calculate mathematical expressions through a local tool server.

python
0 tools
May 30, 2025
Updated Jun 4, 2025

Supercharge Your AI with Math Expression MCP Server

MCP Server

Unlock the full potential of Math Expression MCP Server through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.

Unified API Access
Complete Tracing
Instant Setup
Get Started Now

Free tier available • No credit card required

Instant Setup
99.9% Uptime
10,000+Monthly Requests

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.
Publicly Shared Threads0

Discover shared experiences

Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!

Share your threads to help others
Related MCPs5
  • Math MCP Server for MacOS
    Math MCP Server for MacOS

    Performs advanced mathematical calculations and visually presents results by drawing shapes and addi...

    Added May 30, 2025
  • Powertools MCP Search Server
    Powertools MCP Search Server

    Model Context Protocol server enabling efficient local search of AWS Lambda Powertools documentation...

    2 tools
    Added May 30, 2025
  • MongoDB MCP Server for LLMs
    MongoDB MCP Server for LLMs

    Enables LLMs to seamlessly interact with MongoDB databases via Model Context Protocol, offering sche...

    Added May 30, 2025
  • Azure Cosmos DB MCP Server
    Azure Cosmos DB MCP Server

    Enables seamless, secure interaction between AI language models and Azure Cosmos DB by translating n...

    Added May 30, 2025
  • AVA MCP Server
    AVA MCP Server

    Enables AI applications to access a customizable toolset for an Artificial Virtual Assistant through...

    1 tools
    Added May 30, 2025