Repository navigation
Add a kizen mcp-servers command group - #100
Merged
2 commits merged intoOct 27, 2026
Merged
2 commits merged into
2 commits merged into
Conversation
An MCP server is the set of Kizen tools a Call LLM step or an outside MCP client can call, and builds had no way to make or change one from the CLI. The new group lists, creates, updates and deletes servers from a spec, and shows a server's tools and change history. Tool names are checked against the live catalogue, because Kizen rejects the whole request for one unknown tool. Tools compare as a set and sharing compares after normalising both sides, so get --raw output sent back unchanged plans a skip. Kizen-managed servers are refused, except for setting one back as the business default. Kizen keeps one default per business, so the preview names the server that loses it and how to restore it.
This was referenced Oct 27, 2026
Merged
Contributor
Author
|
Included in the 0.4.0 release PR #102; merge that instead. |
sangyeT
approved these changes
Oct 27, 2026
sangyeT
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the api module, MCPServerDef/sharing models, the read tools and the planner (tool names checked against the live catalogue before any request, system-managed servers refused except the default-flag takeover, get --raw accepted as a spec with read-only keys dropped and listed, set-wise compare so a re-sent raw plans a skip). Dispatch in plans.py and the drift contracts are updated. Approving.
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.
Problem
An MCP server is the set of Kizen tools a Call LLM step or an outside MCP client can call. Builds had no way to make or change one from the CLI, so wiring tools into an automation meant clicking through Settings.
Solution
A new
kizen mcp-serversgroup:list,get <server>,tools(the catalogue),history <server>, and spec-drivencreate,update <server>anddelete <server>, with--dry-run, saved plans andkizen apply. A spec setsname,api_name,description,tool_names,is_enabled,is_default_for_businessandsharing_settings. It follows the dashboards surface, one op per server.Tool names are checked against the live catalogue at plan time, because Kizen rejects the whole request for one unknown tool. Tools compare as a set and sharing compares after normalising both sides, so
get --rawoutput sent back unchanged plans a skip. The plan refuses what Kizen would accept and then drop or ignore silently: anapi_namechange (a 400) and aservice_accountssharing bucket (a 200, then dropped). Kizen-managed servers are refused, except for setting one back as the business default. Kizen keeps one default per business, so the preview names the server that loses it and how to restore it.kizen docs show mcp-serverdocuments the spec.Testing
Local checks after merging main: lint, format, typecheck, pytest (
2881 passed, 4 skipped, 1 xfailed) and the CLI-tree diff,passed: lint format typecheck test extra_checks.Live on a test tenant, on two scratch servers: create;
get --raw→update(skip); reordered tools (skip); tools, disable and sharing changes applied and read back; the refusals for an unknown tool (no POST), anapi_namechange, a managed-server update and delete, and aservice_accountsbucket; history; delete through a saved plan andkizen apply. Server count and the business default were the same before and after. The MCP drift contracts pass; the drift schema test still fails, but only on diffs from the 2026-10-26 release that also fail on main. The round-trip drift tier wasn't run.Design notes / tradeoffs
Rejected: wrapping
POST /api/mcp/{config_slug}, the JSON-RPC endpoint. That's what MCP clients call at run time, not configuration;getprints the server'sendpoint_urlfor wiring one up.Overlaps: #101 (the
service-accountscommand group) adds a second command group and touches the same shared files: the CLI command registry (cli/__init__.py), the docs lists (commands.md,reference.md,specs/README.md),scripts/cli-tree-baseline.txt,tests/drift/contracts.py,tests/drift/schema_snapshot.json,tools/plans.py,CONTRIBUTING.mdandCHANGELOG.md. Whichever merges second should need a small conflict fix. #96 (the loops fix) also changes the CLI-tree baseline. The merge from main also refreshes that baseline for #92's newkizen upgrade --checkhelp text, which main's baseline lacks; every PR in this set carries that same line.