Skip to main content
GitHub Copilot can use MSPortal’s MCP tools to work with the tickets, devices, reports, compliance data, and other portal information your MSPortal account can access. The connection uses browser-based OAuth, so you do not need to create or store an API key. This guide covers GitHub Copilot Chat in VS Code and the standalone GitHub Copilot CLI.
GitHub Copilot’s cloud coding agent and code review do not currently support remote MCP servers that use OAuth. Connect MSPortal through Copilot Chat in your local VS Code installation or through Copilot CLI.

Prerequisites

  • An MSPortal account that you can sign in to.
  • The MCP Server write permission in MSPortal. Ask an administrator to grant it if the setup options are disabled.
  • Your MSPortal server URL from Settings → MCP Server.
  • For VS Code: a current version of VS Code with GitHub Copilot installed and signed in.
  • For Copilot CLI: GitHub Copilot CLI installed and signed in. Run copilot login if needed.

Connect GitHub Copilot in VS Code

1

Open the MSPortal MCP settings

In MSPortal, go to Settings → MCP Server and select GitHub Copilot (VS Code).
2

Add the server to VS Code

Click Add to GitHub Copilot (VS Code) in the setup dialog, then allow VS Code to open the configuration.You can also open the VS Code Command Palette, run MCP: Add Server, choose HTTP, and paste your MSPortal server URL. Name the server msportal, then choose whether to install it globally or in the current workspace.
Choose the global option if you want MSPortal available in Copilot Chat across all of your VS Code workspaces.
3

Trust and authenticate the server

Allow VS Code to start the server. When your browser opens, sign in to MSPortal, review the requested access, and click Approve.
4

Enable the MSPortal tools

Open GitHub Copilot Chat, select Agent mode, and click Configure Tools in the chat input. Confirm that the MSPortal tools you want to use are enabled.
5

Test the connection

Ask Copilot:
List the MSPortal tools you can use.
Copilot should return tools allowed by both the access you approved and your MSPortal role.

Manual VS Code configuration

If you prefer to configure the server manually, run MCP: Open User Configuration from the VS Code Command Palette and add:
Save the file, then use the actions shown above the msportal entry to start and authenticate the server.

Connect GitHub Copilot CLI

1

Copy your MSPortal server URL

In MSPortal, go to Settings → MCP Server and copy the Server URL.
2

Add the remote server

Run the following command, replacing the placeholder with the URL you copied:
3

Authenticate with MSPortal

Start Copilot CLI by running copilot, then enter:
Sign in to MSPortal in the browser window that opens, review the requested access, and click Approve.
4

Verify the connection

In Copilot CLI, enter:
Confirm that the server is connected and its MSPortal tools are listed.

Manual Copilot CLI configuration

You can configure the same connection in ~/.copilot/mcp-config.json:
VS Code and Copilot CLI use different configuration formats. VS Code uses a servers object in its mcp.json; Copilot CLI uses an mcpServers object in ~/.copilot/mcp-config.json. Copilot CLI does not read VS Code’s .vscode/mcp.json file.

Manage access

The access you approve is also limited by your MSPortal role, tenant, and company visibility. To review or remove the connection, return to Settings → MCP Server in MSPortal and use Revoke beside the connected Copilot client.

Troubleshooting

In VS Code, run MCP: List Servers, select msportal, and choose the authentication action. In Copilot CLI, run /mcp auth msportal.
In VS Code, run MCP: List Servers and confirm msportal is started. In Copilot CLI, run /mcp show msportal. Remember that VS Code and Copilot CLI use separate configuration files.
In VS Code, open Configure Tools in Copilot Chat and confirm the tool is enabled. Then check that you approved the related MCP access and that your MSPortal role grants the required permission.
GitHub and VS Code organization policies can restrict which MCP servers are allowed. Ask your GitHub or VS Code administrator to allow the MSPortal server URL.
Re-authenticate the server. If that does not resolve the issue, open Settings → MCP Server in MSPortal, revoke the Copilot connection, and connect it again.