feat: Add MCP Server Catalog with Per-Tool Agent Grants#3
Draft
bornakapusta wants to merge 8 commits intomainfrom
Draft
feat: Add MCP Server Catalog with Per-Tool Agent Grants#3bornakapusta wants to merge 8 commits intomainfrom
bornakapusta wants to merge 8 commits intomainfrom
Conversation
…ore library Add mcpServers DB table with encrypted env vars, extend audit trail with mcp_server resource, and create lib/mcp-servers.ts with CRUD operations, tool discovery via mcporter, slug generation, and mcporter config building.
CRUD routes (GET/POST/PATCH/DELETE), test connection, discover tools, and flat tool list endpoints. All admin-only with audit logging. Extend tool registry with "mcp" category and async getAllToolDefinitions().
…er.json Generate mcporter.json with decrypted env vars (0o600 permissions) and pinchy-mcp plugin config with per-agent tool grants when agents have MCP tools assigned.
Plugin uses mcporter to bridge MCP server tools into OpenClaw agents. Factory-based per-agent scoping, lazy runtime init, error returns (never throws). Docker updates: copy plugin to extensions, install mcporter in OpenClaw container.
Settings page gets new admin-only MCP Servers tab with CRUD table, add/edit dialogs, status badges, test connection and refresh tools buttons. Agent permissions page gets MCP Tools section with tools grouped by server name.
mcporter requires Node.js built-ins (child_process, fs) that can't be bundled for the browser. The dynamic import chain through tool-registry pulled mcporter into client bundles. Remove server-only function since the permissions UI fetches MCP tools via the HTTP API instead.
…p next to 16.1.7 - serverExternalPackages: ["mcporter"] prevents Turbopack from trying to resolve Node.js built-ins (child_process, fs) in mcporter at compile time - Exclude .next/ from vitest to prevent running mcporter's bundled tests - Bump next 16.1.6 → 16.1.7 to fix 5 security vulnerabilities (CSRF, request smuggling, image cache DoS, postponed buffering DoS, HMR CSRF)
|
@bornakapusta this feels like something @clemenshelm might want directly on the upstream. Perhaps you should open the MR against heypinchy/pinchy main instead of our main? |
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
mcpServersDB table with AES-256-GCM encrypted env vars, audit trail integration, and full CRUD APIpinchy-mcpOpenClaw plugin bridges MCP tools into agents via mcporter runtime with per-agent scopingArchitecture
Changes
mcp_serverstable + migrationmcp_serverresource with created/updated/deleted eventslib/mcp-servers.ts— CRUD, discovery, slug gen, config building/api/mcp-servers/regenerateOpenClawConfig()with mcporter.json + pinchy-mcppackages/plugins/pinchy-mcp/— mcporter bridge with factory scopingSettingsMcpServerscomponent + MCP tools in agent permissionsTesting
Post-Deploy Monitoring & Validation
[pinchy-mcp]log entries in OpenClaw container