Skip to content

Add CLI MCP server - #268

Open
yakky wants to merge 6 commits into
masterfrom
feature/issue-267-add-mcp
Open

Add CLI MCP server#268
yakky wants to merge 6 commits into
masterfrom
feature/issue-267-add-mcp

Conversation

@yakky

@yakky yakky commented Aug 23, 2026

Copy link
Copy Markdown
Member

Adds an MCP (Model Context Protocol) server to python-taiga, exposing Taiga entities as tools that AI agents (e.g. Claude Code) can call directly.

  • New taiga.mcp_server package built on fastmcp:
    • server.py — tools covering projects, user stories, tasks, issues, epics, milestones and wiki pages (list/get/create/update/delete as applicable), plus whoami and get_history (reads the full comment/change history of a user story, task, issue, epic or wiki page).
    • auth.py — client construction from TAIGA_HOST + TAIGA_TOKEN, or TAIGA_HOST + TAIGA_USERNAME/TAIGA_PASSWORD, with TAIGA_TLS_VERIFY support.
    • cli.py — standalone entry point with equivalent CLI flags for running the server directly.
    • serialize.py — helper to make Taiga model objects JSON-serializable for tool responses.
  • AGENTS.md — instructions for registering the Taiga MCP server with an agent, clarifying token vs. password auth.
  • docs/mcp.rst — new Sphinx page documenting installation (the mcp extra), configuration, running standalone, registering with an MCP client, the full tool list, and a security note on the blast radius of write tools. Wired into docs/index.rst.
  • tests/test_mcp_server.py — coverage for the new server.
  • Packaging: setup.cfg gains an mcp extra (fastmcp dependency); MANIFEST.in fixed to include AGENTS.md and correct a requirements-tests.txt → requirements-test.txt typo (was failing check-manifest in the pypi-description tox env).
  • tox.ini: restored the testenv:docs section (previously dropped while docs stayed in envlist) so all tox environments run cleanly.
  • changes/267.feature towncrier fragment added.

References

Fix #267

Checklist

  • I have read the contribution guide
  • Code lint checked via inv lint
  • changes file included
  • Usage documentation added (docs/mcp.rst, AGENTS.md)
  • Tests added

yakky and others added 5 commits August 23, 2026 19:10
…erver

Gives coding agents a step-by-step procedure for adding taiga-mcp-server
to a user's global (--scope user) Claude Code config: resolving a stable
install (pip install --user by default, pipx/uvx as alternatives),
collecting credentials safely, the exact claude mcp add invocations, and
verification steps.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Stock Taiga has no self-service personal access token feature. The only
tokens available are short-lived auth JWTs (24h/8-day on the instance
checked) and admin-gated OAuth Application tokens, and this server's CLI
has no refresh-token support. Default agent guidance to username/password
and only suggest TAIGA_TOKEN when the target instance is verified to
offer a durable personal token.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds docs/mcp.rst covering what the MCP server is, installing the mcp
extra (pip install --user / pipx / uvx), the TAIGA_HOST/TAIGA_TOKEN/
TAIGA_USERNAME/TAIGA_PASSWORD/TAIGA_TLS_VERIFY configuration (env vars
and equivalent CLI flags), running it standalone, registering it with an
MCP client such as Claude Code, the full tool list grouped by entity,
and a security note on write-tool blast radius. Wired into the toctree
in docs/index.rst. Verified with a clean -W sphinx-build.

Also picks up an unrelated AGENTS.md edit (anonymizing the example
Taiga host) that was already pending in the working tree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Restore the testenv:docs section (dropped from tox.ini in 923cabc
  while "docs" stayed in envlist), and add setuptools to its deps
  so invoke's clean pre-task (python setup.py clean --all) works.
- Fix MANIFEST.in: include AGENTS.md and correct the
  requirements-tests.txt typo to requirements-test.txt, fixing
  check-manifest failures in the pypi-description env.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yakky yakky self-assigned this Aug 23, 2026
@yakky
yakky force-pushed the feature/issue-267-add-mcp branch from 3d50687 to 582c540 Compare August 23, 2026 17:29
@yakky
yakky marked this pull request as ready for review August 23, 2026 17:30
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.51037% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.68%. Comparing base (791b857) to head (c314fee).

Files with missing lines Patch % Lines
taiga/mcp_server/serialize.py 64.70% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #268      +/-   ##
==========================================
+ Coverage   96.47%   96.68%   +0.21%     
==========================================
  Files           8       12       +4     
  Lines         936     1177     +241     
  Branches       67       85      +18     
==========================================
+ Hits          903     1138     +235     
- Misses         19       22       +3     
- Partials       14       17       +3     
Flag Coverage Δ
unittests 96.68% <97.51%> (+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.

@coveralls

coveralls commented Aug 23, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 98.131% (+0.2%) from 97.97% — feature/issue-267-add-mcp into master

Install the mcp extra in requirements.txt so fastmcp is available
wherever the test suite runs (tox py311-py314 were failing to collect
tests/test_mcp_server.py with ModuleNotFoundError: No module named
'fastmcp').

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yakky
yakky force-pushed the feature/issue-267-add-mcp branch from 582c540 to c314fee Compare August 23, 2026 17:44
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.

Add MCP to allow agents interact with taiga API

2 participants