Skip to content

feat(mcp)!: add serve/list-tools/call subcommands to taiga-mcp-server - #272

Open
yakky wants to merge 10 commits into
feature/issue-267-add-mcpfrom
feature/issue-14039-taiga-mcp-cli-parity
Open

feat(mcp)!: add serve/list-tools/call subcommands to taiga-mcp-server#272
yakky wants to merge 10 commits into
feature/issue-267-add-mcpfrom
feature/issue-14039-taiga-mcp-cli-parity

Conversation

@yakky

@yakky yakky commented Aug 31, 2026

Copy link
Copy Markdown
Member

Description

Gives taiga-mcp-server the same CLI verb shape and invocation method as the
sibling ring-mcp-server project, without changing this repo's architecture:
every Taiga operation stays a hand-implemented @mcp.tool() function in
taiga/mcp_server/server.py — nothing there was touched.

taiga/mcp_server/cli.py is rewritten from argparse to typer, adding:

  • taiga-mcp-server serve — the existing behavior, now behind an explicit
    subcommand instead of the bare invocation.
  • taiga-mcp-server list-tools [--verbose/-v] — lists all tools directly
    from a shell, without an MCP client.
  • taiga-mcp-server call <tool_name> --json/-j '<json>' — calls a single
    tool directly, with full error handling (unknown tool, invalid JSON,
    argument validation failure, tool-internal exceptions).

Breaking change: bare taiga-mcp-server (no subcommand) no longer
starts the server — it now requires the explicit serve subcommand. Any
existing MCP client config invoking the binary with no arguments needs
serve appended. See changes/14039.removal for the full changelog entry.

Full design rationale and the step-by-step implementation plan are included
in this PR under artifacts/specs/2026-08-31-mcp-cli-parity-design.md and
artifacts/plans/2026-08-31-mcp-cli-parity.md.

This PR is based on feature/issue-267-add-mcp (rather than master)
since taiga/mcp_server/ doesn't exist on master yet — it should be
rebased onto master once that branch merges, before this one does.

AI assistance disclosure: implemented via Claude Code using a
subagent-driven-development workflow (fresh implementer + reviewer per
task, TDD, a final whole-branch review, one fix round). All commits,
test runs, and lint checks are real and independently reviewed; nothing
here is unverified.

References

No corresponding GitHub issue exists in this repository. This work
originates from Nephila Taiga ticket us-14039 (tracked on the
ring-mcp-server side, where the comparative design analysis began).

Checklist

  • I have read the contribution guide
  • Code lint checked via inv lint (verified via tox -e ruff,black,isort, clean)
  • changes file included (changes/14039.feature, changes/14039.removal)
  • Usage documentation added in case of new features (docs/mcp.rst, AGENTS.md)
  • Tests added (18 new/rewritten tests, full suite 322/322 passing)

yakky and others added 9 commits August 31, 2026 13:25
Analysis comparing this repo's hand-implemented, SDK-driven MCP tool
set against ring-mcp-server's dynamic OpenAPI-generated one, and an
approved design closing the CLI/invocation-method gap: add serve,
list-tools, and call <tool> --json subcommands to taiga-mcp-server via
a Typer rewrite of cli.py, without touching tool architecture.

Breaking change flagged: bare 'taiga-mcp-server' will require an
explicit 'serve' subcommand going forward.

GitHub issue: 14039
Step-by-step TDD plan executing the approved design: Typer rewrite of
cli.py adding serve/list-tools/call subcommands, docs updates, and
towncrier changelog fragments.

GitHub issue: 14039
BREAKING CHANGE: bare 'taiga-mcp-server' with no subcommand no longer
starts the MCP server. Existing MCP client configs invoking the binary
with no arguments must add ' serve'.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.44262% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.73%. Comparing base (482fadf) to head (468615c).

Files with missing lines Patch % Lines
taiga/mcp_server/cli.py 93.44% 4 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           feature/issue-267-add-mcp     #272      +/-   ##
=============================================================
- Coverage                      96.93%   96.73%   -0.21%     
=============================================================
  Files                             12       12              
  Lines                           1271     1315      +44     
  Branches                          90       95       +5     
=============================================================
+ Hits                            1232     1272      +40     
- Misses                            22       26       +4     
  Partials                          17       17              
Flag Coverage Δ
unittests 96.73% <93.44%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Correct spec/plan wording: bare taiga-mcp-server invocation exits 2
  (Click's usage-error path for Typer's no_args_is_help), not 0 as
  previously (incorrectly) documented; verified against the installed
  click/typer in .tox/py313.
- Pin the bare-invocation exit code in
  test_bare_invocation_no_longer_serves (exit_code != 0).
- Fix docs/mcp.rst uvx install example so it no longer implies running
  the bare (now-erroring) command; use --help instead.
- Import ValidationError from the public pydantic package instead of
  the internal pydantic_core (same class, stable import path).
- Surface the --token/--password process-list warning on the root
  --help and call --help, not just serve --help.
- Document the taiga.mcp_server.cli.main() signature change
  (argv: list[str] | None = None) -> int to () -> None in the
  14039.removal changelog fragment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdNTA2ZXdKMYs1MBCF4uB4
@yakky
yakky force-pushed the feature/issue-14039-taiga-mcp-cli-parity branch from e45e411 to 468615c Compare August 31, 2026 12:29
@coveralls

coveralls commented Aug 31, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 98.023% (-0.2%) from 98.269% — feature/issue-14039-taiga-mcp-cli-parity into feature/issue-267-add-mcp

@yakky
yakky requested review from protoroto and a balanced review from Copilot August 31, 2026 12:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds explicit MCP CLI subcommands while retaining existing server tools.

Changes:

  • Adds serve, list-tools, call, and --version.
  • Adds Typer, tests, documentation, and changelog entries.
  • Updates MCP registration examples and artifact handling.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
taiga/mcp_server/cli.py Implements the Typer CLI.
tests/test_mcp_server_cli.py Tests commands and errors.
setup.cfg Adds Typer dependency.
docs/mcp.rst Documents CLI usage.
AGENTS.md Updates registration commands.
changes/14039.feature Records new commands.
changes/14039.removal Records breaking invocation change.
.gitignore Ignores artifacts.
artifacts/activity-log.md Removes prior activity log.
artifacts/evaluations/2026-08-24-mcp-sdk-rewrite.md Removes prior evaluation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread taiga/mcp_server/cli.py
Comment on lines +141 to +145
try:
parsed_arguments = json.loads(arguments)
except json.JSONDecodeError as exc:
typer.echo(f"Invalid JSON in --json: {exc}", err=True)
raise typer.Exit(1) from exc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants