Skip to content

fix: disable MCP servers by default to prevent token limit errors#1144

Open
jakkaj wants to merge 2 commits intomicrosoft:mainfrom
jakkaj:fix/disable-mcp-servers-by-default
Open

fix: disable MCP servers by default to prevent token limit errors#1144
jakkaj wants to merge 2 commits intomicrosoft:mainfrom
jakkaj:fix/disable-mcp-servers-by-default

Conversation

@jakkaj
Copy link
Member

@jakkaj jakkaj commented Mar 20, 2026

Pull Request

Description

Disables MCP servers by default by renaming .vscode/mcp.json to .vscode/mcp.json.sample. Contributors opt in by renaming or copying server entries into their own
mcp.json.

Related Issue(s)

N/A — discovered during contributor onboarding.

Type of Change

Infrastructure & Configuration:

  • DevContainer configuration

Testing

Verified that with mcp.json removed, GitHub Copilot CLI no longer loads the WorkIQ or GitHub MCP servers automatically, avoiding the token limit error shown below:

CAPIError: 400 prompt token count of 186315 exceeds the limit of 168000

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

Required Automated Checks

  • Markdown linting: npm run lint:md
  • Spell checking: npm run spell-check
  • Frontmatter validation: npm run lint:frontmatter

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues

Additional Notes

The MCP server configs (GitHub HTTP endpoint and WorkIQ via npx) are preserved in mcp.json.sample. The README has been updated with a note explaining how to enable them.

Rename mcp.json to mcp.json.sample so MCP servers are opt-in rather
than loaded automatically. The WorkIQ and GitHub MCP servers were
inflating prompt token counts beyond model limits (186k vs 168k cap),
causing repeated API failures for contributors using GitHub Copilot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jakkaj jakkaj requested a review from a team as a code owner March 20, 2026 01:19
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.78%. Comparing base (4229df1) to head (11b943f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1144      +/-   ##
==========================================
- Coverage   86.91%   86.78%   -0.14%     
==========================================
  Files          59       59              
  Lines        8752     8688      -64     
==========================================
- Hits         7607     7540      -67     
- Misses       1145     1148       +3     
Flag Coverage Δ
pester 85.34% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WilliamBerryiii
Copy link
Member

@katriendg & @agreaves-ms - the MCP server for workiq is causing some friction ... I think we need to disable it by default ... I was hitting this earlier and had to disable things to deal with the crashing.

@katriendg
Copy link
Contributor

@WilliamBerryiii @jakkaj Interesting, I have not noticed this issue in local environment, but I wonder if this is why we were also seeing some issues on GitHub coding agent (same error message).
I believe this is a good current fix until we evaluate how to make the onboarding a bit easier without manual MCP setup for contributors.
I believe WorkIq addition we did being in experimental maturity for Meeting Analysti Agent is not yet in HVE Core installer or docs (https://github.com/microsoft/hve-core/blob/main/docs/getting-started/mcp-configuration.md), so we should be fine there.

Copy link
Contributor

@katriendg katriendg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakkaj Thanks for adding this one, to complete the PR we must link the associated issue for this fix, and update the ms.date field in the MD file you changed to pass CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants