This documentation is for Stack Overflow for Teams Enterprise. Free, Basic, and Business users can access their documentation here. Find your plan.
Overview
The Stack Overflow for Teams MCP server makes your enterprise knowledge available to any MCP-compatible AI agent. To learn more about configuring and accessing the Stack Overflow for Teams Enterprise (SOE) MCP server, read the MCP Server Quickstart Guide.
In this article, we'll detail how to configure VS Code's Github Copilot extension to access your SOE site's MCP server.
Before you can configure Copilot to access your MCP server, you'll need:
Your site's MCP server to be enabled at https://[your_site].stackenterprise.co/enterprise/mcp.
The latest version of VS Code.
Github Copilot extension enabled with proper license and user account.
Install the MCP server in Github Copilot
Navigate to your site's MCP server at https://[your_site].stackenterprise.co/mcp.
Click Add to VS Code. VS Code will open.
NOTE: If you need an alternative install process, you can manually copy the configuration code from the MCP page and place it in an mcp.json file in VS Code.
In VS Code, you'll see the option to install the MCP server. Click Install.
You'll navigate to your SOE site to log in via SSO. Click Allow.
After successful authentication, VS Code will ask you to grant permission to open the external website. Click Open.
Select MCP in the command palette pull-down menu.
Ensure you are in agent mode in the chat area.
Copilot should now have access to your site's MCP server.
You can see additional tools by clicking the tool icon in the chat window.
Server details and status
To see the details of the server:
Click the extensions icon in the left pane.
Open the “MCP SERVERS - INSTALLED” section.
In the "Search Extensions…" box, enter “>MCP” and select MCP: List Servers.
This will give you a list of all installed MCP servers, along with their statuses.
Refresh Copilot's access token
Every 24 hours, MCP server access tokens expire. When this happens, the Copilot client will no longer be able to access your site's MCP server. To refresh the access token:
Click the Accounts button in the lower left corner of the interface.
Select MCP (your site), then click Sign Out.
Click the gear icon (settings) next to your MCP server and select Start Server.
Complete the authentication process.
Invoke tools/prompts
There are three ways to invoke tools and prompts using the Copilot MCP server integration: automatic tool (keyword), explicit tool, and explicit prompt (recommended).
Method 1: automatic tool (keyword) invocation
Copilot will invoke the MCP server if you use keywords relating to the server or tools. For example, typing search
or create question
will invoke the search tool or create question tool respectively. The agent will automatically pull in other tools like get_articles
or get_comments
as needed.
You can also automatically invoke tools by mentioning other keywords relating to the server (for example: “enterprise”, “company”, “internal”, or “teams”).
Method 2: explicit tool invocation with '#' character
You can explicitly invoke tools by preceding them with the '#' character.
Method 3: explicit prompt invocation with '/' character
You can explicitly invoke prompts by preceding them with the '/' character.
When you precede a command with the '/' character, VS Code automatically adds '@vscode' to the front to perform the command on your codebase.
To prevent this, type the full command then delete '@vscode'. Submit the command.
VS Code will then use the MCP client to perform the command.
We recommend that you directly invoke prompts where possible. Prompts provide the client specific instructions on which tools to use, which can improve results.
NOTE: MCP clients generally don't invoke prompts by default. We expect prompt invocation to become the standard for MCP servers in the future.
If you need further support or have questions, contact your site administrator.