feat(mcp): Git Operations MCP - MCP Tools Integration #109

Open
opened 2026-01-06 19:19:37 +00:00 by cardosofelipe · 0 comments

Parent Issue

Part of #58 (Git Operations MCP Server)

Summary

Implement all MCP tools for the Git Operations server and integrate with the existing MCP infrastructure.

Tasks

MCP Server Setup (server.py)

  • Create FastMCP server instance
  • Configure server settings
  • Implement health check endpoint

MCP Tools

  • Implement clone_repo tool (project_id, repo_url, branch, credentials)
  • Implement create_branch tool (project_id, branch_name, base_branch)
  • Implement list_branches tool (project_id)
  • Implement checkout_branch tool (project_id, branch)
  • Implement commit_changes tool (project_id, message, files)
  • Implement push_branch tool (project_id, branch, force)
  • Implement pull_changes tool (project_id, branch)
  • Implement get_diff tool (project_id, base, target)
  • Implement get_status tool (project_id)
  • Implement create_pull_request tool (project_id, title, description, source, target)
  • Implement list_pull_requests tool (project_id, state)
  • Implement merge_pull_request tool (project_id, pr_number, strategy)
  • Implement add_pr_comment tool (project_id, pr_number, body)
  • Implement get_commit_log tool (project_id, limit)

Credential Management

  • Implement secure credential storage
  • Support token-based authentication
  • Support SSH key authentication
  • Implement credential cleanup after use

Integration

  • Register server in MCP config
  • Add to backend MCP registry
  • Test tool routing
  • Verify health monitoring works

Testing

  • Unit tests for all MCP tools
  • Integration tests with MCP client manager
  • Test credential handling
  • Test tool routing
  • Achieve >90% coverage

Acceptance Criteria

  • All MCP tools work correctly
  • Tools properly scoped by project_id
  • Credentials handled securely
  • Integration with MCP infrastructure working
  • All tests pass

Dependencies

  • Depends on: #105 (Foundation), #106 (Git Wrapper), #107 (Workspace), #108 (Gitea Provider)

Labels

  • mcp
  • phase-2
  • backend
## Parent Issue Part of #58 (Git Operations MCP Server) ## Summary Implement all MCP tools for the Git Operations server and integrate with the existing MCP infrastructure. ## Tasks ### MCP Server Setup (`server.py`) - [ ] Create FastMCP server instance - [ ] Configure server settings - [ ] Implement health check endpoint ### MCP Tools - [ ] Implement `clone_repo` tool (project_id, repo_url, branch, credentials) - [ ] Implement `create_branch` tool (project_id, branch_name, base_branch) - [ ] Implement `list_branches` tool (project_id) - [ ] Implement `checkout_branch` tool (project_id, branch) - [ ] Implement `commit_changes` tool (project_id, message, files) - [ ] Implement `push_branch` tool (project_id, branch, force) - [ ] Implement `pull_changes` tool (project_id, branch) - [ ] Implement `get_diff` tool (project_id, base, target) - [ ] Implement `get_status` tool (project_id) - [ ] Implement `create_pull_request` tool (project_id, title, description, source, target) - [ ] Implement `list_pull_requests` tool (project_id, state) - [ ] Implement `merge_pull_request` tool (project_id, pr_number, strategy) - [ ] Implement `add_pr_comment` tool (project_id, pr_number, body) - [ ] Implement `get_commit_log` tool (project_id, limit) ### Credential Management - [ ] Implement secure credential storage - [ ] Support token-based authentication - [ ] Support SSH key authentication - [ ] Implement credential cleanup after use ### Integration - [ ] Register server in MCP config - [ ] Add to backend MCP registry - [ ] Test tool routing - [ ] Verify health monitoring works ### Testing - [ ] Unit tests for all MCP tools - [ ] Integration tests with MCP client manager - [ ] Test credential handling - [ ] Test tool routing - [ ] Achieve >90% coverage ## Acceptance Criteria - [ ] All MCP tools work correctly - [ ] Tools properly scoped by project_id - [ ] Credentials handled securely - [ ] Integration with MCP infrastructure working - [ ] All tests pass ## Dependencies - Depends on: #105 (Foundation), #106 (Git Wrapper), #107 (Workspace), #108 (Gitea Provider) ## Labels - mcp - phase-2 - backend
Sign in to join this conversation.