> For the complete documentation index, see [llms.txt](https://docs.ovaledge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ovaledge.com/release8.2/mcp-server/deployment-options/remote-mcp/remote-oauth-mcp/set-up-vs-code-github-copilot-using-remote-oauth.md).

# Set up VS Code GitHub Copilot using Remote OAuth

## Scenario

Use this procedure to connect GitHub Copilot in Visual Studio Code to the OvalEdge Remote MCP Server via OAuth. This configuration enables GitHub Copilot to securely access OvalEdge MCP tools through browser-based authentication without storing OvalEdge credentials in the local configuration file.

{% hint style="info" %}
Ensure the OvalEdge Remote MCP Server is deployed, and the MCP endpoint URL is available.
{% endhint %}

### Steps Involved

1. In **Visual Studio Code**, press **Ctrl + Shift + P** to open the **Command Palette**, type **MCP: Open User Configuration**, and select it.

   ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2FlFweNKnuCiAFFAwW6Axs%2Funknown.png?alt=media\&token=b2102783-29e0-4d5a-9153-c267f6d2e3a0)
2. The **mcp.json** configuration file opens. Add the Remote MCP OAuth configuration under the **servers** section using the Remote MCP endpoint URL and OAuth callback port.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Replace <strong>YOUR_PUBLIC_MCP_BASE_URL</strong> with the deployed OvalEdge Remote MCP endpoint URL.</p></div>

   ```json
   {
     "servers": {
       "ovaledge-remote-oauth": {
         "type": "http",
         "url": "https://YOUR_PUBLIC_MCP_BASE_URL/mcp",
         "oauth": {
           "callbackPort": 8790
         }
       }
     }
   }
   ```
3. Save the **mcp.json** file after adding the configuration.
4. Press **Ctrl + Shift + P**, type **Developer: Reload Window**, and select it to reload Visual Studio Code and apply the updated MCP configuration.

   ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2FCstzssiJej4KAWfQjT4Y%2Funknown.png?alt=media\&token=8a189ada-f65f-4d02-8cde-9041c7454eeb)
5. Press **Ctrl + Shift + P**, type **MCP: List Servers**, and select it.

   ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2Fb9gZhxOaWZ6e1629uyXg%2Funknown.png?alt=media\&token=feb2ed3e-1938-4e5c-afe0-83a3a0fec09b)
6. Select the **ovaledge-remote-oauth** server from the list.

   ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2FVJOwoWiM6KmYKRxHEeJc%2Funknown.png?alt=media\&token=95e374ea-cb1d-4824-a207-9481465eda9d)
7. Select **Start Server** to start the configured Remote MCP server.

   ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2FcdfwCqGYyyrNLacxCE5V%2Funknown.png?alt=media\&token=fa17a7c0-11fb-494a-9fc6-0dbbe889f50c)
8. When the MCP server starts, a confirmation dialog appears indicating it wants to authenticate. Click **Allow**.

   ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2FRsBuzkDYb51NpuH7mhfl%2Funknown.png?alt=media\&token=560277eb-addd-4738-95e0-6b9d3d73d240)
9. If not already signed in to Okta, the user navigates to the **Okta sign-in page**. Enter the Okta credentials and complete the sign-in process.

   ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2Fs9I7yIdDe7T9Zgv6UqoF%2Funknown.png?alt=media\&token=3202e949-561e-4d8d-a668-44778a9486d3)
10. If already signed in to Okta, authentication proceeds directly, and a browser popup prompts opening **Visual Studio Code 2**. Click **Open Visual Studio Code 2** to return to Visual Studio Code and complete the authentication.

    ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2FjRGp0wxXyAyT1yzNZ32V%2Funknown.png?alt=media\&token=2a28a4f6-0f24-4051-a990-48ef7b0493bf)
11. Verify that the Output panel displays a message similar to **Discovered 25 tools**, confirming that the MCP server has started successfully.

    ![](https://1227144352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnJyYKHzsnoFOdZJtHsc%2Fuploads%2FfGTMAAehNlAxdASV0rWP%2Funknown.png?alt=media\&token=d838411a-254d-4edc-9279-22c840bb21fd)

***

Copyright © 2026, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ovaledge.com/release8.2/mcp-server/deployment-options/remote-mcp/remote-oauth-mcp/set-up-vs-code-github-copilot-using-remote-oauth.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
