Logo de Qt MCP Plugin

Qt MCP Plugin

Comunidade
davecotter

A plugin for Qt Creator that implements Model Context Protocol, allowing AI to talk to the IDE

Publicado pordavecotter
RepositórioQt-Creator-MCP-Plugin
IdiomaC++
Forks
5
Estrelas
16
Ferramentas disponíveis
0
Tipo de transportestreamable-http
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Qt MCP Plugin disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    16 estrelas e 5 forks no repositório vinculado.

Qt MCP Plugin

A Qt Creator plugin that implements the Model Context Protocol (MCP), allowing AI assistants to control Qt Creator for debugging, building, and project management.

AI-First Development

This plugin is designed to be extended by AI assistants. Simply ask your AI to:

Build and install the Qt MCP Plugin
Add new MCP commands for [your specific needs]
Test the plugin and verify MCP server is working

What It Does

The plugin adds a Tools -> MCP Plugin menu (with icon) to Qt Creator and runs an MCP server on port 3001. AI assistants can:

  • Build & Debug: Start builds, debug sessions, run projects
  • Project Management: Load sessions, switch build configs, list projects
  • File Operations: Open files, list open files, manage editor state
  • Issue Tracking: List build errors and warnings; get structured diagnostics (JSON) for Cursor Problems panel
  • Discovery: Use standard MCP protocol to discover available tools

Quick Start

Prerequisites: Qt Creator with Qt Plugin Development components, CMake 3.16+, C++20 compiler

Platform Support: Windows, macOS, Linux

Build & Install:

bash
python3 scripts/build/build_main.py

The build script handles everything:

  • Quits Qt Creator and cleans old versions
  • Auto-detects Qt version from Qt Creator binary (no manual configuration)
  • Verifies matching Qt SDK is installed
  • Builds, installs, and verifies the plugin
  • Registers with Cursor IDE automatically

After a successful build, restart Cursor to enable AI control of Qt Creator.

For AI Assistants: See .cursorrules for detailed build instructions and troubleshooting.

Repository structure

PathContents
src/source/C++ implementation (.cpp, .mm)
src/header/C++ headers
src/resources/mcp.qrc, mcp.png, translations
src/*.inPlugin JSON and version templates
scripts/build/Build and Qt config (build_main.py, qt_config.py)
scripts/test/Test suite and build-diagnostics tests
scripts/installer/macOS installer app and scripts
scripts/git/Git credential helper for pushes
documentation/AGENTS.md, TESTING.md, and other docs
.qt/Qt path config per platform (see .qt/README.md)

Build output and logs go to build/ and logs/ (gitignored).

Build diagnostics (Cursor Problems panel)

The plugin exposes structured build diagnostics so Cursor (or other MCP clients) can show Qt Creator build errors and warnings in the Problems panel:

  • MCP tool: getBuildDiagnostics - Returns a JSON array of { file, line, column, message, severity, code } per issue (pretty-printed). Optional filter: "all", "errors", or "warnings".
  • Menu: Tools -> MCP Plugin -> Get Build Diagnostics (JSON) - Runs the same and shows the JSON in the plugin output pane so you can try it manually.

Use this from a preLaunch script on build failure, or from an extension, to fill the Problems panel with the same issues Qt Creator reports. See documentation/ for build diagnostics and other docs (e.g. documentation/TESTING.md, documentation/AGENTS.md).

Self-test: Run python3 scripts/test/test_build_diagnostics.py --inject (or python3 scripts/test/test_suite.py --build-diagnostics) to inject a syntax error, build via MCP, then assert getBuildDiagnostics returns the error. Requires Qt Creator running with a project open.

Architecture

Cross-Platform Menu Icons

The plugin displays an icon in the Tools -> MCP Plugin menu. Menu icon handling is platform-specific:

  • macOS: Uses native AppKit APIs (macos_menu_icon.mm) to force icon display, as Qt may hide menu icons per Apple HIG
  • Windows/Linux: Uses Qt native icon support via stub implementation (platform_menu_icon.cpp)

Source Files

All plugin source lives under src/: headers in src/header/, implementation in src/source/, resources in src/resources/.

FilePurpose
src/source/qt_mcp_plugin.cppMain plugin entry point, menu setup
src/source/mcpserver.cpp, src/header/mcpserver.hHTTP server on port 3001
src/source/mcpcommands.cpp, src/header/mcpcommands.hMCP tool implementations
src/source/macos_menu_icon.mm, src/header/macos_menu_icon.hmacOS native menu icon support
src/source/platform_menu_icon.cppWindows/Linux menu icon stub
src/source/issuesmanager.cpp, src/header/issuesmanager.hBuild issues tracking (list + structured JSON)
src/source/httpparser.cpp, src/header/httpparser.hHTTP request parsing
src/source/httpresponse.cpp, src/header/httpresponse.hHTTP response generation

Extending the Plugin

Let AI do the work: The plugin is designed for AI-assisted development. Describe what you want to add and let your AI assistant:

  1. Add new MCP commands in src/source/mcpcommands.cpp and src/header/mcpcommands.h
  2. Register tools in src/source/mcpserver.cpp (both tool-list blocks if present)
  3. Expose in the UI (each new MCP tool should be discoverable without reading source):
    • Menu: When it makes sense for a user to trigger the action from Qt Creator, add a Tools → MCP Plugin item in src/source/qt_mcp_plugin.cpp and an action id in src/header/qt_mcp_pluginconstants.h, following existing commands.
    • About dialog: If a menu entry is not appropriate (metadata-only helpers, rarely used plumbing, or anything awkward as a standalone action), document the tool in the About MCP Plugin dialog (MCPServerStatusDialog in qt_mcp_plugin.cpp, opened from Tools → MCP Plugin → About MCP Plugin).
  4. Test using the MCP server or Tools -> MCP Plugin menu

Example AI prompts:

Add an MCP command to open the current file in an external editor
Create a command to export the current project as a standalone executable
Add debugging commands to set breakpoints and inspect variables

MCP Protocol

Standard MCP methods:

  • initialize - Server handshake and capabilities
  • tools/list - Discover available tools with schemas
  • tools/call - Execute tools (build, debug, load sessions, get build diagnostics, etc.)

Server runs on: localhost:3001

Cursor IDE Integration

The build script automatically registers the Qt MCP server with Cursor IDE by adding it to ~/.cursor/mcp.json. After building:

  1. Restart Cursor to activate the MCP connection
  2. Start Qt Creator (plugin loads automatically)
  3. Use AI commands like:
    • "Build the current Qt project"
    • "List build errors and warnings"
    • "Get structured build diagnostics for the Problems panel"
    • "Open file main.cpp in Qt Creator"
    • "Switch to Debug configuration"

Manual registration (if needed):

json
{
  "mcpServers": {
    "qt-creator": {
      "url": "http://localhost:3001",
      "description": "Qt Creator MCP Plugin - AI control of Qt Creator IDE"
    }
  }
}

Troubleshooting

Plugin not loading? Check Help -> About Plugins in Qt Creator

MCP server not responding? Ensure Qt Creator is running with plugin loaded

Need help? Ask your AI assistant - the build system is fully automated and designed for AI-assisted development.

License

This project is licensed under the MIT License - see the included LICENSE file for details.

Use o MCP de Qt MCP Plugin com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Qt MCP Plugin, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP se conecta no TypingMind pela URL de um servidor MCP hospedado remotamente.

Adicione a URL de um servidor MCP

Use esta opção quando Qt MCP Plugin já estiver hospedado remotamente ou quando sua equipe quiser um conector compartilhado que vários usuários possam acessar.

1

Abra Conectores MCP

No TypingMind, vá até Plugins, abra Conectores MCP e selecione Adicionar URL.

  1. Abra o TypingMind no navegador.
  2. Acesse Plugins.
  3. Abra Conectores MCP.
  4. Clique em Adicionar URL.
Formulário do TypingMind para adicionar a URL de um servidor MCP personalizado
2

Cole a URL do servidor

Insira a URL do servidor MCP fornecida pelo provedor no campo URL do servidor. Adicione um nome para a conexão, uma descrição, um ícone, cabeçalhos HTTP personalizados ou configurações do cliente OAuth se o servidor exigir.

  1. Cole a URL do servidor MCP fornecida pelo provedor no campo URL do servidor.
  2. Digite um nome para a conexão de Qt MCP Plugin.
  3. Adicione uma descrição e um ícone para facilitar a identificação.
  4. Adicione cabeçalhos HTTP personalizados ou dados do cliente OAuth se o servidor exigir autenticação.
3

Crie a conexão

Clique em Criar conexão, volte à lista de Plugins e confirme que a nova conexão MCP está ativa.

  1. Clique em Criar conexão.
  2. Volte à lista de conectores MCP.
  3. Confirme que a conexão de Qt MCP Plugin aparece como ativa.
  4. Atualize a lista de plugins se a conexão não aparecer imediatamente.
4

Troque de modelo sem reconectar

Inicie um chat com seu modelo preferido, ative as ferramentas de Qt MCP Plugin em Plugins e mude para outro modelo sempre que necessário. A conexão MCP continua disponível no espaço de trabalho do TypingMind.

  1. Inicie um novo chat no TypingMind.
  2. Selecione o modelo de IA que deseja usar.
  3. Ative as ferramentas de Qt MCP Plugin em Plugins.
  4. Peça ao modelo para usar a ferramenta quando necessário.
  5. Mude para outro modelo de IA e reutilize a mesma conexão MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Qt MCP Plugin para me ajudar nesta tarefa?
Qt MCP Plugin
Claro. Já li.
Veja o que encontrei usando Qt MCP Plugin.

Perguntas frequentes

Para que serve o servidor MCP Qt MCP Plugin?

Qt MCP Plugin é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Qt MCP Plugin com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Qt MCP Plugin com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Qt MCP Plugin com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Qt MCP Plugin conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Qt MCP Plugin ao TypingMind?

É possível conectar Qt MCP Plugin ao TypingMind adicionando a URL do seu servidor MCP hospedado. Isso é útil para ter uma conexão MCP remota disponível no seu espaço de trabalho do TypingMind.

Quais ferramentas o MCP Qt MCP Plugin oferece no TypingMind?

Qt MCP Plugin disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Qt MCP Plugin?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Qt MCP Plugin exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇