MCP Server
Integre TestQubit com sua IDE ou agent favorito via Model Context Protocol
O servidor MCP do TestQubit expoe ferramentas de geracao de testes diretamente na sua IDE ou agent. Nao precisa sair do editor para escrever testes.
Iniciar o Servidor
# Iniciar o servidor MCP do TestQubit
testqubit mcp start
# Por padrão roda em stdio (para integração com IDEs)
# Porta customizada para modo HTTP:
testqubit mcp start --port 3001Cursor
Adicione o TestQubit ao Cursor editando o arquivo de configuracao MCP:
{
"mcpServers": {
"testqubit": {
"command": "testqubit",
"args": ["mcp", "start"]
}
}
}VS Code
Instale a extensao MCP e configure no settings.json:
# Instalar a extensão MCP para VS Code
code --install-extension anthropic.mcp
# Adicionar ao settings.json (Ctrl+, > Open Settings JSON){
"mcp.servers": {
"testqubit": {
"command": "testqubit",
"args": ["mcp", "start"]
}
}
}Hermes Agent
O Hermes Agent tem suporte nativo a MCP. Adicione via CLI ou config.yaml:
# Adicionar via CLI do Hermes
hermes mcp add testqubit --command "testqubit mcp start"
mcp:
servers:
testqubit:
command: testqubit
args: ["mcp", "start"]
transport: stdioApos adicionar, reinicie o Hermes e verifique:
# Verificar se o servidor MCP está ativo
hermes mcp list
# Usar dentro de uma conversa
> "Gere testes para src/utils/calculator.ts usando testqubit"Claude Desktop
Configure no arquivo de configuracao do Claude Desktop:
{
"mcpServers": {
"testqubit": {
"command": "testqubit",
"args": ["mcp", "start"]
}
}
}Windsurf (Codeium)
Adicione nas configuracoes de MCP Servers do Windsurf:
{
"testqubit": {
"command": "testqubit",
"args": ["mcp", "start"]
}
}Zed
{
"mcp_servers": {
"testqubit": {
"command": "testqubit",
"args": ["mcp", "start"]
}
}
}Neovim
require('mcp').setup({
servers = {
testqubit = {
cmd = { 'testqubit', 'mcp', 'start' },
},
},
})Ferramentas Disponiveis
O servidor MCP expoe estas ferramentas para a IDE/agent:
testqubit_analyzeAnalisa codigo-fonte e retorna estrutura (funcoes, classes, imports)testqubit_generateGera testes unitarios/integracao para um arquivo ou diretoriotestqubit_healCorrige testes quebrados automaticamentetestqubit_mutationExecuta mutation testing e reporta mutantes sobreviventestestqubit_configLe/escre configuracao do TestQubitTroubleshooting
Servidor MCP nao inicia
Verifique se testqubit esta instalado globalmente: npm i -g testqubit
Erros de autenticacao
Rode testqubit auth login para autenticar antes de iniciar o MCP
docs.mcp.tsDebugQ
TESTQUBIT_MCP_DEBUG=true testqubit mcp start