feat(mcp): add yt mcp allowlist to manage the serve allowlist without SQL #104
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/YT-47-mcp-allowlist-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements YT-47: a first-class
yt mcp allowlistcommand group so operators never hand-write SQL to manage theyt mcp servelogin allowlist. This is the recovery / bootstrap path when the browser admin UI at/adminis unreachable (no admin logged in yet).Design
youtrack_mcp::allowlistmodule: thin async wrappers (add/remove/list/format_timestamp) over the crate'sdblayer, each opening the pool at the given URL and delegating. yt-cli calls these and gains no sqlx dependency (tooling-gap rule).removereturns whether an entry existed, so the CLI can print a real-removal vs a no-op message.--database-url(global, works before or after the subcommand), then$YOUTRACK_MCP_DATABASE_URL, then the installer default. That default path string is now single-sourced incommands/mcp.rs::default_database_url, shared withservice install(refactoredresolve_database_urlto call it) so the two cannot drift.addis idempotent (upsert),listprints each entry with a humanYYYY-MM-DD HH:MM UTCtimestamp andadded_by(cli:<user>for CLI adds, distinct from the admin-UI login label).docker compose exec ...or point--database-urlat the volume host path).Invariant sweep (default DB path single-sourced; no sqlx in yt-cli)
mcp.rs::default_database_urlservice.rs::resolve_database_urlsuper::default_database_url(was an inline literal)mcp.rs::resolve_state_db_urlallowlistyoutrack_mcp::allowlistVerification
add_list_remove_roundtrip_on_a_temp_db(idempotent add, presence/no-op remove, empty list) andformat_timestamp_is_human_readable_utc.--database-urlboth before and after the subcommand. All correct.just pre-commitgreen (fmt, clippy-D warnings, build, 84 tests).Related
yt mcp allowlistto manage the serve allowlist without SQL