Skip to content

Conversation

@jonathannorris
Copy link
Member

@jonathannorris jonathannorris commented Jul 25, 2025

Add implementation plan for Cloudflare Worker to handle MCP SSE protocol.

@jonathannorris jonathannorris force-pushed the feat-mcp-sse-worker branch 2 times, most recently from 4236780 to 8bbef6c Compare July 28, 2025 15:09
- Create MCPToolRegistry interface and class for tool management
- Add IDevCycleApiClient interface for API abstraction
- Refactor project tools to use registry pattern
- Add central tool registration coordination
- Maintain backward compatibility with legacy exports
- Add comprehensive registry tests (7 test cases)

This enables sharing tool implementations between local and remote MCP servers
while preserving existing functionality. Phase 1.1 of Cloudflare Worker plan.
- Add dedicated API interface module (src/mcp/api/interface.ts)
- Create IDevCycleApiClient, IAuthContext, and factory interfaces
- Implement LocalDevCycleApiClient wrapping existing DevCycleApiClient
- Add WorkerDevCycleApiClient skeleton for Cloudflare Worker support
- Move interface from registry to dedicated API module
- Add comprehensive interface tests (8 test cases)
- Create API abstraction documentation

This enables same tool implementations to work with different auth strategies:
- Local: file system, environment variables, SSO tokens
- Worker: OAuth JWT tokens from Cloudflare Worker context

Phase 1.2 of Cloudflare Worker plan.
@jonathannorris jonathannorris marked this pull request as ready for review July 31, 2025 20:14
@jonathannorris jonathannorris requested a review from a team as a code owner July 31, 2025 20:14
@jonathannorris jonathannorris merged commit 205d173 into feat-mcp-server Jul 31, 2025
6 of 7 checks passed
@jonathannorris jonathannorris deleted the feat-mcp-sse-worker branch July 31, 2025 20:15
jonathannorris added a commit that referenced this pull request Aug 11, 2025
* docs: add cloudflare worker implementation plan for mcp sse

* feat: extract core tool logic into registry pattern

- Create MCPToolRegistry interface and class for tool management
- Add IDevCycleApiClient interface for API abstraction
- Refactor project tools to use registry pattern
- Add central tool registration coordination
- Maintain backward compatibility with legacy exports
- Add comprehensive registry tests (7 test cases)

This enables sharing tool implementations between local and remote MCP servers
while preserving existing functionality. Phase 1.1 of Cloudflare Worker plan.

* feat: create abstracted API client interface for dual-mode operation

- Add dedicated API interface module (src/mcp/api/interface.ts)
- Create IDevCycleApiClient, IAuthContext, and factory interfaces
- Implement LocalDevCycleApiClient wrapping existing DevCycleApiClient
- Add WorkerDevCycleApiClient skeleton for Cloudflare Worker support
- Move interface from registry to dedicated API module
- Add comprehensive interface tests (8 test cases)
- Create API abstraction documentation

This enables same tool implementations to work with different auth strategies:
- Local: file system, environment variables, SSO tokens
- Worker: OAuth JWT tokens from Cloudflare Worker context

Phase 1.2 of Cloudflare Worker plan.

* refactor(mcp): eliminate duplication in tool definitions and make legacy exports single source of truth

* refactor: consolidate tool registration into centralized registry pattern

* feat: starting CF Worker MCP setup

* feat: move MCP Worker logic to /mcp-worker

* feat: MCP Worker auth mostly working

* feat: calling MCP tools working now

* feat: fix tests, add project selection tool

* feat: add projectSelectionTools.ts

* feat: new mcp tool format working with zod schemas

* chore: fix missing file

* feat: new format of tool calls working in worker + CLI

* feat: cleanup no project error messages

* feat: update worker to support HTTP and SSE

* feat: re-use error handling

* feat: add errorHandling.ts

* docs: update mcp-worker README

* docs: update mcp.md

* feat: fix audit log query params and results

* feat: update audit log types

* feat: remove un-used registry, disable project/env create/update tools, disable custom props tools

* feat: rename tool to: select_project

* feat: combine enableTargeting/disableTargeting to set_feature_targeting tool

* docs: update readmes

* docs: update worker docs link

* feat: setup yarn workspace for mcp-worker

* fix: tests / linting

* revert: restore README.md table of contents and formatting

* chore: cleanup
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