Skip to content

Add MCP server support via FastMCP and related documentation/tests#10

Open
juno-rmks wants to merge 2 commits intomainfrom
work/2.2.0
Open

Add MCP server support via FastMCP and related documentation/tests#10
juno-rmks wants to merge 2 commits intomainfrom
work/2.2.0

Conversation

@juno-rmks
Copy link
Owner

Summary

This PR introduces Model Context Protocol (MCP) support to Utsuho, enabling its text conversion utilities to be used as MCP tools.

The MCP server is implemented using FastMCP and provides four tools corresponding to Utsuho's core converters. Documentation and tests have been added to support this new functionality.

Changes

Added

  • MCP (Model Context Protocol) server support powered by FastMCP.
  • Optional mcp dependency group.
  • utsuho-mcp console script for running the MCP server.
  • MCP documentation in the README and Sphinx documentation.
  • MCP client-based unit tests for tool invocation and discovery.

Changed

  • Updated the documentation index to include the MCP guide.
  • Refined README and documentation wording for CLI, MCP, and conversion-rule guides.
  • Added pytest-asyncio to test dependencies for async MCP tests.
  • Improved NumPy-style docstrings for the MCP server module and related tests.

Notes

  • The MCP server currently exposes four tools:
    • half_to_full
    • full_to_half
    • hiragana_to_katakana
    • katakana_to_hiragana
  • Each tool accepts a single text: str parameter and returns the converted string.
  • Configuration options are intentionally not exposed in this initial version to keep the interface simple.

Motivation

This change enables Utsuho to be used not only as a Python library and CLI tool, but also as a component in MCP-compatible environments such as AI agents and developer tools.

Future Work

  • Support optional configuration parameters in MCP tools.
  • Add additional normalization features (e.g., romanization).
  • Explore extended MCP capabilities such as resources and prompts.

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.

1 participant