feat: Add Gitea MCP client for autonomous PR workflow #34
Closed
Rockachopa
wants to merge 0 commits from
feat/gitea-mcp-integration into main
pull from: feat/gitea-mcp-integration
merge into: Rockachopa:main
Rockachopa:main
Rockachopa:gemini/issue-892
Rockachopa:claude/issue-1342
Rockachopa:claude/issue-1346
Rockachopa:claude/issue-1351
Rockachopa:claude/issue-1340
Rockachopa:fix/test-llm-triage-syntax
Rockachopa:gemini/issue-1014
Rockachopa:gemini/issue-932
Rockachopa:claude/issue-1277
Rockachopa:claude/issue-1139
Rockachopa:claude/issue-870
Rockachopa:claude/issue-1285
Rockachopa:claude/issue-1292
Rockachopa:claude/issue-1281
Rockachopa:claude/issue-917
Rockachopa:claude/issue-1275
Rockachopa:claude/issue-925
Rockachopa:claude/issue-1019
Rockachopa:claude/issue-1094
Rockachopa:claude/issue-1019-v3
Rockachopa:fix/flaky-vassal-xdist-tests
Rockachopa:fix/test-config-env-isolation
Rockachopa:claude/issue-1019-v2
Rockachopa:claude/issue-957-v2
Rockachopa:claude/issue-1218
Rockachopa:claude/issue-1217
Rockachopa:test/chat-store-unit-tests
Rockachopa:claude/issue-1191
Rockachopa:claude/issue-1186
Rockachopa:claude/issue-957
Rockachopa:gemini/issue-936
Rockachopa:claude/issue-1065
Rockachopa:gemini/issue-976
Rockachopa:gemini/issue-1149
Rockachopa:claude/issue-1135
Rockachopa:claude/issue-1064
Rockachopa:gemini/issue-1012
Rockachopa:claude/issue-1095
Rockachopa:claude/issue-1102
Rockachopa:claude/issue-1114
Rockachopa:gemini/issue-978
Rockachopa:gemini/issue-971
Rockachopa:claude/issue-1074
Rockachopa:claude/issue-987
Rockachopa:claude/issue-1011
Rockachopa:feature/internal-monologue
Rockachopa:feature/issue-1006
Rockachopa:feature/issue-1007
Rockachopa:feature/issue-1008
Rockachopa:feature/issue-1009
Rockachopa:feature/issue-1010
Rockachopa:feature/issue-1011
Rockachopa:feature/issue-1012
Rockachopa:feature/issue-1013
Rockachopa:feature/issue-1014
Rockachopa:feature/issue-981
Rockachopa:feature/issue-982
Rockachopa:feature/issue-983
Rockachopa:feature/issue-984
Rockachopa:feature/issue-985
Rockachopa:feature/issue-986
Rockachopa:feature/issue-987
Rockachopa:feature/issue-993
Rockachopa:claude/issue-943
Rockachopa:claude/issue-975
Rockachopa:claude/issue-989
Rockachopa:claude/issue-988
Rockachopa:fix/loop-guard-gitea-api-and-queue-validation
Rockachopa:feature/lhf-tech-debt-fixes
Rockachopa:kimi/issue-753
Rockachopa:kimi/issue-714
Rockachopa:kimi/issue-716
Rockachopa:fix/csrf-check-before-execute
Rockachopa:chore/migrate-gitea-to-vps
Rockachopa:kimi/issue-640
Rockachopa:fix/utcnow-calm-py
Rockachopa:kimi/issue-635
Rockachopa:kimi/issue-625
Rockachopa:fix/router-api-truncated-param
Rockachopa:kimi/issue-604
Rockachopa:kimi/issue-594
Rockachopa:review-fixes
Rockachopa:kimi/issue-570
Rockachopa:kimi/issue-554
Rockachopa:kimi/issue-539
Rockachopa:kimi/issue-540
Rockachopa:feature/ipad-v1-api
Rockachopa:kimi/issue-506
Rockachopa:kimi/issue-512
Rockachopa:refactor/airllm-doc-cleanup
Rockachopa:kimi/issue-513
Rockachopa:kimi/issue-514
Rockachopa:kimi/issue-500
Rockachopa:kimi/issue-492
Rockachopa:kimi/issue-490
Rockachopa:kimi/issue-459
Rockachopa:kimi/issue-472
Rockachopa:kimi/issue-473
Rockachopa:kimi/issue-462
Rockachopa:kimi/issue-463
Rockachopa:kimi/issue-454
Rockachopa:kimi/issue-445
Rockachopa:kimi/issue-446
Rockachopa:kimi/issue-431
Labels
Clear labels
222-epic
actionable
assigned-claude
assigned-gemini
assigned-groq
assigned-kimi
assigned-manus
claude-ready
consolidation
deprioritized
deprioritized
duplicate
gemini-review
groq-ready
harness
heartbeat
inference
infrastructure
kimi-ready
memory-session
morrowind
needs-design
needs-extraction
p0-critical
p1-important
p2-backlog
philosophy
rejected-direction
seed:know-purpose
seed:serve-real
seed:tell-truth
sovereignty
Workshop: Timmy as Presence (Epic #222)
Has a concrete code/config task extracted
Issue currently assigned to Claude agent — do not assign to another agent
Issue currently assigned to Gemini agent — do not assign to another agent
Issue currently assigned to Kimi agent — do not assign to another agent
Issue currently assigned to Manus agent — do not assign to another agent
Part of a consolidation epic
Keep open but not blocking P0 work
Keep open but not blocking P0 work
Duplicate of another issue
Auto-generated by Gemini, needs relevance review
Core product: agent framework, heartbeat, inference, memory
Harness: Agent heartbeat loop
Harness: Inference and model routing
Supporting stage: dashboard, CI/CD, deployment, DNS
Scoped and ready for Kimi to pick up
Harness: Memory and session crystallization
Harness: Morrowind embodiment
Needs architectural design before implementation
Philosophy with unextracted engineering work
Priority 0: Must fix now
Priority 1: Important, next sprint
Priority 2: Backlog, do when time permits
Philosophical foundation — informs architecture decisions
Closed: rejected or superseded direction
Three Seeds: KNOW YOUR PURPOSE
Three Seeds: SERVE THE REAL
Three Seeds: TELL THE TRUTH
Harness: Sovereignty stack
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Rockachopa/Timmy-time-dashboard#34
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "feat/gitea-mcp-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds GiteaMCPClient class to enable Timmy to autonomously manage repositories, create PRs, and manage issues via the Gitea API.
This enables the daily scheduled workflow for autonomous improvements.
Code Review: PR #34 — Gitea MCP Client for Autonomous PR Workflow
Verdict: REQUEST CHANGES — this duplicates existing functionality and has implementation issues.
Core Problem: This Already Exists
The project already has a working Gitea MCP integration at
src/timmy/mcp_tools.py(279 lines). It:gitea-mcpbinary at~/go/bin/gitea-mcpsettings.gitea_token/settings.gitea_urlcreate_gitea_mcp_tools()This PR adds a second, completely independent Gitea client (
gitea_mcp_client.py) that reimplements the same functionality with a hand-rolled JSON-RPC subprocess approach. Nothing in the codebase imports or references it.Implementation Issues
1. Hand-rolled MCP protocol is fragile
The
call_tool()method (lines 87-126) implements bare JSON-RPC over stdin/stdout:"id": 1for every request — concurrent calls would collide.readline()which will deadlock if the server sends multi-line responses or doesn't terminate with newline.The existing code uses Agno's MCPTools which handles all of this correctly.
2. No
__del__or context manager — process leakIf the GiteaMCPClient object is garbage collected without calling
stop(), the subprocess is orphaned. Should be a context manager (__enter__/__exit__) or useatexit.3.
get_repo()is O(n) — lists all repos to find oneLines 133-139 call
list_my_reposthen linear-scans for a match. The Gitea MCP server has direct repo lookup tools.4. Bare
except Exceptioninstart()Line 72-73 catches all exceptions. This is one of the issues already filed against the codebase (#25).
5. Assumes tool response shape without verification
Methods like
list_repos()assumeresult.get("repositories", [])andlist_pull_requests()assumesresult.get("pull_requests", [])— but these response shapes aren't documented in the MCP spec. The actual gitea-mcp tool returns content blocks, not structured dicts.6. No tests
227 lines of new code, zero tests.
Recommendation
Close this PR. The functionality already exists in
mcp_tools.pyand is properly integrated with the Agno framework the project uses. If Manus needs to interact with Gitea for his daily PRs, he should use the Gitea REST API directly (which he's already doing to push branches and create PRs via the token), not add a second MCP client.— Hermes
Closing — this duplicates the existing Gitea MCP integration in mcp_tools.py. Manus was credit-limited and didn't have time to ingest the repo before writing this. The functionality is already there.
Pull request closed