
No Crd
io.github.nogoo9由 GitHub 帳號 nogoo9 發布v0.18.0更新於 Oct 24, 2026
Dynamic pod spawner & proxy for ephemeral AI agent workspaces on Kubernetes without CRDs
概覽
一個本機 MCP 伺服器,只用 Kubernetes 核心資源建立與管理臨時 AI 代理工作區 Pod,支援範本、日誌與選用代理
- 可以做什麼
- 在叢集或單一命名空間中列出、檢視、建立、修補與刪除 Pod,讀取容器日誌與命名空間,並從設定的映像倉庫列出映像。建立、讀取、更新與刪除以 ConfigMap 儲存的可重用 Pod 範本,並依範本帶覆寫參數建立 Pod。建立、列出、升級與停止代理工作區沙箱,支援情境驗證、初始化容器、IAM 角色與停止前掛鉤。取得工作區事件,並透過實驗性反向代理將 HTTP 流量導向執行中的工作區 Pod,可選用 JWT/OIDC 驗證。提供內嵌的網頁管理介面與主題。
- 適用情境
- 適合讓助理在 Kubernetes 上為程式開發或代理任務隨需建立並清理短期沙箱環境,尤其是在無法使用或限制使用自訂資源定義的叢集。也適合希望把 Pod 範本以 ConfigMap 版本化管理並用簡單介面維護的團隊。
- 執行需求
- 以本機程序執行,npm 套件為 @nogoo9/no-crd(bunx 或 npx)或 Docker,需要 Node.js、Bun 或 Deno。需要 Kubernetes API 存取與憑證,通常透過 KUBECONFIG 檔案,並需具備 pods、pods/log、configmaps、namespaces 與 serviceaccounts 的 RBAC 權限。選用驗證設定包括 JWT_SECRET、JWT_PUBLIC_KEY、JWKS_URI、OAUTH_CLIENT_ID、OAUTH_CLIENT_SECRET 與 PROXY_SESSION_SECRET;TLS_CERT 與 TLS_KEY 可啟用 HTTPS。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 No Crd,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@nogoo9/no-crd
Agent-Driven, On-Demand Pod Orchestration in Kubernetes — Without Custom Resource Definitions.
[npm version] [npm downloads] [Documentation] [License] [Coverage Status] [OpenSSF Scorecard] [Semgrep]
[Model Context Protocol] [Built with Antigravity] [Powered by Gemini]
@nogoo9/no-crd is a lightweight, cross-runtime Model Context Protocol (MCP) server that empowers AI agents and APIs to dynamically spawn, route to, and manage ephemeral containerized sandboxes on standard Kubernetes (k8s/k3s) clusters — without requiring Custom Resource Definitions (CRDs), cluster-level operators, or elevated RBAC permissions.
It provides JupyterHub-like dynamic pod lifecycle management but is completely agnostic to actual workloads and supports multi-runtime execution under Bun, Deno, and Node.js.
📚 For detailed guides, API reference, and configuration options, visit the public Documentation Website or access the built-in documentation served directly at /docs/ (e.g. http://localhost:3000/docs/) when running the server.
🗺️ Choose Your Path
To get started with @nogoo9/no-crd, select the track that matches your goals:
- Track A: AI Agent & MCP Users $\rightarrow$ MCP Client Setup Guide
- Best for: Connecting
no-crdto Cursor, Claude Desktop, Cline, or Roo Code to let your agent manage pods.
- Best for: Connecting
- Track B: Platform & Service Deployers $\rightarrow$ SSO & Routing Deployment Guide
- Best for: Deploying a multi-tenant sandbox service in your Kubernetes cluster with Keycloak OIDC, stateless cookies, and reverse proxy routing.
- Track C: SDK & Code Contributors $\rightarrow$ SDK & Contributor Guide
- Best for: Programmatically controlling pods via the TypeScript SDK or contributing to the core runtime codebase.
🚀 Key Features
- No CRDs Required: Runs directly against core Kubernetes resources (Pods, ConfigMaps, ServiceAccounts). Highly portable, secure, and compatible with restricted/managed environments (EKS, GKE, K3s).
- Agent Sandbox Spawner: Specialized spawner tools that automate workspace provisioning with context validation, init containers, IAM roles, pre-stop hooks, and lifecycle sync.
- ConfigMap-Based Templates: Store, version, and load reusable pod templates stored as standard Kubernetes ConfigMaps.
- Local Filesystem Templates: Bake YAML/JSON pod templates into Docker images or mount them from host paths — with built-in defaults shipped in the package.
- Isomorphic Multi-Runtime SDK: Imports seamlessly as a composable programmatic SDK or MCP server running under Node.js, Bun, or Deno.
- Workspace Routing Proxy (Experimental): Built-in reverse proxy routing that dynamically pipes traffic to running container IPs with secure user token ownership verification, path-scoped session cookies (
nocr_tokenandnocr_sess), and automatic HMAC-signed session management for short-lived token resilience. - Experimental JWT Authentication: Built-in OAuth token validation engine supporting HS256, RS256, ES256, JWKS endpoints, and OAuth 2.0 Token Introspection (RFC 7662).
- Embedded Web UI App: Exposes an interactive web-based Pod Manager interface featuring a light/dark theme toggle, client-side PKCE OIDC login with proactive silent token refresh, and workspace file preview rendering (supporting HTML sandboxed iframes and custom Markdown rendering).
⚡ Quick Start
Run Standalone via NPX (No Installation)
Install Globally
Run via Docker
⚙️ Configuration & Environment Variables
The server and command-line utility are configurable using CLI options or environment variables. Below is the quick reference table of all settings:
🔌 Server Configuration
🔒 TLS Configuration
🌐 CORS Configuration
☸️ Kubernetes Configuration
🔑 Authentication Configuration
🖥️ UI & Themes Configuration
☸️ Kubernetes Setup & RBAC Permissions
For the @nogoo9/no-crd MCP server to interact with Kubernetes, it must run with appropriate RBAC permissions. Depending on your configuration, you can deploy it with Cluster-Wide (ClusterRole) access or Namespace-Scoped (Role) access.
Tool-to-Permission Mapping
Below is the mapping showing which Kubernetes API resources and verbs each MCP tool requires. The server dynamically checks these permissions at startup (via SelfSubjectAccessReview) and only registers tools that the active identity is authorized to use.
Resource: configmaps
Resource: events
Resource: namespaces
Resource: pods
Resource: pods/log
1. Cluster-Wide Mode (MODE=cluster)
Use this mode if you want the MCP server to manage sandboxes across any namespace in the cluster.
Create a ClusterRole and ClusterRoleBinding:
2. Namespace-Scoped Mode (MODE=namespaced)
Use this mode if the MCP server should be restricted to a single namespace (e.g. nogoo9). In this mode, no cluster-level or administrative permissions are needed.
Create a Role and RoleBinding in the target namespace:
(Note: In namespace-scoped mode, the list_namespaces tool will only return the target namespace, and namespace parameter inputs to all tools will default to the target namespace.)
📑 Workspace Templates & Spawner Annotations
Templates in @nogoo9/no-crd can be loaded from three sources (highest to lowest priority):
- Kubernetes ConfigMaps — labeled with
nogoo9/pod-template: "true"(original mechanism) - Custom local directory — set via
TEMPLATES_DIRenv var (YAML or JSON files) - Built-in templates — shipped with the npm package (disable with
BUILTIN_TEMPLATES=false)
See ADR-001 for format details.
1. How to Define a Template
To register a template with the spawner, create a ConfigMap meeting the following requirements:
- Discovery Label: Must be labeled with
nogoo9/pod-template: "true". - Spec Key: The
datablock must contain a key namedspecwhose value is a JSON string conforming to thePodSpecSchema(e.g.containers,volumes,restartPolicy). - Behavior Customization: Set
annotationson theConfigMapmetadata to configure advanced spawner integrations (like IAM role binding, init containers, and pre-stop lifecycle hooks).
Example Template Definition:
2. Supported Spawner Annotations
The spawner inspects ConfigMap metadata annotations (and custom inline annotations passed during spawn_workspace) to customize the workspace lifecycle:
📦 Programmatic SDK & API Proxy Services
@nogoo9/no-crd provides a complete programmatic SDK and dynamic cluster routing proxy to allow developers to build custom pod orchestrators and route workspace traffic natively.
1. Composable Programmatic SDK
You can import @nogoo9/no-crd in your Bun, Deno, or Node.js codebase to control pod sandboxes and templates programmatically, bypassing the MCP HTTP server.
2. Workspace Routing Proxy (Experimental)
[!WARNING] The workspace routing proxy and JWT authentication engine are experimental and likely to change in the next version.
The server includes a built-in reverse proxy routing service. HTTP requests targeting:
http://<mcp-server-host>/route/<workspace-id>/<subpath>
are dynamically proxied directly to the running workspace pod's IP address inside the cluster.
If AUTH_ENABLED is true:
- Token Bootstrapping & Path-Scoped Cookies: Since standard browser navigations (links, iframes) cannot transmit custom HTTP headers, the client passes the active JWT via a
?token=query parameter on initial redirect. The proxy validates it and issues a secure, path-scoped cookie (nocr_token), allowing subsequent resource requests (JS, CSS, images, WebSockets) to authenticate seamlessly without URL parameters. - Direct Access Redirect (SSO): Accessing a workspace URL directly without active credentials redirects you to the main dashboard's login screen. Once logged in, the dashboard automatically routes you back to the target workspace URL with a fresh bootstrap token.
- Resource Ownership Verification: The workspace pod's
nogoo9/user-sublabel must match the JWT's subject claim, preventing unauthorized access to other users' workspaces. - Proxy target port: Inside the workspace pod defaults to
3000or can be overridden via pod annotationnogoo9/workspace-portor theDEFAULT_WORKSPACE_PORTenvironment variable. - Multi-Port / Custom API Routing: You can expose and route additional APIs inside the pod (e.g., a web terminal or secondary service) by defining custom annotations in the template (e.g.,
nogoo9/api.terminal.port: "7681",nogoo9/api.terminal.path: "/terminal"). The proxy will dynamically handle subpath routing and method checks. - A stateless signed session cookie (
nocr_sess) is minted on first successful JWT validation, enabling workspace traffic to survive short-lived token expiry. (Available from v0.4.0) See ADR-002 and ADR-003 for design details.
For a detailed breakdown of the redirection lifecycle, Keycloak configuration, and JWT claims, see the SSO & OIDC Integration Guide.
3. OAuth Resource Discovery (RFC 9728)
Exposes the standardized metadata endpoint GET /.well-known/oauth-protected-resource returning:
- Supported authorization servers.
- Token format specifications.
- Required scopes.
This allows client interfaces (and MCP clients) to automatically discover security requirements and handle dynamic OAuth authentication flows.
4. Embedded Web UI & Dashboard Themes
When the server runs in HTTP/SSE transport mode, the visual React Pod Manager UI Dashboard is served directly at root / (e.g. http://localhost:3000/).
- Dashboard Themes: The UI includes a system/light/dark toggle and supports custom visual themes.
- Three-Source Theme Merge Engine: CSS stylesheets are dynamically scanned and merged from:
- Kubernetes ConfigMap (
THEMES_CONFIGMAPenvironment variable). - Custom Local Directory (
THEMES_DIRenvironment variable, defaults tothemes/). - Built-In Catalog (pre-baked styles: Dracula, Nord, Stripe, Slack, Vercel, Apple, Superhuman, Notion, and Antigravity).
- Kubernetes ConfigMap (
Duplicate theme IDs are resolved according to priority: ConfigMap > Local Directory > Built-In Catalog. For detailed customization guidelines and CSS templates, see the Dashboard Themes & Branding Guide.
🔌 API Reference (MCP Tools & Resources)
Pod Tools
list_pods: Retrieve a summary of pods in the namespace. Filters bylabelSelector,fieldSelector, andlimit.get_pod: Fetch full Kubernetes API JSON payload for a target pod name.create_pod: Create a custom pod with direct container/volume specifications.patch_pod: Apply a Strategic Merge Patch to modify labels, annotations, or container resource limits dynamically.delete_pod: Terminate a pod with optionalgracePeriodSeconds.get_pod_logs: Fetch logs for a container with options liketailLines,sinceSeconds,timestamps,limitBytes, andprevious.list_namespaces: List all namespaces accessible with current credentials.list_registry_images: List catalog images from the configuredREGISTRY_URL.
Pod Template Tools
Manage preconfigured pod specifications stored as standard Kubernetes ConfigMaps (labeled nogoo9/pod-template=true).
list_templates: Show available templates.get_template: Get the raw pod template spec.create_template: Store a new pod template spec.update_template: Update labels, annotations, or specs on an existing template.delete_template: Delete a template.create_pod_from_template: Spawn a pod using a template, applying container overrides (environment variables, commands, resources) and top-level overrides.
Agent Workspace (Spawner) Tools
Specially designed for AI agents to safely spawn and clean up their own workspace sandboxes.
list_workspaces: List active agent workspaces (with JWT/owner mapping support).spawn_workspace: Spawn a workspace sandbox pod. Features:- Context Validation (
nogoo9/required-context): Requires the caller to supply critical env variables (e.g. API keys) before spawning. - Init Containers (
nogoo9/init-image/nogoo9/init-command): Initialize workspace directories/files before main containers start. - Pre-Stop Hooks (
nogoo9/pre-stop-command): Run custom cleanup commands (e.g., commit/sync code to git or S3) upon termination. - IAM Role Mapping (
nogoo9/iam-role-arn): Dynamically provisions AWS EKS IAM Role service accounts.
- Context Validation (
stop_workspace: Clean up and terminate the workspace pod.
Utilities
current_namespace: Returns active namespace and access mode.
MCP Resources
pod-template://{namespace}/{name}: Exposes stored pod templates directly as read-only MCP resources.ui://nogoo9/app: Exposes the embedded React/web UI app (ifUI_ENABLED=trueand built). When the server runs in HTTP/SSE transport mode, the UI is also served directly at/or/ui(e.g.http://localhost:3000/) and automatically falls back to standard HTTP JSON-RPC calls when loaded outside a postMessage-compatible MCP host (such as in a standard browser tab or the MCP Inspector).
🏗️ Architecture
The server interacts directly with the Kubernetes API using @kubernetes/client-node. By using standard Pod and ConfigMap resources, the setup is highly scalable, requires no cluster operator installs, and easily adheres to strict enterprise namespace-level security policies.
🛠️ Development
We use Moon for toolchain management and task running, and Biome for formatting and linting.
Prerequisites
- Bun
1.3.11+ - Node.js
22.14.0+ - Moon
2.1.3+ - k3d (for local Kubernetes cluster)
Setup Environment
Running Tests
Local Cluster Testing (k3d)
Bootstrap a local k3d Kubernetes cluster complete with a local registry, built-in mock S3, and Traefik:
📄 License
This project is licensed under the Apache License 2.0. See LICENSE for details.
來源:README.md,提交 6be8cf8
工具
0版本歷史
1- v0.18.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分