Qt MCP Pluginのロゴ

Qt MCP Plugin

コミュニティ
davecotter

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

公開者davecotter
リポジトリQt-Creator-MCP-Plugin
言語C++
フォーク
5
スター
16
利用可能なツール
0
通信方式streamable-http
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Qt MCP Pluginは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには16件のスターと5件のフォークがあります。

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.

Qt MCP PluginのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Qt MCP Pluginに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、TypingMindでリモートホストされたMCPサーバーのURLを使って接続します。

MCPサーバーのURLを追加

Qt MCP Pluginがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを貼り付けてください。
  2. Qt MCP Pluginの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. Qt MCP Pluginの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でQt MCP Pluginのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でQt MCP Pluginのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Qt MCP Pluginを使ってこのタスクを手伝ってもらえますか?
Qt MCP Plugin
はい、読みました。
Qt MCP Pluginで調べた結果をお伝えします。

よくある質問

Qt MCP Plugin MCPサーバーは何に使いますか?

Qt MCP Pluginは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでQt MCP Plugin MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでQt MCP Pluginを利用できます。

TypingMindでQt MCP Plugin MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Qt MCP Pluginを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Qt MCP Plugin MCPをTypingMindに接続するにはどうすればよいですか?

ホストされているQt MCP PluginのMCPサーバーURLを追加すると、TypingMindに接続できます。TypingMindのワークスペースから利用できるリモートMCP接続が必要な場合に便利です。

TypingMindでQt MCP Plugin MCPのどのようなツールを利用できますか?

Qt MCP PluginはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Qt MCP Plugin MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Qt MCP Pluginで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇