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 documents a remote OAuth limitation for Copilot cloud agent and code review. Use an OAuth-capable local client for this connection; confirm the current GitHub cloud-agent restrictions before choosing that surface.

Prerequisites

  • An MSPortal account that you can sign in to.
  • The MCP Server write permission in MSPortal. Your MSP administrator manages Company-user permissions. Setup access does not grant every portal tool.
  • 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.
Check the actual connected server and tool list. Then ask Copilot to call get_current_user and verify the expected tenant and company context. A generated list of tool names without a real connection is not a passing test.

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 with copilot, open its /mcp management interface and follow the authentication prompt for msportal. Complete MSPortal browser sign-in and consent. Use your installed version’s MCP help if its authentication controls differ; GitHub sign-in and MSPortal authorization are separate.
4

Verify the connection

Use copilot mcp get msportal to inspect configuration and tools, and /mcp list in an interactive session to inspect server status. Verify an actual get_current_user call before requesting client data. See the official CLI command reference.

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. Do not assume the CLI reads .vscode/mcp.json directly. Workspace .mcp.json and user configurations can have different precedence; inspect which entry your client actually loaded.

Grouped tools and existing connections

The consolidated MSPortal catalog exposes up to 93 public tools covering 260 existing operations. Copilot can discover tools such as query_projects and manage_planner, then choose the relevant action using the tool’s schema. The available subset depends on your deployed server version and access. Existing calls using individual names, such as list_projects, continue to work with their original arguments. Pending confirmations retain their operation identity and expiry. Consolidation alone does not require a new server URL or broader OAuth access. When adopting the grouped catalog, refresh the client’s discovered tools and review Configure Tools or any explicit tools allowlist. Enable the new public names you need. The example "tools": ["*"] above is not tied to individual legacy names, but grants no extra server permissions. Custom clients that expect old names in tools/list need to update their discovery logic. See the action-to-tool mapping.

Before requesting changes

Ask Copilot to start with read tools and the intended company. Review the tool calls and output before requesting writes. The client’s tool-approval prompt, MSPortal OAuth consent and a portal proposal confirmation are different steps. Most mutations stage a proposal, but some tools run immediately. Marking notifications changes state; feedback submission sends an explicitly requested message. See MCP action behavior. Do not assume a global client approval setting adds a missing server confirmation.

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. Revocation does not remove local configuration or erase previously returned data. Existing access tokens can remain valid until expiry, up to about 15 minutes; ask your MSP administrator about MCP permission removal if subsequent requests must be blocked through the role check.

Troubleshooting

In VS Code, run MCP: List Servers, select msportal, and choose the authentication action. In Copilot CLI, open /mcp and follow the installed version’s authentication controls.
In VS Code, run MCP: List Servers and confirm msportal is started. In Copilot CLI, inspect /mcp list and copilot mcp get msportal. Remember that VS Code and Copilot CLI use separate configuration files.
Look up the operation’s public tool name in the MCP Tools Reference. In VS Code, open Configure Tools in Copilot Chat and confirm that grouped tool is enabled. Update any explicit legacy-name allowlist when adopting the grouped catalog, then check your MCP consent and MSPortal role permissions.
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.

Frequently asked questions

No. Complete the MSPortal browser sign-in and consent separately for the server connection.
No. Their configuration formats and loading precedence differ. Inspect the server actually loaded by each client instead of copying the other format unchanged.
No. MSPortal still applies OAuth access, role permissions, company scope and tool-specific restrictions.
No. It revokes the MSPortal grant and refresh sessions. Remove or disable the local entry separately if you no longer want it configured.
No. Inspect server status and require a real get_current_user tool call with the expected identity before requesting company records.
No. They serve different purposes. Review staged proposals and immediate-action behavior in the MCP Server guide before authorizing work.