feat(mcp): merge youtrack-mcp into the workspace as one yt binary (YTCLI-30) #85
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/YTCLI-30-merge-mcp-into-workspace"
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?
Summary
Merges the standalone
youtrack-mcpserver into this cargo workspace so a singleytbinary carries both the CLI and the MCP server. Implements YTCLI-30.Following the Zellij lead (
zellij webstarts a web server), the MCP is surfaced asyt mcp serve(the multi-user HTTP web service: OAuth 2.1 AS/RS, per-user/mcp) andyt mcp stdio(the single-identity transport an MCP client launches over stdin/stdout).What changed
crates/youtrack-mcp(library): the ported MCP server. Itsyoutrack-clientgit-tag pin becomes a local path dependency, so the MCP reuses the exact REST code path as the CLI.src/lib.rsexposesserve_stdio(Config)/serve_http(HttpOverrides); the argv-based transport selector and the tokiomainare removed.yt-cli: newmcpsubcommand group (crates/yt-cli/src/commands/mcp.rs) behind a default-onmcpcargo feature.cargo build --no-default-featuresyields a slim CLI without the rmcp / axum / sqlx / oauth2 stack and without the subcommand.yt mcp stdioresolves base URL + token from the activeytinstance, withYOUTRACK_BASE_URL/YOUTRACK_TOKEN/--base-urloverriding (env-only usage needs no configured instance).yt mcp servestays env /.envdriven with--bind-addr/--public-base-url/--database-urloverrides.main.rs) soyt mcp stdiokeeps stdout a clean JSON-RPC stream; the default filter covers both theytandyoutrack_mcptargets.oci-build/Dockerfileandoci-build/Dockerfile.windowscopy the fourth member's manifest, priming stub, source, andaskama.tomlso the workspace loads and builds in CI. The alpine runtime stage owns/datasoyt mcp serve's SQLite volume is writable.compose.mcp.yml,.env.example,docs/deployment.md. CLAUDE.md and README updated (repo layout, command surface, the stale "MCP out of scope" note removed).Decisions
The user was away when the spec decisions were asked, so the recommended options were taken:
yt mcp stdiosibling subcommand; default-onmcpfeature; reuse the instance store with env override; fresh squashed port. Any of these can be revised.Verification
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo build,cargo test --workspace: all green (the MCP crate's 217 tests included).cargo build -p youtrack-cli --no-default-features: compiles,mcpsubcommand absent, MCP dep stack excluded.just check-docker) andjust pre-commit: both pass, so the updated Dockerfiles load the four-member workspace.Follow-ups (tracked, linked)
compose.mcp.ymlbuilds it locally from source).youtrack-mcprepo and redirect deployments / client registrations.