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 loginif 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.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: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 Sign in to MSPortal in the browser window that opens, review the requested access, and click Approve.
copilot, then enter: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
The browser sign-in did not open
The browser sign-in did not open
In VS Code, run MCP: List Servers, select msportal, and choose the authentication action. In Copilot CLI, run
/mcp auth msportal.MSPortal does not appear in Copilot
MSPortal does not appear in Copilot
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.Copilot cannot see an MSPortal tool
Copilot cannot see an MSPortal tool
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.
Your organization blocks the MCP server
Your organization blocks the MCP server
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.
The connection stopped working
The connection stopped working
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.
Related resources
- MCP Server overview — understand access, consent, permissions, and connection management.
- MCP Tools Reference — see every tool available through the MSPortal MCP server.
- Add and manage MCP servers in VS Code — official VS Code instructions.
- Add MCP servers to GitHub Copilot CLI — official GitHub instructions.