Integrated MCPs Guide
An integrated MCP server combining Azure DevOps, Gmail, Browser, and Gemini AI functionalities on a Node.js server.
🚀 Guia Completo de Configuração - MCPs Integrados
📋 Sumário
- Visão Geral
- Pré-requisitos
- Configuração Azure DevOps
- Configuração Gmail
- Configuração Browser
- Configuração Gemini AI
- Servidor Integrado
- Configuração Claude Code
- Teste e Validação
- Solução de Problemas
- Comandos Disponíveis
🎯 Visão Geral
Este guia ensina como configurar um servidor MCP integrado que combina 4 funcionalidades:
- 🏢 Azure DevOps - Gestão de projetos, work items, repositórios
- 📧 Gmail - Acesso a emails, labels, busca
- 🌐 Browser - Navegação web, busca, screenshots
- 🤖 Gemini AI - Geração de texto, análise de código, tradução
Resultado: Todos os MCPs funcionando nativamente no Claude Code através de um único servidor Node.js.
⚙️ Pré-requisitos
🛠️ Software Necessário
# Node.js (versão 18 ou superior)
node --version # v18.0.0+
# Python (versão 3.11 ou 3.12)
python3 --version # 3.11.x ou 3.12.x
# Azure CLI
az --version
# Git
git --version
# Claude Code
# Instalar via: https://claude.ai/code
🔑 Credenciais Necessárias
- Azure DevOps: Acesso à organização Azure DevOps
- Gmail: Conta Google com API habilitada
- Gemini AI: Chave de API do Google AI Studio
🏢 Configuração Azure DevOps
1. Autenticação Azure CLI
# Login no Azure
az login --tenant SEU_TENANT.onmicrosoft.com
# Configurar organização padrão
az devops configure --defaults organization=https://dev.azure.com/SUA_ORGANIZACAO/
# Instalar extensão Azure DevOps
az extension add --name azure-devops
2. Verificar Acesso
# Testar listagem de projetos
az devops project list --organization https://dev.azure.com/SUA_ORGANIZACAO/
# Verificar token de acesso
az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798
📧 Configuração Gmail
1. Preparar Diretório Gmail
# Criar diretório para MCP Gmail
mkdir -p ~/workspace/mcp-servers/gmail
cd ~/workspace/mcp-servers/gmail
2. Configurar Google Cloud Project
- Acesse Google Cloud Console
- Crie um novo projeto ou selecione existente
- Habilite a Gmail API:
- APIs & Services → Library
- Busque "Gmail API" → Enable
3. Criar Credenciais OAuth2
- APIs & Services → Credentials
- Create Credentials → OAuth 2.0 Client ID
- Application Type: Desktop Application
- Nome: "MCP Gmail Client"
- Download o arquivo JSON → salvar como
credentials.json
4. Configurar Ambiente Python
# Criar virtual environment
python3 -m venv venv
source venv/bin/activate # Linux/Mac
# ou venv\Scripts\activate # Windows
# Instalar dependências
pip install google-auth google-auth-oauthlib google-api-python-client
5. Autenticar Gmail
# Criar script de autenticação
cat > test_auth.py << 'EOF'
import os
import json
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
SCOPES = [
'https://www.googleapis.com/auth/gmail.readonly',
'https://www.googleapis.com/auth/gmail.labels'
]
def authenticate_gmail():
creds = None
if os.path.exists('token.json'):
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file('credentials.json', SCOPES)
creds = flow.run_local_server(port=0)
with open('token.json', 'w') as token:
token.write(creds.to_json())
service = build('gmail', 'v1', credentials=creds)
# Testar conexão
results = service.users().labels().list(userId='me').execute()
labels = results.get('labels', [])
print(f"✅ Gmail autenticado com sucesso!")
print(f"📧 Conta: {service.users().getProfile(userId='me').execute()['emailAddress']}")
print(f"🏷️ Labels encontrados: {len(labels)}")
return service
if __name__ == '__main__':
authenticate_gmail()
EOF
# Executar autenticação
python test_auth.py
🌐 Configuração Browser
1. Preparar Diretório Browser
mkdir -p ~/workspace/mcp-servers/browser
cd ~/workspace/mcp-servers/browser
2. Instalar Dependências
# Criar virtual environment
python3 -m venv venv
source venv/bin/activate
# Instalar dependências
pip install playwright beautifulsoup4 requests lxml
# Instalar browsers do Playwright
playwright install chromium
3. Teste do Browser
# Criar script de teste
cat > test_browser.py << 'EOF'
from playwright.sync_api import sync_playwright
import requests
def test_browser():
print("🌐 Testando Browser MCP...")
# Teste 1: Playwright
try:
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("https://example.com")
title = page.title()
browser.close()
print(f"✅ Playwright funcionando - Título: {title}")
except Exception as e:
print(f"❌ Erro Playwright: {e}")
# Teste 2: Requests
try:
response = requests.get("https://httpbin.org/get", timeout=10)
if response.status_code == 200:
print("✅ Requests funcionando")
else:
print(f"❌ Requests erro: {response.status_code}")
except Exception as e:
print(f"❌ Erro Requests: {e}")
if __name__ == '__main__':
test_browser()
EOF
# Executar teste
python test_browser.py
🤖 Configuração Gemini AI
1. Obter API Key
- Acesse Google AI Studio
- Clique em "Create API Key"
- Copie a chave gerada
2. Preparar Diretório Gemini
mkdir -p ~/workspace/mcp-servers/gemini
cd ~/workspace/mcp-servers/gemini
3. Configurar Gemini
# Criar virtual environment
python3 -m venv venv
source venv/bin/activate
# Instalar dependências
pip install google-generativeai
# Configurar API Key
echo "GEMINI_API_KEY=SUA_API_KEY_AQUI" > .env
# Criar script de teste
cat > test_gemini.py << 'EOF'
import os
import google.generativeai as genai
from dotenv import load_dotenv
load_dotenv()
def test_gemini():
print("🤖 Testando Gemini AI...")
api_key = os.getenv('GEMINI_API_KEY')
if not api_key:
print("❌ API Key não encontrada!")
return
try:
genai.configure(api_key=api_key)
model = genai.GenerativeModel('gemini-1.5-flash')
response = model.generate_content("Diga olá em português")
print(f"✅ Gemini funcionando!")
print(f"🤖 Resposta: {response.text}")
except Exception as e:
print(f"❌ Erro Gemini: {e}")
if __name__ == '__main__':
test_gemini()
EOF
# Instalar python-dotenv
pip install python-dotenv
# Executar teste
python test_gemini.py
🔧 Servidor Integrado
1. Clonar Repositório
# Navegar para diretório de trabalho
cd ~/workspace/projects/javascript
# Clonar o repositório MCP integrado
git clone https://github.com/SEU_USUARIO/azure-devops-mcp.git
cd azure-devops-mcp
2. Instalar Dependências Node.js
# Instalar dependências
npm install
# Verificar estrutura
ls -la src/tools/
# Deve mostrar: core.ts, workitems.ts, gmail.ts, browser.ts, gemini.ts, etc.
3. Configurar Caminhos
Edite os arquivos de proxy para apontar para os diretórios corretos:
// src/tools/gmail.ts
const gmailPath = "/Users/SEU_USUARIO/workspace/mcp-servers/gmail";
// src/tools/browser.ts
const browserPath = "/Users/SEU_USUARIO/workspace/mcp-servers/browser";
// src/tools/gemini.ts
const geminiPath = "/Users/SEU_USUARIO/workspace/mcp-servers/gemini";
4. Build do Servidor
# Compilar TypeScript
npm run build
# Verificar se compilou
ls -la dist/
⚙️ Configuração Claude Code
1. Localizar Arquivo de Configuração
# Localizar arquivo de configuração do Claude
# Mac:
open ~/Library/Application\ Support/Claude/
# Linux:
~/.config/claude/
# Windows:
%APPDATA%/Claude/
2. Editar claude_desktop_config.json
{
"mcpServers": {
"azure-devops-unified": {
"command": "node",
"args": [
"/Users/SEU_USUARIO/workspace/projects/javascript/azure-devops-mcp/dist/index.js",
"SUA_ORGANIZACAO_AZURE_DEVOPS"
],
"env": {
"NODE_ENV": "production"
}
}
}
}
3. Reiniciar Claude Code
# Fechar completamente o Claude Code
# Reabrir Claude Code
# Os MCPs devem aparecer automaticamente
✅ Teste e Validação
1. Verificar Conexão MCPs
No Claude Code, digite:
ajuda mcp
Deve mostrar o banner com todos os 4 MCPs disponíveis.
2. Testar Cada MCP
Azure DevOps:
liste meus projetos azure devops
Gmail:
liste meus labels do gmail
Browser:
busque na web: Claude Code tips
Gemini:
generate com gemini: diga olá em português
3. Teste Integrado
mostre dashboard do projeto SEU_PROJETO
🚨 Solução de Problemas
Problema: MCPs não aparecem no Claude Code
Solução:
# 1. Verificar se o servidor compila
cd azure-devops-mcp
npm run build
# 2. Verificar configuração
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
# 3. Testar manualmente
node dist/index.js SUA_ORGANIZACAO
Problema: Erro de autenticação Azure
Solução:
# Reautenticar
az logout
az login --tenant SEU_TENANT.onmicrosoft.com
Problema: Gmail não funciona
Solução:
cd ~/workspace/mcp-servers/gmail
source venv/bin/activate
python test_auth.py
Problema: Python não encontrado
Solução:
# Verificar versão Python
python3 --version
# Se necessário, instalar pyenv
curl https://pyenv.run | bash
pyenv install 3.12.8
pyenv global 3.12.8
📚 Comandos Disponíveis
🏢 Azure DevOps
# Projetos
liste meus projetos azure devops
liste desenvolvedores do projeto [NOME]
# Work Items
liste tarefas em progresso do projeto [NOME]
liste tarefas fechadas do projeto [NOME]
mostre dashboard do projeto [NOME]
# Repositórios
liste repositórios do projeto [NOME]
mostre pull requests do projeto [NOME]
mostre builds do projeto [NOME]
📧 Gmail
liste meus labels do gmail
mostre meus emails recentes
busque emails de [REMETENTE]
leia o email [ID]
🌐 Browser
busque na web: [TERMO]
busque o conteúdo desta URL: [URL]
extraia conteúdo de: [URL]
capture screenshot de: [URL]
🤖 Gemini AI
generate com gemini: [PROMPT]
analise este código com gemini: [CÓDIGO]
traduza com gemini: [TEXTO]
resuma com gemini: [TEXTO LONGO]
gemini chat: [MENSAGEM]
🎯 Conclusão
Após seguir este guia, você terá:
✅ Servidor MCP integrado funcionando
✅ 4 MCPs ativos (Azure DevOps, Gmail, Browser, Gemini)
✅ Claude Code conectado e funcional
✅ Comandos em português disponíveis
✅ Gestão completa de projetos e desenvolvimento
🚀 Agora você pode gerenciar seus projetos, emails, pesquisas web e IA diretamente no Claude Code!
📞 Suporte
Para dúvidas ou problemas:
- Verificar seção Solução de Problemas
- Consultar logs:
node dist/index.js SUA_ORG - Verificar configurações de cada MCP individualmente
Última atualização: Dezembro 2024
Versão: 1.0.0
Servidores relacionados
Scout Monitoring MCP
patrocinadorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
patrocinadorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
S3 Documentation MCP Server
A lightweight Model Context Protocol (MCP) server that brings RAG (Retrieval-Augmented Generation) capabilities to your LLM over Markdown documentation stored on S3.
Enrichment MCP Server
Performs data enrichment on observables using third-party services via the security-cli Python package.
Docfork
Provides up-to-date documentation for over 9000 libraries directly within AI code editors.
Airflow MCP Server
Control Apache Airflow via its API using JWT authentication.
MCP WordPress Server
A server for integrating with the WordPress REST API.
VSCode Maestro MCP
The most comprehensive MCP server for VS Code — 100+ tools across 25 categories. File ops, terminal, git, LSP providers (hover, completion, definition, references), and more. Free core + premium features.
DevTools MCP Server
A comprehensive MCP server with 30+ developer tools including JSON/XML formatting, UUID generation, hashing, encoding, regex testing, color conversion, JWT decoding, timestamp conversion, and more.
SpecBridge
Automatically generates MCP tools from OpenAPI specifications by scanning a folder for spec files. No configuration is needed and it supports authentication via environment variables.
Authless Remote MCP Server
A remote MCP server deployable on Cloudflare Workers that does not require authentication.
SACL MCP Server
A framework for bias-aware code retrieval using semantic-augmented reranking and localization.