-
Notifications
You must be signed in to change notification settings - Fork 16
feat(mcp): add MCP library to globally manage MCP servers and their respective tools #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ashleymavericks
wants to merge
46
commits into
main
Choose a base branch
from
mcp-library
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+19,423
−4,710
Conversation
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
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Signed-off-by: Anurag Singh <singhanurag024@gmail.com>
Signed-off-by: Anurag Singh <singhanurag024@gmail.com>
…onality Signed-off-by: Anurag Singh <singhanurag024@gmail.com>
…orm handling Signed-off-by: Anurag Singh <singhanurag024@gmail.com>
- Introduced 'enabled' field in the MCP server tools schema to manage tool states. - Implemented toggle functionality for enabling/disabling tools via a new API endpoint. - Updated service and repository layers to handle tool state changes. - Enhanced frontend to display tool counts and allow toggling of tool states directly from the UI. Signed-off-by: Anurag Singh <singhanurag024@gmail.com>
…us display Signed-off-by: Anurag Singh <singhanurag024@gmail.com>
…UX implementation Signed-off-by: Anurag Singh <singhanurag024@gmail.com>
acdd919 to
b74de62
Compare
- bun.lock: accept both sides and regenerate - worker/tsconfig.tsbuildinfo: delete file - worker/package.json: accept both dependencies (@modelcontextprotocol/sdk from HEAD, @ai-sdk/mcp from main) - openapi.json: accept both sides (merge endpoints) Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Reset ai-agent.ts to main version (MCP Library integration to be redone via Tool Registry) - Fixed AppLayout.tsx import (Sidebar -> sidebar-state) - Fixed ConfigPanel.tsx (added useReactFlow import, removed unused Edge type) - Fixed useMcpHealthPolling.ts (exported types from store, added proper return type) - All typecheck errors resolved The MCP Library feature will be integrated following the new architecture: - MCP Library servers registered in Tool Registry during workflow execution - Agent discovers all tools via MCP Gateway (no agent-side logic needed) Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Clean design for MCP Library as a tool provider component: - Uses same 'tools' port pattern as tool-mode nodes - Agent connects to MCP Library → tools port → MCP Gateway - No agent-side changes needed - AWS services moved to library pattern Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Phase 2: Implement core.mcp.library component Component features: - Multi-select servers from MCP Library backend API - Spawns Docker containers for stdio MCP servers - Registers tools in Tool Registry for agent discovery - Uses 'tools' output port (contract: mcp.tool) compatible with AI Agent Files: - worker/src/components/core/mcp-library.ts - worker/src/components/core/mcp-library-utils.ts Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Phase 3: Frontend UI Integration Components added: - McpLibraryConfig.tsx: Multi-select server selector with health status - ParameterField.tsx: Updated to support custom editor for core.mcp.library Features: - Server selection with checkboxes - Health status indicators - Tool count display per server - Integration with existing mcpServerStore - Selection summary with total tools Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Add MCP Library component import to worker/src/components/index.ts - Fix ConfigPanel to show parameters for tool mode components - Add allowAny meta flag with reason to tools output port - Parameters now show for MCP servers and other tool mode components Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
These components are now superseded by the MCP Library component which provides a more flexible and comprehensive way to manage MCP servers. Removed files: - worker/src/components/ai/mcp-http-provider.ts - worker/src/components/ai/mcp-tool-merge.ts Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Create McpServersDisplay component in separate file for clean architecture - Show selected MCP servers in workflow node preview when using MCP Library - Compact display showing server count with preview badges - Uses MCP server store to fetch server names and health status - Only displays when servers are selected to avoid clutter Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
This reverts commit e848570. Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Add McpGroupConfig component for dynamic group server configuration - Add McpGroupServersDisplay component showing server chips in workflow nodes - Update ParameterField to use McpGroupConfig for MCP group parameters - Update WorkflowNode to display selected MCP servers as chips above separator - Update aws-mcp-group component with all 10 AWS MCP servers - Remove deprecated aws-cloudtrail-mcp and aws-cloudwatch-mcp components - Each server chip shows health status, name, and tool count Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Change output from 'endpoints' to 'tools'
- Use connectionType: { kind: 'contract', name: 'mcp.tool' }
- Return empty object (tools are registered, not returned as data)
- This allows AWS MCP Group to connect to AI agents like ai-agent and opencode
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Remove unused HelpCircle import from McpGroupConfig - Remove unused force parameter from fetchServers - Fix logoUrl null to undefined conversion in McpLibraryPage Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Group Secrets, API Keys, and MCP Library under a collapsible Settings section - Reduce sidebar navigation clutter by consolidating configuration items - Add smooth expand/collapse animation with chevron indicator - Settings items show with smaller icons when expanded Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Change display name from "MCP Library" to "MCP Servers" in Settings section - This better reflects what the page contains Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Change collapsible section name from "Settings" to "Manage" - This better reflects the action-oriented nature of the items Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Rename workflow component from "MCP Library" to "Custom MCPs" - Distinguishes from bundled MCP Group components (like AWS MCPs) - Page title remains "MCP Servers" for clarity - Update all comments and UI text accordingly Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Update component label to "Custom MCPs" - Update docs and UI descriptions - Distinguishes from bundled MCP Group components Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
a14d959 to
48fe39a
Compare
- Filter out servers with groupId set (these are from bundled groups like AWS MCPs) - Custom MCPs now only shows individual/custom MCP servers - Group servers are only accessible via their respective group components Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Remove core.mcp.server component (legacy individual MCP server component) - Custom MCPs now handles individual servers from the library - MCP Group components handle bundled server groups (AWS, etc.) - Simplifies component architecture Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Add secret picker UI for MCP server headers and args configuration
- Implement SecretResolver service for runtime secret resolution
- Add support for {{secret:SECRET_ID}} references in headers and args
- Add getResolvedConfig endpoint for worker to fetch resolved configuration
- Update worker to use resolved configs when connecting to MCP servers
- Add SecretResolver test suite with 19 passing tests
- Fix all TypeScript errors across backend, frontend, and worker
- Fix ESLint issues (escaped quotes, unused variables)
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Mock startMcpDockerServer to avoid actual Docker container spawning - Add missing createdAt/updatedAt fields to mock server objects - Save and restore original fetch to avoid interfering with other tests - Reduce test file from 592 to 187 lines while maintaining coverage All 228 tests now pass (0 failures). Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Remove IMPLEMENTATION_PLAN.md (will find better place for this) - Remove MCP_LIBRARY_DESIGN_REVIEW.md (will find better place for this) - Remove MCP_ARCHITECTURE_MERGE_PLAN.md (will find better place for this) - Remove MCP_LIBRARY_COMPONENT_DESIGN.md (will find better place for this) These files should be documented elsewhere rather than in the main repo. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Since we moved to the gateway proxy approach where all MCP servers run in Docker containers and are accessed via the MCP Gateway, we no longer need direct MCP SDK client code in the worker. Removed files: - worker/src/temporal/activities/mcp-library.activity.ts (233 lines) - worker/src/services/mcp-client.service.ts (333 lines) - worker/src/services/index.ts (2 lines) The new architecture: 1. MCP servers are configured in the backend 2. Servers run in Docker containers via stdio proxy 3. Worker component (mcp.custom) fetches enabled servers and registers tools 4. AI Agent talks to MCP Gateway, not directly to servers All 522 tests still pass. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Convert mcp-servers and mcp-groups DTOs from manual decorators to Zod schemas - Add static create() methods for database record mapping - Provide both const exports and type aliases for backward compatibility - Fix MCP Library integration tests by mocking mcp-library-utils to avoid Docker calls Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Regenerated openapi.json with updated MCP DTOs using nestjs-zod - All DTOs now properly reflected in OpenAPI specification Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Regenerate backend-client.ts from updated OpenAPI spec - Add .prettierignore and .eslintignore to exclude auto-generated files - All 522 tests passing with refactored DTOs Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
48fe39a to
be08ee1
Compare
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
This PR adds a comprehensive MCP (Model Context Protocol) Library that allows users to globally manage MCP servers and expose their tools to AI agents. The implementation includes:
Core Features
MCP Library / Custom MCPs Component
mcp.custom) that fetches enabled MCP servers from the backend and registers their tools with the Tool RegistryMCP Groups (Curated Server Collections)
Secret References
{{secret:SECRET_ID}}Tool Registry Integration
UI/UX Improvements
Navigation
Component Updates
Technical Implementation
Backend
/api/v1/mcp-servers(CRUD),/enabled(filtered list),/:id/resolve(secret resolution)SecretResolverservice for resolving{{secret:...}}referencesWorker
mcp.custom(formerlycore.mcp.library)Frontend
Breaking Changes / Refactoring
core.mcp.librarytomcp.customTesting
bun test- 228 tests pass (0 failures)bun lint- All linting checks passbun typecheck- No TypeScript errorsDocumentation
mcp.tooland credential contracts