Skip to content

chore(copilot): deprecate mcp server#4797

Merged
icecrasher321 merged 3 commits into
stagingfrom
chore/deprecate-copilot-mcp
May 29, 2026
Merged

chore(copilot): deprecate mcp server#4797
icecrasher321 merged 3 commits into
stagingfrom
chore/deprecate-copilot-mcp

Conversation

@icecrasher321
Copy link
Copy Markdown
Collaborator

Summary

Almost no usage, based on very old version of copilot that does not work for most things

Cleans up docs

Type of Change

  • Other: Deprecation

Testing

N/A

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@icecrasher321 icecrasher321 marked this pull request as ready for review May 29, 2026 21:16
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 29, 2026 9:29pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 29, 2026

PR Summary

Medium Risk
Intentional breaking change for any clients still calling Copilot MCP or /api/v1/copilot/chat; behavior is explicit 410 rather than silent failure, but integrations must migrate away.

Overview
This PR retires the external Copilot MCP server and the v1 headless copilot chat API, and removes setup docs that pointed users at those integrations.

Runtime: /api/mcp/copilot (GET/POST/DELETE) and Copilot-specific OAuth discovery paths now always return 410 Gone, with JSON-RPC-shaped errors on POST/DELETE via copilotMcpDeprecated*. The large MCP SDK implementation (auth, tools, subagents) is deleted in favor of that shared helper. POST /api/v1/copilot/chat likewise returns 410 with { success: false, error: ... } instead of running headless copilot lifecycle.

Docs: The Copilot MCP section (API keys, Cursor / Claude / VS Code config) is stripped from copilot pages in en, de, es, fr, ja, zh.

Hygiene: Vitest coverage asserts 410 behavior (including with x-api-key). check-api-validation-contracts.ts treats these routes as no-input 410 gates and drops mcp/copilot from the raw-JSON baseline.

Reviewed by Cursor Bugbot for commit 98f7278. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 29, 2026

Greptile Summary

This PR deprecates the Copilot MCP server by replacing ~900 lines of active implementation across the MCP route, OAuth discovery endpoints, and v1 headless chat API with minimal 410 Gone stubs. Docs are cleaned up across all six supported languages, and the contract-validation script is updated to exempt the now-dead routes.

  • The deprecated routes are centralised through two well-named helpers in lib/mcp/copilot-deprecated.ts, and new tests verify that every endpoint reliably returns 410 for GET, POST, and DELETE.
  • An accidental Vim swap file (packages/db/.env.swp) was included in the commit — it should be removed and *.swp added to .gitignore, as swap files can contain the full content of the file being edited (potentially including secrets from the real .env).

Confidence Score: 4/5

Safe to merge once the Vim swap file is removed — all active code paths are correctly replaced with 410 stubs and tests cover every deprecated endpoint.

The deprecation itself is clean and well-tested. The only concern is the committed packages/db/.env.swp binary file: it is a Vim swap file for the packages/db/.env file and may contain secrets if that file held real credentials at edit time. Until confirmed inert, merging it extends that content into the permanent git history.

packages/db/.env.swp — should be removed before merging; verify whether the underlying .env file contained real credentials at the time the swap file was created.

Security Review

  • Accidental swap file commit (packages/db/.env.swp): A Vim swap file for the packages/db/.env file was included in the PR. Swap files serialise the full in-memory contents of the edited file; if the .env file held real credentials (database URLs, API keys) at edit time, those secrets are now present in the git object store. The file should be removed and the git history cleaned if it contained sensitive values.

Important Files Changed

Filename Overview
packages/db/.env.swp Vim swap file for packages/db/.env accidentally committed to the repository; binary file that should not be tracked in git.
apps/sim/app/api/mcp/copilot/route.ts 740-line MCP server implementation replaced with three stub handlers (GET, POST, DELETE) that all return 410 Gone; runtime and maxDuration exports correctly removed.
apps/sim/lib/mcp/copilot-deprecated.ts New helper module with two 410 Gone response factories — a plain JSON response and a JSON-RPC-flavored one. Clean, minimal, well-commented.
apps/sim/app/api/v1/copilot/chat/route.ts 151-line headless copilot chat handler replaced with a single POST stub returning 410 with a success:false error body.
apps/sim/app/api/mcp/copilot/route.test.ts New test file with 6 test cases covering all deprecated handlers (GET, POST, DELETE, and both OAuth discovery sub-routes); good coverage of the 410 contract.
scripts/check-api-validation-contracts.ts Correctly moves the four deprecated routes from RAW_JSON_BASELINE_ROUTES to INDIRECT_ZOD_ROUTES with appropriate comments explaining the exemption.

Reviews (2): Last reviewed commit: "deprecate copilot api v1 route" | Re-trigger Greptile

Comment thread apps/sim/app/api/mcp/copilot/route.ts Outdated
Comment thread apps/sim/lib/mcp/copilot-deprecated.ts Outdated
@icecrasher321
Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321
Copy link
Copy Markdown
Collaborator Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 98f7278. Configure here.

@icecrasher321 icecrasher321 merged commit 4b0dab4 into staging May 29, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the chore/deprecate-copilot-mcp branch May 30, 2026 03:00
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.

1 participant