Provides web search functionality for retrieving news and relevant content about financial topics and investments.
Connects with LangGraph to create an intelligent ReAct agent that can access real-time financial data and maintain persistent conversation memory.
Integrates with OpenAI models through API keys to power the intelligent ReAct agent for financial data analysis.
Provides access to video tutorial content that accompanies the MCP server implementation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Financial Data MCP Serverget the current stock price and analyst recommendations for AAPL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tutorial MCP + LangGraph
Este projeto demonstra como integrar o Model Context Protocol (MCP) com LangGraph para criar um agente ReAct inteligente que pode acessar dados financeiros em tempo real.
Objetivo
Como criar um servidor MCP com ferramentas personalizadas
Como conectar um agente LangGraph ao servidor MCP
Como implementar memoria de conversacao persistente
Como usar ferramentas de analise financeira via MCP
Related MCP server: A Share MCP
Pre-requisitos
Python 3.13+
Chaves de API do OpenAI e/ou Groq
FastMCP
LangGraph MCP Adapter
Instalacao
1. Instalar UV (Gerenciador de Pacotes Python)
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh2. Clonar e Configurar o Projeto
# Clone o repositorio
git clone https://github.com/gustavo-sacchi/tutorial_mcp_langgraph.git
cd tutorial_mcp_langgraph
# Instale as dependencias e crie o ambiente virtual
uv sync
# Configure as variaveis de ambiente
cp .env.exemple .env3. Configurar Chaves de API
Edite o arquivo .env e adicione suas chaves:
OPENAI_API_KEY=sua-chave-openai-aqui
GROQ_API_KEY=sua-chave-groq-aquiComo Usar
1. Iniciar o Servidor MCP
Em um terminal:
uv run server_mcp.pyO servidor estara disponivel em http://localhost:4200
2. Executar o Cliente (Agente)
Em outro terminal:
uv run client_mcp.py3. Interagir com o Agente
Agora voce pode fazer perguntas sobre financas:
User: Qual e o preco atual da acao da Apple?
User: Me de um resumo completo da VALE3.SA
User: Pesquise noticias recentes sobre investimentos em IATestando o MCP
Para testar a interface MCP diretamente:
npx @modelcontextprotocol/inspector uv run server_mcp.pyArquitetura
┌─────────────────┐ HTTP ┌─────────────────┐
│ Client │◄──────────►│ MCP Server │
│ (LangGraph) │ │ (FastMCP) │
│ │ │ │
│ • ChatOpenAI │ │ • YFinance │
│ • ReAct Agent │ │ • DuckDuckGo │
│ • Memory │ │ • Web Scraping │
└─────────────────┘ └─────────────────┘Ferramentas Disponiveis
O servidor MCP fornece estas ferramentas financeiras:
Resumo de Acoes: Preco, volume e data
Estimativas de Analistas: Precos-alvo
Recomendacoes: Buy/Hold/Sell
Dividendos: Historico de pagamentos
Setor/Industria: Classificacao da empresa
Demonstracoes Financeiras: Balanco, DRE, Fluxo de Caixa
Pesquisa Web: Noticias e conteudo relevante
Video Tutorial
Este projeto foi criado para acompanhar o tutorial no YouTube. Assista ao video completo para entender todos os detalhes da implementacao:
Personalizacao
Modelos: Altere entre OpenAI e Groq no
client_mcp.pyTransporte: Configure HTTP ou stdio no
server_mcp.pyFerramentas: Adicione novas ferramentas MCP no servidor
Prompts: Customize os prompts disponiveis
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.