Skip to content

Request: Add support for Visual Studio GitHub Copilot for codebase-memory-mcp #731

Description

@kenvqin

What problem does this solve?

Problem Description

When using codebase-memory-mcp as an MCP server with GitHub Copilot in Visual Studio (not VS Code), the server is recognized and appears in the MCP list, but any query that invokes it fails with a schema validation error. The error indicates that the function codebase_memory_ingest_traces does not include "additionalProperties": false as required by Visual Studio's Copilot client.

This is a compatibility issue specific to Visual Studio. The same server works perfectly with other MCP clients such as Trae and Cursor, so it is likely that Visual Studio's Copilot enforces a stricter JSON Schema validation.

Steps to Reproduce

  1. Install codebase-memory-mcp (e.g., via npm install -g codebase-memory-mcp or using the Windows installer).
  2. Configure the MCP server in Visual Studio using the built-in MCP configuration UI:
    • Go to Tools → Options → MCP Servers (or use the MCP Server Register menu in Copilot Chat).
    • Add a new server with the following settings:
      • Server ID: codebase-memory
      • Type: stdio
      • Command: codebase-memory-mcp (this works if the binary is in your PATH)
    • The UI generates the following configuration automatically:
      {
      "inputs": [],
      "servers": {
      "codebase-memory": {
      "type": "stdio",
      "command": "codebase-memory-mcp",
      "args": [],
      "env": {}
      }
      }
      }
  • Alternatively, you can manually create a .vs/mcp.json file in your solution root with the same content.
  1. Open a solution and start a Copilot Chat session in Agent mode.
  2. Ask a question that would trigger the MCP tools, e.g., "Index this repository" or "Show me the call hierarchy of class X".
  3. Observe the error in the Copilot output window.

Actual Result

Copilot Chat returns an error and the chat becomes unusable. The detailed error log shows:
Microsoft.VisualStudio.Copilot.Service: CopilotFailure
exception_type: Microsoft.VisualStudio.Copilot.Diagnostics.Exceptions.CopilotApiException
exception_message: Invalid schema for function 'codebase_memory_ingest_traces': In context=(properties',traces','items'), 'additionalProperties' is required to be supplied and to be false.
http_status_code: 400
inner_exception: System.ClientModel.ClientResultException
inner_exception_message: HTTP 400 (: invalid_request_body) Invalid schema for function 'codebase_memory_ingest_traces': In context=(properties',traces','items'), 'additionalProperties' is required to be supplied and to be false.

Expected Result

The MCP server should function correctly with Visual Studio's GitHub Copilot, allowing users to query codebase memory without errors. The schema of all exposed functions should comply with Visual Studio's validation requirements.

Additional Context

  • Works on: Trae, Cursor, and likely VS Code (with appropriate extension).
  • Fails on: Visual Studio 2022 (version 17.12 or later, with MCP support enabled).
  • The error is specific to the function codebase_memory_ingest_traces – possibly other functions also need the same fix.
  • The error suggests that Visual Studio requires "additionalProperties": false to be explicitly set in the schema for object properties, which may not be required by other MCP clients.
  • The configuration above is generated directly by Visual Studio's UI, not manually written, so the configuration format itself is correct.

Suggested Fix

Update the tool definitions (especially the schema for codebase_memory_ingest_traces) to include "additionalProperties": false in the appropriate locations (e.g., within the properties object for traces and its items). This would make the server fully compliant with Visual Studio's stricter validation.

Environment

  • OS: Windows 11
  • Visual Studio: 2022 (Enterprise/Community) with MCP support
  • GitHub Copilot: Latest version (built-in)
  • codebase-memory-mcp: v0.8.1 (latest as of writing)

Additional Notes

If you need more logs or testing, I am happy to provide them. This is a significant blocker for users who rely on Visual Studio as their primary IDE. Thank you for maintaining this great project!

Proposed solution

We kindly request that codebase-memory-mcp be made compatible with Visual Studio's GitHub Copilot, so that users of that IDE can also benefit from this tool.

Alternatives considered

No response

Confirmations

  • I searched existing issues and this is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationenhancementNew feature or requestpriority/normalStandard review queue; useful PR with ordinary maintainer urgency.windowsWindows-specific issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions