feat: accept an optional projectKey argument on project-scoped MCP tools - #589
Merged
Merged
Conversation
jonathannorris
requested review from
kaushalkapasi
and
a balanced review from Copilot
September 24, 2026 15:38
jonathannorris
marked this pull request as ready for review
September 24, 2026 15:38
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
devcycle-mcp-server | 79d18e4 | Sep 24 2026, 03:42 PM |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Local MCP initialization still rejects missing project configuration before callers can provide the new per-call argument.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds per-call project targeting to project-scoped MCP tools, supporting stateless MCP hosts.
Changes:
- Adds optional
projectKeyschemas and precedence over session state. - Removes
projectKeybefore forwarding API payloads and queries. - Adds shared errors, documentation, and resolution tests.
| File | Description |
|---|---|
src/mcp/utils/api.ts |
Resolves project overrides and strips route-only arguments. |
src/mcp/utils/api.test.ts |
Tests project resolution and argument omission. |
src/mcp/types.ts |
Adds shared projectKey schemas to scoped tools. |
src/mcp/tools/variableTools.ts |
Supports overrides in variable tools. |
src/mcp/tools/selfTargetingTools.ts |
Supports overrides in self-targeting tools. |
src/mcp/tools/resultsTools.ts |
Supports overrides in evaluation tools. |
src/mcp/tools/projectTools.ts |
Adds override support to project retrieval. |
src/mcp/tools/localProjectTools.ts |
Documents session-scoped selection behavior. |
src/mcp/tools/featureTools.ts |
Supports overrides in feature tools. |
mcp-worker/src/projectSelectionTools.ts |
Documents stateless worker usage. |
mcp-worker/src/apiClient.ts |
Resolves worker project overrides before session state. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kaushalkapasi
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
projectKeyargument to all 18 project-scoped MCP tools, so a tool call can target a project without a priorselect_projectcall.projectKeyargument first, then the session's selected project.select_projectbehaviour is unchanged when the argument is omitted.McpAgentDurable Object state by MCP session id, so aselect_projectfrom an earlier request is not visible to the next one.