refactor: make gitea a self-contained Cline skill
Relocate the script into the skill (skills/gitea/scripts/gitea_mcp.py) and add a PEP 723 dependency block, so `uv run scripts/gitea_mcp.py` provisions deps with no install step and the skill folder is portable (drop into ~/.cline/skills/). Drop the non-standard `metadata` frontmatter — Cline only recognizes name + description. - .mcp.json points at the relocated script and runs with --no-project (PEP 723) - SKILL.md uses relative scripts/ paths; metadata block removed - find_config walks up the tree to locate config.json (skill root or plugin root) - tests import gitea_mcp via pytest pythonpath; README/CLAUDE paths updated Tests: 119 passed, 92% coverage. Standalone list-tools verified via uv --no-project.
This commit is contained in:
@@ -4,19 +4,19 @@ Full Gitea platform management — 66 tools for repositories, issues, PRs, branc
|
||||
|
||||
## Two ways to run (one source file)
|
||||
|
||||
`server/gitea_mcp.py` is both an MCP server and a CLI. The 66 tool functions are
|
||||
`skills/gitea/scripts/gitea_mcp.py` is both an MCP server and a CLI. The 66 tool functions are
|
||||
shared; only the entrypoint differs:
|
||||
|
||||
- **MCP server** — registered via `.mcp.json`, tools appear as `mcp__gitea__<tool>`.
|
||||
This is how you connect it to an MCP-aware client.
|
||||
- **CLI skill** — `uv run server/gitea_mcp.py <tool> --flags` prints one JSON
|
||||
- **CLI skill** — `uv run skills/gitea/scripts/gitea_mcp.py <tool> --flags` prints one JSON
|
||||
object on stdout. This is how Cline (and the `skills/gitea` skill) uses it.
|
||||
|
||||
```bash
|
||||
# CLI examples
|
||||
uv run --project . server/gitea_mcp.py --config ./config.json list_instances
|
||||
uv run --project . server/gitea_mcp.py --config ./config.json get_repo --owner andrey --repo infra
|
||||
uv run --project . server/gitea_mcp.py list-tools # self-describing catalogue
|
||||
uv run skills/gitea/scripts/gitea_mcp.py --config ./config.json list_instances
|
||||
uv run skills/gitea/scripts/gitea_mcp.py --config ./config.json get_repo --owner andrey --repo infra
|
||||
uv run skills/gitea/scripts/gitea_mcp.py list-tools # self-describing catalogue
|
||||
```
|
||||
|
||||
CLI output contract: exactly one JSON object — `{"success": true, "data": …}` or
|
||||
|
||||
Reference in New Issue
Block a user