Skip to content

GitHub MCP Server fails in Visual Studio 2026 Insiders due to invalid github_push_files schema #2011

@aarondglover

Description

@aarondglover

Describe the bug

FYI. This issue may be with Visual Studio team and I will report bug there too.

When the GitHub MCP Server is enabled in Visual Studio 2026 Insiders, Copilot consistently fails with an HTTP 400 error originating from the github_push_files function schema.

The failure appears to be caused by an invalid JSON schema definition for github_push_files, specifically the files array item schema missing a required additionalProperties: false declaration. This results in Copilot being unable to invoke the MCP tool and causes all related interactions to fail.

Disabling the GitHub MCP Server immediately resolves the issue.

Note: The error logs below are reported in the Output Window for "Github Copilot".

Affected version

Please run docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version and paste the output below

NO - I am using HTTP Version of the MCP Server with oauth/grant permission/access.

Steps to reproduce the behavior

  1. Install Visual Studio 2026 Insiders (Copilot enabled).
  2. Configure the GitHub MCP Server as an HTTP MCP server in %USERPROFILE%.mcp.json.
  3. Restart Visual Studio.
  4. Open any solution, enable the github mcp server and authenticate. Enable Tools,
  5. Invoke Copilot in-chat.
    6 Attempt an action that causes Copilot to use any tool... such as "execute 'pwd' in the terminal and report to me the directory path"

Observe Copilot failing with an HTTP 400 error.

Expected vs actual behavior

Expected behavior

  • Copilot successfully invokes github_push_files.
  • MCP server accepts the request and processes the file push normally.

Actual behavior

Copilot fails with HTTP 400 (: invalid_request_body).

The error indicates an invalid function schema for github_push_files.

**All Copilot interactions involving GitHub tooling fail until the MCP server is disabled. This is the killer point for me. I basically renders Copilot useless as it can't run any tooling if the Github MCP server is enabled **

Logs

HTTP 400 (: invalid_request_body)

Invalid schema for function 'github_push_files':
In context=('properties', 'files', 'items'),
'additionalProperties' is required to be supplied and to be false.


System.ClientModel.ClientResultException: HTTP 400 (: invalid_request_body)
Invalid schema for function 'github_push_files'
   at OpenAI.ClientPipelineExtensions.ProcessMessageAsync(...)
   at OpenAI.Responses.OpenAIResponseClient.CreateResponseAsync(...)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreAsync(...)

[Conversations Information] [CopilotResponses] Environment variable COPILOT_USE_DEFAULTPROXY found: False
[Conversations Error] [CopilotClient EventType(6)] Unknown exception:
System.ClientModel.ClientResultException: HTTP 400 (: invalid_request_body)

The version of Visual Studio: Visual Studio 2026 Insiders [11506.43]

Invalid schema for function 'github_push_files': In context=('properties', 'files', 'items'), 'additionalProperties' is required to be supplied and to be false.
   at OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.CreateResponseAsync(BinaryContent content, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.<>c__DisplayClass13_0.<<CreateResponseStreamingAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+MoveNext()
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreAsync(HttpClient httpClient, CopilotAPIRequest request, Action`1 onToken, Action`1 onUpdate, CopilotInteractionId interactionId, Boolean validateRootRequestId, String sessionToken, CancellationToken cancellationToken)
[Conversations Error] [Conversations] Unhandled exception in AskInConversationAsync: System.Exception: Error occurred while invoking intent 'Generic'.
HTTP 400 (: invalid_request_body)

Invalid schema for function 'github_push_files': In context=('properties', 'files', 'items'), 'additionalProperties' is required to be supplied and to be false.
   at OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.CreateResponseAsync(BinaryContent content, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.<>c__DisplayClass13_0.<<CreateResponseStreamingAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+MoveNext()
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreAsync(HttpClient httpClient, CopilotAPIRequest request, Action`1 onToken, Action`1 onUpdate, CopilotInteractionId interactionId, Boolean validateRootRequestId, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.GetGitHubApiResponseAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, Action`1 onToken, Action`1 onUpdate, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.GetApiResponseAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, Action`1 onToken, Action`1 onUpdate, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.RequestAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, ICopilotStreamingContentSink streamTarget, String sessionToken, CancellationToken cancellationToken);
   at Conversations.Kernel.ConversationBase.AskAsync(CompletionRequest requestContext, CancellationToken cancellation)
   at Conversations.Kernel.ConversationBase.AskAsync(CompletionRequest requestContext, CancellationToken cancellation)
   at Microsoft.VisualStudio.Conversations.Service.ServiceTarget.AskInConversationAsync(CopilotSessionId sessionId, ConversationRequest conversationRequest, CancellationToken cancellation)
[Conversations Information] [GetQuota] Environment variable COPILOT_USE_DEFAULTPROXY found: False
[CopilotSessionProvider Error] Unhandled exception invoking responder GitHub Copilot: StreamJsonRpc.RemoteInvocationException: Error occurred while invoking intent 'Generic'.
HTTP 400 (: invalid_request_body)

Invalid schema for function 'github_push_files': In context=('properties', 'files', 'items'), 'additionalProperties' is required to be supplied and to be false.
   at OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.CreateResponseAsync(BinaryContent content, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.<>c__DisplayClass13_0.<<CreateResponseStreamingAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+MoveNext()
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreAsync(HttpClient httpClient, CopilotAPIRequest request, Action`1 onToken, Action`1 onUpdate, CopilotInteractionId interactionId, Boolean validateRootRequestId, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.GetGitHubApiResponseAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, Action`1 onToken, Action`1 onUpdate, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.GetApiResponseAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, Action`1 onToken, Action`1 onUpdate, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.RequestAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, ICopilotStreamingContentSink streamTarget, String sessionToken, CancellationToken cancellationToken);
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__171`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Copilot.ResponderBroker.<SendRequestHelperAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Copilot.ResponderBroker.<SendRequestHelperAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Copilot.ResponderBroker.<SendDirectRequestAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
   at Microsoft.VisualStudio.Copilot.Core.Agents.CopilotAgentModeResponder.<RespondInternalAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
   at Microsoft.VisualStudio.Copilot.CopilotDefaultOrchestrator.<SendRequestToResponderAsync>d__24.MoveNext()
RPC server exception:
System.Exception: Error occurred while invoking intent 'Generic'.
HTTP 400 (: invalid_request_body)

Invalid schema for function 'github_push_files': In context=('properties', 'files', 'items'), 'additionalProperties' is required to be supplied and to be false.
   at OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.CreateResponseAsync(BinaryContent content, RequestOptions options)
   at OpenAI.Responses.OpenAIResponseClient.<>c__DisplayClass13_0.<<CreateResponseStreamingAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+MoveNext()
   at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreWithResponsesAPIAsync(HttpClient httpClient, ChatRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Conversations.CopilotClient.CopilotAPIClient.ChatCoreAsync(HttpClient httpClient, CopilotAPIRequest request, Action`1 onToken, Action`1 onUpdate, CopilotInteractionId interactionId, Boolean validateRootRequestId, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.GetGitHubApiResponseAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, Action`1 onToken, Action`1 onUpdate, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.GetApiResponseAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, Action`1 onToken, Action`1 onUpdate, String sessionToken, CancellationToken cancellationToken)
   at Conversations.Kernel.LLMClient.RequestAsync(CopilotAPIRequest request, CopilotInteractionId interactionId, ICopilotStreamingContentSink streamTarget, String sessionToken, CancellationToken cancellationToken);
      at Conversations.Kernel.ConversationBase.AskAsync(CompletionRequest requestContext, CancellationToken cancellation)
      at Conversations.Kernel.ConversationBase.AskAsync(CompletionRequest requestContext, CancellationToken cancellation)
      at Microsoft.VisualStudio.Conversations.Service.ServiceTarget.AskInConversationAsync(CopilotSessionId sessionId, ConversationRequest conversationRequest, CancellationToken cancellation)
      at Microsoft.VisualStudio.Conversations.Service.CopilotServiceContainer.AskInConversationAsync(CopilotSessionId sessionId, ConversationRequest request, CancellationToken cancellationToken)

[UI.SessionViewModel Error] Response Status: Failure
[Conversations Information] [CopilotClient] Copilot Internal User response: Conversations.Abstractions.Auth.CopilotUserData
[Conversations Information] [CopilotModels] Environment variable COPILOT_USE_DEFAULTPROXY found: False
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions