Skip to content

Conversation

@jonathannorris
Copy link
Member

@jonathannorris jonathannorris commented Oct 1, 2025

Problem

The v2ApiClient was not using the shared axiosClient instance, causing all /v2/features API calls from the MCP server to miss the MCP identification headers (dvc-referrer and dvc-referrer-metadata).

Solution

  • Updated v2ApiClient creation in src/api/apiClient.ts to use the shared axiosClient instance with validate: 'request' option
  • This ensures all v2 API calls properly identify themselves as originating from the MCP server

@jonathannorris jonathannorris requested a review from a team as a code owner October 1, 2025 15:52
Copilot AI review requested due to automatic review settings October 1, 2025 15:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the v2ApiClient was not using the shared axios instance, causing MCP server API calls to miss required MCP identification headers.

  • Updated v2ApiClient creation to use the shared axiosClient instance with proper validation options
  • Added test coverage to verify v2ApiClient inherits MCP headers correctly

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/api/apiClient.ts Modified v2ApiClient creation to use shared axiosClient instance for MCP header inheritance
src/mcp/utils/api.test.ts Added test case to verify v2ApiClient uses shared axios instance with MCP headers
src/commands/features/snapshots/update.test.ts.snap Updated test snapshots due to JSON property ordering changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
devcycle-mcp-server e5ce2e2 Oct 01 2025, 03:54 PM

@jonathannorris jonathannorris merged commit d59d1df into main Oct 1, 2025
8 checks passed
@jonathannorris jonathannorris deleted the fix-mcp-v2-api-headers branch October 1, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants