Skip to content

Conversation

@jonathannorris
Copy link
Member

Add MCP Server for AI Coding Assistant Integration

This PR adds Model Context Protocol (MCP) server functionality to enable AI coding assistants like Cursor and Claude to interact directly with DevCycle's feature flag management system.

What's Added

  • Local MCP Server (dvc-mcp): Runs locally using CLI authentication or API keys
  • Remote MCP Server: Hosted Cloudflare Worker with OAuth authentication (https://mcp.devcycle.com)
  • DevCycle API Tools: Complete toolset for managing projects, features, variables, environments, and targeting
  • Updated CLI Commands: Enhanced project commands with MCP integration
  • Documentation: Comprehensive setup and usage guide (docs/mcp.md)

Key Features

  • Seamless feature flag management from coding environment
  • Shared schemas and utilities between local and remote implementations
  • OAuth and API key authentication support
  • Type-safe API interactions with Zod schemas

Technical Notes

This is a clean recreation of the original feat-mcp-server branch (#467).

Dependencies

  • New MCP-related packages
  • Cloudflare Worker dependencies
  • Updated Yarn to v4.9.2
  • Node.js version flexibility (22.*)

@jonathannorris jonathannorris requested a review from a team as a code owner August 12, 2025 01:13
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 12, 2025

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 successful!
View logs
devcycle-mcp-server 40f415d Aug 12 2025, 09:02 PM

@jonathannorris jonathannorris requested a review from Copilot August 12, 2025 01:25
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 adds Model Context Protocol (MCP) server functionality to enable AI coding assistants like Cursor and Claude to interact directly with DevCycle's feature flag management system.

Key changes include:

  • Local MCP Server implementation (dvc-mcp) using CLI authentication
  • Remote MCP Server via Cloudflare Worker with OAuth authentication
  • Comprehensive DevCycle API Tools for managing projects, features, variables, environments, and targeting
  • Enhanced CLI Commands with MCP integration support
  • Complete documentation and setup guides

Reviewed Changes

Copilot reviewed 48 out of 55 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/mcp/utils/headers.ts MCP-specific header management for API request tracking
src/mcp/utils/errorHandling.ts Comprehensive error categorization and user-friendly suggestions
src/mcp/utils/auth.ts Authentication abstraction supporting CLI tokens and environment variables
src/mcp/utils/api.ts API client utilities with Zodios validation error handling
src/mcp/types.ts Zod schemas for all MCP tool arguments and validation
src/mcp/tools/*.ts Tool implementations for features, variables, environments, etc.
src/mcp/server.ts Core MCP server implementation with tool registration
src/mcp/index.ts Local MCP server entry point with CLI integration
mcp-worker/* Cloudflare Worker implementation for remote MCP server
package.json Updated dependencies and new dvc-mcp binary

@jonathannorris jonathannorris merged commit 2830f1c into main Aug 13, 2025
8 checks passed
@jonathannorris jonathannorris deleted the feat-mcp branch August 13, 2025 00:41
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.

2 participants