Skip to content

Conversation

melipefello
Copy link

@melipefello melipefello commented Oct 10, 2025

Hey there, let me know if this is ok or need some changes :)

The only thing I couldn't find online was the path for the mcp.json on Linux and MacOS - I would be very thankful if someone could fetch those to help in this PR.

Summary by CodeRabbit

  • New Features

    • Added support for JetBrains GitHub Copilot as a managed client, now visible in the clients list.
    • Provides platform-specific configuration paths for Windows, macOS, and Linux.
    • New client initially appears as “Not Configured.”
  • Documentation

    • Added in-app guidance in the Manual Configuration window for setting up JetBrains GitHub Copilot.

Copy link
Contributor

coderabbitai bot commented Oct 10, 2025

Walkthrough

Adds JetBrains GitHub Copilot as a new MCP client, introduces explicit integer values to McpTypes (including new JetBrainsCopilot), and updates the ManualConfigEditorWindow to render a Copilot-specific instruction branch.

Changes

Cohort / File(s) Summary
Client registry update
UnityMcpBridge/Editor/Data/McpClients.cs
Adds a public McpClient entry for JetBrains GitHub Copilot with Windows/macOS/Linux config paths, type set to McpTypes.JetBrainsCopilot, initial status “Not Configured”.
Enum value assignments
UnityMcpBridge/Editor/Models/McpTypes.cs
Assigns explicit integral values to existing enum members and adds JetBrainsCopilot = 7, changing underlying numeric mappings.
Editor UI branch
UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs
Adds an OnGUI branch for McpTypes.JetBrainsCopilot to display Copilot-specific instruction text.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Editor as ManualConfigEditorWindow
  participant Types as McpTypes
  participant Data as McpClients

  User->>Editor: Open Manual Config
  Editor->>Data: Load available clients
  Data-->>Editor: Clients list (includes JetBrainsCopilot)
  Editor->>Types: switch(selectedClient.Type)
  alt Type == JetBrainsCopilot
    Editor-->>User: Show JetBrains Copilot instructions
  else Other types
    Editor-->>User: Show existing type-specific UI
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • msanatan

Poem

A hop and a tap on the config lane,
New Copilot joins our editor train.
Enums in rows, numbers aligned,
A tiny UI branch neatly defined.
Thump-thump! says the bunny—approve if you please,
For paths are mapped and changes breeze. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “GitHub Copilot support for JetBrains IDE” succinctly and accurately summarizes the primary change of the pull request, which is adding JetBrains IDE support for GitHub Copilot. It aligns with both the PR objectives and the detailed file modifications without introducing unnecessary details or ambiguity.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5bc51b6 and a1aaeac.

📒 Files selected for processing (3)
  • UnityMcpBridge/Editor/Data/McpClients.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/McpTypes.cs (1 hunks)
  • UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs (1 hunks)
🔇 Additional comments (1)
UnityMcpBridge/Editor/Models/McpTypes.cs (1)

5-12: Enum McpTypes explicit values match original ordinals
Assignments 0–6 unchanged and new member at value 7 preserves existing serialization compatibility.

mcpType = McpTypes.VSCode,
configStatus = "Not Configured",
},
// 6) JetBrains GitHub Copilot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix comment numbering inconsistency.

The comment says "6) JetBrains GitHub Copilot", but the previous entries use "5)" for VSCode and "3)" for Kiro below. The numbering should be consistent throughout the list for maintainability.

Consider renumbering all entries sequentially (1-8) to match the actual order in the list.

🤖 Prompt for AI Agents
In UnityMcpBridge/Editor/Data/McpClients.cs around line 137, the inline comment
"6) JetBrains GitHub Copilot" is misnumbered relative to the surrounding list;
renumber the entire list entries sequentially (1 through N, e.g., 1-8) to
reflect the actual order, updating this line and any other out-of-sequence
comment numbers so the list is consistent and maintainable.

Comment on lines +137 to +164
// 6) JetBrains GitHub Copilot
new()
{
name = "JetBrains GitHub Copilot",
windowsConfigPath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"github-copilot",
"intellij",
"mcp.json"
),
macConfigPath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
"Library",
"Application Support",
"", //TODO(PR): I need some help here
"", //TODO(PR): I need some help here
"mcp.json"
),
linuxConfigPath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".config",
"", //TODO(PR): I need some help here
"", //TODO(PR): I need some help here
"mcp.json"
),
mcpType = McpTypes.JetBrainsCopilot,
configStatus = "Not Configured",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical: Empty path segments will create invalid file paths.

Lines 151-152 and 158-159 contain empty string arguments in Path.Combine, which will result in consecutive path separators (e.g., ~/Library/Application Support//mcp.json on macOS). This creates invalid paths that cannot be used to locate the configuration file.

The correct paths for JetBrains GitHub Copilot need to be researched. Based on typical JetBrains IDE conventions, the paths are likely:

macOS:

macConfigPath = Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
    "Library",
    "Application Support",
    "github-copilot",
    "intellij",
    "mcp.json"
)

Linux:

linuxConfigPath = Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
    ".config",
    "github-copilot",
    "intellij",
    "mcp.json"
)

However, these paths should be verified against official JetBrains GitHub Copilot documentation.

Run the following web search to find the official configuration paths:


🌐 Web query:

What is the configuration file path for GitHub Copilot in JetBrains IDEs on macOS and Linux?

💡 Result:

The Copilot config file is github-copilot.xml.

  • macOS: ~/Library/Application Support/JetBrains//options/github-copilot.xml. [1][2]
  • Linux: ~/.config/JetBrains//options/github-copilot.xml. [1][2]

(If the file doesn't exist yet, change the Copilot language settings in the IDE or create the file manually.) [1]


Critical: Invalid JetBrains Copilot config paths
Lines 151–152 and 158–159 use empty string segments and point to a non-existent “mcp.json”. The actual Copilot config is an XML file named github-copilot.xml under JetBrains//options. Update to:

macConfigPath = Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
    "Library",
    "Application Support",
    "JetBrains",
    "<PRODUCT><VERSION>",
    "options",
    "github-copilot.xml"
);
linuxConfigPath = Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
    ".config",
    "JetBrains",
    "<PRODUCT><VERSION>",
    "options",
    "github-copilot.xml"
);

Replace <PRODUCT><VERSION> with the target IDE and version (e.g. IntelliJIdea2025.2).

🤖 Prompt for AI Agents
In UnityMcpBridge/Editor/Data/McpClients.cs around lines 137 to 164, the
macConfigPath and linuxConfigPath currently contain empty string path segments
and point to a non-existent mcp.json; replace those path builders so they point
to the JetBrains XML config location: use
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
"Library", "Application Support", "JetBrains", "<PRODUCT><VERSION>", "options",
"github-copilot.xml") for macConfigPath and
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".config", "JetBrains", "<PRODUCT><VERSION>", "options", "github-copilot.xml")
for linuxConfigPath, and document or replace the placeholder <PRODUCT><VERSION>
with the target IDE and version (e.g. IntelliJIdea2025.2).

Comment on lines +141 to +146
windowsConfigPath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"github-copilot",
"intellij",
"mcp.json"
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the Windows config path is correct.

The Windows path uses %LOCALAPPDATA%\github-copilot\intellij\mcp.json. Please verify this is the correct location where JetBrains GitHub Copilot stores its MCP configuration file on Windows.


🌐 Web query:

What is the MCP configuration file location for GitHub Copilot in JetBrains IDEs on Windows?

💡 Result:

You don't need to hunt for a specific file path — in JetBrains IDEs GitHub Copilot's MCP config is edited from the Copilot UI (GitHub Copilot icon → Edit settings → "Edit in mcp.json"), which opens the mcp.json configuration used by the IDE. See GitHub's Copilot MCP docs and JetBrains' MCP/AI Assistant docs for details. [1][2]

Sources:
[1] GitHub docs — Extending Copilot Chat with the Model Context Protocol (MCP).
[2] JetBrains — Model Context Protocol (MCP) / MCP Server documentation.


Remove hardcoded Windows MCP config path. The Copilot MCP configuration isn’t stored at %LOCALAPPDATA%\github-copilot\intellij\mcp.json—it’s managed through the IDE UI.

🤖 Prompt for AI Agents
In UnityMcpBridge/Editor/Data/McpClients.cs around lines 141-146, remove the
hardcoded Windows MCP config path that points to
%LOCALAPPDATA%\github-copilot\intellij\mcp.json; instead stop assuming a fixed
file location and either (a) obtain the MCP config path via the IDE/settings API
or a passed-in configuration value (e.g., GetMcpPathFromIDE() or a
constructor/initializer parameter), or (b) set the windowsConfigPath variable to
null/absent and rely on the IDE-managed configuration flow. Delete the hardcoded
Path.Combine block and replace it with a call or fallback that defers to the
IDE/configuration provider so the code no longer assumes a local file path.

Comment on lines +104 to +110
else if (mcpClient?.mcpType == McpTypes.JetBrainsCopilot)
{
EditorGUILayout.LabelField(
" a) Going to File > Settings > Tools > GitHub Copilot > Model Context Protocol (MCP) > Configure",
instructionStyle
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Verify the instruction path matches JetBrains IDE UI.

The instruction path "File > Settings > Tools > GitHub Copilot > Model Context Protocol (MCP) > Configure" should be verified against the actual JetBrains IDE interface to ensure users can follow it successfully.


🌐 Web query:

How to configure Model Context Protocol (MCP) for GitHub Copilot in JetBrains IDEs?

💡 Result:

Short answer — use the Copilot Chat MCP config (mcp.json) inside the JetBrains Copilot Chat tools UI or enable the IDE’s built‑in MCP server and copy the client config. Steps + examples:

  1. Open Copilot Chat in your JetBrains IDE (lower right Copilot icon) and switch to Agent mode. Click the tools icon (“Configure your MCP server”) → Add MCP Tools → Edit mcp.json. [1]

  2. Add one or more MCP servers in mcp.json. Examples:

    • Remote (GitHub API with PAT):
      {
      "servers": {
      "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "requestInit": { "headers": { "Authorization": "Bearer YOUR_PAT_HERE" } }
      }
      }
      }
    • Local (memory server):
      {
      "servers": {
      "memory": {
      "command": "npx",
      "args": ["-y","@modelcontextprotocol/server-memory"]
      }
      }
      }
      Save the file and restart the client if needed. [1]
  3. (Alternative) Use JetBrains’ built‑in MCP server (JetBrains 2025.2+): Settings | Tools | MCP Server → Enable MCP Server. Use Auto‑Configure for supported external clients or Copy SSE/StdIO config and paste into the external client’s config (then restart that client). You can also enable “Run shell commands / run configurations without confirmation” if desired. [2]

  4. If using the JetBrains MCP proxy (for external clients or multiple IDEs) install the mcp‑server plugin or proxy (JetBrains mcp proxy / mcp-jetbrains) and configure the client to run the proxy (example: command: "npx", args: ["-y","@jetbrains/mcp-proxy"]). Set IDE_PORT/HOST env if needed. Troubleshooting notes (Node ≥18, nvm symlink) are in the repo/docs. [3][4]

References:
[1] GitHub Docs — Extending Copilot Chat with Model Context Protocol (MCP).
[2] JetBrains Help — Use your IDE as an MCP server (MCP settings & auto‑configure).
[3] JetBrains mcp-jetbrains / proxy repo (usage examples).
[4] JetBrains MCP Server plugin repo / docs.


Update JetBrains Copilot MCP configuration path
Change the instruction text in UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs (lines 104–110) to reflect the current Copilot Chat UI, for example:

EditorGUILayout.LabelField(
    "    a) Open Copilot Chat (click the lower-right Copilot icon), click the Tools icon (‘Configure your MCP server’) and edit mcp.json",
    instructionStyle
);
🤖 Prompt for AI Agents
In UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs around lines 104 to
110, update the JetBrains Copilot MCP instruction string to reflect the current
Copilot Chat UI: replace the existing LabelField text that points to File >
Settings > Tools > GitHub Copilot with a new message instructing users to open
Copilot Chat (lower-right Copilot icon), click the Tools/Configure your MCP
server icon, and edit mcp.json, keeping the same instructionStyle parameter.

@msanatan
Copy link
Contributor

Awesome @melipefello! Would their docs have where the MCP configs go?

@melipefello
Copy link
Author

Awesome @melipefello! Would their docs have where the MCP configs go?

Hey @msanatan, no luck so far browsing the docs. I'll probably need to ask around, try to fetch the path and update the PR. I should get at least the macOS one tomorrow :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants