feat(gitea): add pip-installable packaging for external consumption #415

Merged
lmiranda merged 1 commits from feat/gitea-mcp-packaging into development 2026-02-03 19:47:34 +00:00
Owner

Summary

  • Extract tool definitions and dispatcher from server.py into tool_registry.py to enable transport-agnostic reuse
  • External consumers (e.g., HTTP transport in gitea-mcp-remote) can now import and use the Gitea MCP tools without duplicating code

Changes

  • Create pyproject.toml with PEP 621 compliant package manifest (hatchling)
  • Create tool_registry.py with get_tool_definitions() and create_tool_dispatcher()
  • Refactor server.py to use registry (1100 → 93 lines)
  • Update __init__.py with package exports and __version__

Technical Details

The tool_filter parameter enables selective tool exposure for remote servers.
Stdio transport behavior is unchanged - all 36 tools still work identically.

Test plan

  • Verify pip install -e mcp-servers/gitea works
  • Verify stdio transport still works with all 36 tools
  • Verify tool_filter parameter filters correctly

🤖 Generated with Claude Code

## Summary - Extract tool definitions and dispatcher from `server.py` into `tool_registry.py` to enable transport-agnostic reuse - External consumers (e.g., HTTP transport in gitea-mcp-remote) can now import and use the Gitea MCP tools without duplicating code ## Changes - Create `pyproject.toml` with PEP 621 compliant package manifest (hatchling) - Create `tool_registry.py` with `get_tool_definitions()` and `create_tool_dispatcher()` - Refactor `server.py` to use registry (1100 → 93 lines) - Update `__init__.py` with package exports and `__version__` ## Technical Details The `tool_filter` parameter enables selective tool exposure for remote servers. Stdio transport behavior is unchanged - all 36 tools still work identically. ## Test plan - [ ] Verify `pip install -e mcp-servers/gitea` works - [ ] Verify stdio transport still works with all 36 tools - [ ] Verify tool_filter parameter filters correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lmiranda added 1 commit 2026-02-03 19:46:55 +00:00
Extract tool definitions and dispatcher from server.py into tool_registry.py
to enable transport-agnostic reuse. External consumers (e.g., HTTP transport
in gitea-mcp-remote) can now import and use the Gitea MCP tools without
duplicating code.

Changes:
- Create pyproject.toml with PEP 621 compliant package manifest (hatchling)
- Create tool_registry.py with get_tool_definitions() and create_tool_dispatcher()
- Refactor server.py to use registry (1100 -> 93 lines)
- Update __init__.py with package exports and __version__

The tool_filter parameter enables selective tool exposure for remote servers.
Stdio transport behavior is unchanged - all 36 tools still work identically.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda merged commit f1732f07c1 into development 2026-02-03 19:47:34 +00:00
lmiranda deleted branch feat/gitea-mcp-packaging 2026-02-03 19:47:34 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#415