Connect VS Code / GitHub Copilot to StackJack
GitHub Copilot in VS Code supports remote MCP servers natively (MCP is the Model Context Protocol, the open standard AI tools use to call external tools). VS Code 1.101 and later signs in…
Written By Christopher Scaminaci
Last updated 6 days ago
GitHub Copilot in VS Code supports remote MCP servers natively (MCP is the Model Context Protocol, the open standard AI tools use to call external tools). VS Code 1.101 and later signs in automatically the first time the server needs auth — no headers required.
Prerequisites
- VS Code 1.101 or later (this release added MCP authentication with automatic client registration).
- A GitHub Copilot subscription with Copilot Chat.
- A StackJack account that is a member of your workspace. Any team member can connect — no admin-created credentials needed for the sign-in path.
- Your StackJack MCP endpoint URL. Copy it from the MCP Setup page in the portal — that card shows the address for your workspace's region. The examples in this guide use the US address,
https://mcp.stackjack.io/mcp; other regions have their own hostname. See Your region and your endpoint.
Large catalog? Set up compact mode before you connect. Copilot returns an error when a single chat request carries more tools than it allows, and StackJack serves hundreds once you have a few connectors set up. Unlike Claude, Claude Desktop, Cursor and Windsurf, Copilot and VS Code are not detected automatically, so nothing shrinks the list on its own. Read Tool limits first and use the compact endpoint in the steps below.
Connect with sign-in (recommended)
- Open the Command Palette and run MCP: Add Server → choose HTTP.
- Paste the URL
https://mcp.stackjack.io/mcpand confirm. - Start the server — VS Code opens a browser to sign in. Use the same email, password, and MFA you use for the StackJack Portal.
- In Copilot Chat, switch to Agent mode to use your StackJack tools.
Alternatively, add this minimal .vscode/mcp.json (no headers) and start the server from the editor:
{
"servers": {
"stackjack": {
"type": "http",
"url": "https://mcp.stackjack.io/mcp"
}
}
}
If your organization has enabled catalog modes, use the compact endpoint https://compact.stackjack.io/mcp in place of the URL above — everything else in the setup is the same. See Tool limits.
Manual credentials (fallback)
Use this only when browser sign-in is not an option. An owner, co-owner, or Administrator creates an MCP client in the portal first (see Managing MCP credentials).
Two warnings before you copy anything below.
- Base64 is encoding, not encryption. Anyone who reads the encoded string can decode it back to your client id and secret in one command. Treat the encoded value as the secret itself.
- Watch where the secret comes to rest. A command you type lands in your shell history file. A value you paste into a config file stays in that file, and a config file inside a repository gets committed and shared. Never commit a file containing a credential, and never put one in a config you intend to share with the team.
Use the secure prompt version. VS Code asks for the value on first use and stores it in the operating system's secret store rather than in the file:
{
"inputs": [
{
"type": "promptString",
"id": "stackjack-credentials",
"description": "StackJack credentials (base64 of client_id:client_secret)",
"password": true
}
],
"servers": {
"stackjack": {
"type": "http",
"url": "https://mcp.stackjack.io/mcp",
"headers": {
"Authorization": "Basic ${input:stackjack-credentials}"
}
}
}
}
To produce the value it asks for, encode client_id:client_secret with your platform's base64 tool. Do it in a way that keeps the secret out of your shell history — most shells skip a command typed with a leading space when configured to, and you can otherwise clear the history entry afterwards.
The hardcoded form below is a last resort. It writes the credential into the config file in a form anyone with the file can decode. Use it only on a machine you control, in a file that is never committed or shared, and rotate the credential if the file leaves that machine:
{
"servers": {
"stackjack": {
"type": "http",
"url": "https://mcp.stackjack.io/mcp",
"headers": {
"Authorization": "Basic <BASE64_OF_CLIENT_ID:CLIENT_SECRET>"
}
}
}
}
Tool limits
Copilot returns an error rather than silently dropping tools when a single chat request carries too many. Two details make this bite: the budget counts all MCP servers and Copilot's built-in tools together, not StackJack alone, and StackJack can expose hundreds of tools depending on your connectors and plan. You will likely hit it.
The current figure is in Client tool limits, which is the one place StackJack maintains these. Copilot's own documentation governs; treat the table as StackJack's working record of it.
StackJack does not shrink the list for Copilot in VS Code on its own. For a few AI tools — Claude, Claude Desktop, Cursor and Windsurf — StackJack recognizes the tool as it connects and serves it a reduced catalog with no setup at all, and it recognizes Microsoft 365 Copilot connections as well, by how the connection signs in. That is a different product from this one: GitHub Copilot in VS Code presents no signal StackJack can recognize, so it is not in that set. If you change nothing, a large workspace is served the full tool list on every connection.
Serving Copilot a compact catalog
The shortest route is one step, and the rest need two.
- Use the compact endpoint — nothing to enable. Point Copilot at
https://compact.stackjack.io/mcpinstead ofhttps://mcp.stackjack.io/mcp. Nothing else in the setup changes, and no organization setting has to be on first: that address always serves the compact list. Copy it from the Compact endpoint card on MCP Setup.
Every other route needs an admin to tick Enable catalog modes for this organization on the Settings page first, because those routes change what the standard endpoint serves. With that on, any one of these works:
- Add
?tools=compactto the standard URL —https://mcp.stackjack.io/mcp?tools=compact. This is the quickest way to test a mode, but it works only if your client preserves the query string on an MCP server URL. If the tool list stays full, use the compact endpoint instead. - Set the organization default. On the Settings page, set Default catalog mode to Compact. This covers everyone who has not chosen their own.
- Set your own mode. On the Connectors page, in the My AI tool catalog card, choose Compact.
If you connected with sign-in, the per-MCP-client catalog mode does not apply to you. That setting belongs to a generated credential, and a sign-in connection carries none. Use the compact endpoint,
?tools=, the organization default, or your own per-member setting instead.
Compact mode hides nothing. Every tool you are permitted to use stays reachable — Copilot searches for and runs the rest on demand — and every permission still applies. See Choosing tools for each client and managing harness tool limits and Catalog modes.
Other ways to stay in range
- Use Copilot Chat's Configure Tools picker to enable only the tools you need for the task.
- Since VS Code 1.103, Copilot can group excess tools into expandable "virtual tools" when you exceed the threshold (controlled by the
github.copilot.chat.virtualTools.thresholdsetting). Treat this as a way to manage a large list, not as a guarantee that an over-limit request stops failing. - Connect through an MCP client with a restricted tool selection, or create several narrow clients for distinct workflows — see Choosing tools for each client.
Troubleshooting
- No sign-in prompt appears — check your VS Code version is 1.101+; older versions cannot register with StackJack automatically.
- Sign-in says no account was found — sign up in the portal first, or ask your team admin for an invite.
- The server starts, but every chat request errors on the number of tools — your catalog is over Copilot's per-request limit and nothing has reduced it. Work through both steps in Serving Copilot a compact catalog; doing only one of the two leaves the full list being served.
- You enabled catalog modes but the list is still full — enabling alone does not pick a mode. Complete step 2: use the compact endpoint, add
?tools=compact, or set a default mode. - For anything else, see Connection troubleshooting.