Skip to content

v0.6.1 - MCP improvements

Choose a tag to compare

@Tuulikk Tuulikk released this 07 Jan 20:30
· 564 commits to master since this release

GnawTreeWriter — Release Notes (v0.6.1)

Date: 2026-01-07
Type: Patch Release


Overview

v0.6.1 is a patch release focused on improving the MCP (Model Context Protocol) experience: better documentation, reproducible example clients, broader integration tests, and CI coverage that exercises the examples. It also includes a set of small cleanups and lint/test fixes to make the mcp feature robust for both local development and CI.


Added

  • docs/MCP.md — detailed MCP server documentation
    • Protocol description, supported methods, authentication, examples and extension guide (how to add tools).
  • Example clients
    • examples/python_mcp_client.py — simple, opinionated Python CLI demonstrating initialize, tools/list, tools/call (analyze).
    • examples/README.md — how to run the examples and quick usage tips.
  • Integration tests:
    • Added tests for tools/list, tools/call (analyze success), tools/call (missing args), tools/call (batch), tools/call (undo), and a concurrency test.
    • These are under tests/mcp_integration.rs and are executed when the mcp feature is enabled.
  • CI workflow:
    • .github/workflows/mcp-examples.yml — new GitHub Actions job that builds with the mcp feature, starts a temporary local MCP server, and runs the Python example (smoke tests) — ensures examples remain functional.

Fixed

  • Clippy & build issues for the mcp feature:
    • Corrected imports and brought tower into dev-dependencies for tests (so ServiceExt::oneshot works in test scope).
    • Resolved clippy warnings by reworking helper functions and usages (find_symbols_in_tree, find_symbols_in_directory, and related changes).
    • Fixed argument parsing and format string issues in example client code.
  • Cleanups:
    • Removed accidental or temporary files from repository and stopped tracking session-specific files (added .gnawtreewriter_session.json to .gitignore).
    • Minor test fixes and improved stability for ephemeral server tests.

Changed

  • README.md:
    • Added a short MCP Server section and a link to the new docs/MCP.md.
  • CLI help:
    • Improved clap doc comments for the mcp subcommands so gnawtreewriter --help and gnawtreewriter mcp serve --help are more informative.
  • CHANGELOG.md:
    • Updated: added a summary of the MCP improvements and example/CI additions.

Testing & Verification

  • Local verification:
    • cargo test --features mcp → all unit & integration tests passed.
    • cargo clippy --features mcp --all-targets -- -D warnings → no warnings.
  • CI:
    • New mcp-examples workflow starts the server in a temporary environment and runs minimal smoke tests to ensure examples are working across pushes and PRs.

Release & Tags

  • Tag: v0.6.1 (created and pushed)
  • Release notes are available in this file and the GitHub release for v0.6.1.

How to try the MCP examples locally

  1. Build & run MCP server (local test):

    • cargo build --features mcp --release
    • ./target/release/gnawtreewriter mcp serve --addr 127.0.0.1:8080 --token secret
  2. Python example:

    • pip install requests
    • python examples/python_mcp_client.py --url http://127.0.0.1:8080/ --token secret list
    • python examples/python_mcp_client.py --url http://127.0.0.1:8080/ --token secret analyze examples/foo.py
  3. Integration tests (run locally):

    • cargo test --features mcp

Notes & Next Steps

  • Suggested follow-ups (can do in subsequent patch or minor releases):
    • Add a small smoke-test CI job that executes both Python and Rust examples (Rust example is optionally available; current smoke test focuses on Python stability).
    • Consider converting tool-level errors to structured JSON-RPC error objects for some classes of errors (while keeping the UX-friendly result.content for agent readouts).
    • Add a small example in Node.js (JS) to broaden language coverage.
    • Extend integration tests with a batch end-to-end test that verifies rollback semantics in failure scenarios.

Thank you to everyone who contributed to getting this shipped — documentation, tests, examples and CI together make the MCP feature more reliable and easier to adopt.