mcp: workspace federation of MCP servers into the session
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- api, backend-api-design, security
Hướng nghiên cứu
Start by reviewing the existing per-session workspace access checks and the current toolset registration model described in the proposal. Define the Phase 1 API around listing bound-server tools and proxying calls, then verify that access scoping, token forwarding, egress controls, timeouts, response limits, and failure degradation are covered; the open questions need resolution before implementation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Motivation
The MCP virtual workspace gives every declarative API in a workspace an MCP surface automatically. But not every capability a provider ships is a declarative API. Providers increasingly ship their own MCP servers (search, assistants, domain tools), and platforms building on kcp want those to appear in the same MCP session as the workspace resources.
Today, the only way to combine several MCP servers is aggregation in a gateway in front (for example, the Agent Router, merges MCPRoute backendRefs under per-backend tool prefixes).
That works, but it is operator-owned and static: a workspace owner cannot bring an MCP server without a cluster operator editing gateway config, and every user of the route sees every backend regardless of workspace access.
This server already knows, per session, exactly which workspaces the caller can access (via SelfClusterAccessReview against the access VW). That makes it the natural place for permission-scoped federation.
Proposal
Add a small API, exported like any other kcp API and bound via APIBinding:
apiVersion: mcp.contrib.kcp.io/v1alpha1
kind: MCPServerBinding
metadata:
name: database-mcp
spec:
url: https://database-mcp.example.svc:8443/mcp
caBundle: <base64 PEM> # optional
auth: ForwardToken # ForwardToken | None
timeoutSeconds: 30 # optional
On session start, the server lists MCPServerBindings in each workspace the caller can access. With auth: ForwardToken it forwards the caller's bearer token downstream, so the downstream server authorizes the real user. The federating server never mints credentials and never widens access.
Phasing
Phase 1, no change to the static toolset model:
list_workspace_mcp_tools(workspace)lists a bound server's toolscall_workspace_tool(workspace, server, tool, arguments)proxies one call
Phase 2, first-class mounting:
- federated tools appear in
tools/listunder a<workspace>.<server>__prefix (fits the MCP tool name charset) listChangednotifications when bindings change mid-session- requires per-session tool registries (today toolsets register once at startup), which is the substantial part
Guardrails
Tenants supply URLs, so the deployment needs an operator-controlled egress allowlist with deny by default, per-call timeouts and response size caps, no redirect following, and HTTPS required unless explicitly allowed. Federated failures degrade to missing tools, never to session errors.
Relation to gateway aggregation
Gateway aggregation and workspace federation compose. Platform-wide backends every user should see stay in the gateway. Tenant and provider extensions live in workspaces and are only visible to users with access there. This proposal also works with no gateway at all, directly behind the front-proxy.
Open questions
- tools only, or also federate MCP resources and prompts?
- cache and refresh strategy for downstream tool lists (per session, TTL)?
- is phase 1 passthrough good enough for agent UX, or is phase 2 needed for adoption?
- allowlist granularity: per deployment, per binding approval (status set by an operator)?
- Ngôn ngữ chính
- Go
- Star
- 1
- Fork
- 2
- Merge trung bình
- 8 giờ 16 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của kcp-dev/contrib-virtual-workspaces
-
Add UIĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Add producer/marketplace VWĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của kcp-dev/contrib-virtual-workspaces
Issue tương tự
-
Project submission: SpecWithCodeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#1137 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make the HTTP server's keep-alive and headers timeouts configurableCó thể đã có người làm @mattgodbolt đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
compiler-explorer/compiler-explorer#9902 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
jordansmall/spindrift#7895 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày