Skip to content

Latest commit

 

History

History
276 lines (201 loc) · 7.17 KB

File metadata and controls

276 lines (201 loc) · 7.17 KB

🔧 How the Enhanced Fork-Parity MCP Works

🎯 No Need to Keep Project Open!

The enhanced fork-parity MCP operates independently of whether you have the project open in your editor or terminal. Here's how it works:

🤖 Background Operation

MCP Server Runs Independently

  • The fork-parity-mcp server runs as a standalone process
  • It connects to your git repository on-demand when you call functions
  • No persistent processes running in the background
  • No need to keep terminals open or projects loaded

Git Repository Access

  • MCP accesses your git repository directly from the filesystem
  • Uses standard git commands: git fetch, git log, git show, etc.
  • Works with any git repository on your system
  • Repository path specified in function calls: /home/moika/Documents/code/kuucode

📁 How It Accesses Your Project

When You Call MCP Functions:

# MCP connects to your repo at this path
fork_parity_sync_and_analyze(repository_path: "/home/moika/Documents/code/kuucode")

What Happens Behind the Scenes:

  1. MCP navigates to /home/moika/Documents/code/kuucode
  2. Runs git fetch upstream to get latest changes
  3. Analyzes commits with git log master..upstream/dev
  4. Reads configuration from .parity-integration.json
  5. Returns results to you

No Project State Required:

  • ✅ Works whether project is open or closed
  • ✅ Works from any directory you're currently in
  • ✅ Works even if you're in a different project
  • ✅ Works without any running development servers

🔄 Different Usage Scenarios

Scenario 1: Working in Kuucode Project

# You're in /home/moika/Documents/code/kuucode
cd /home/moika/Documents/code/kuucode

# MCP functions work directly (uses current directory)
fork_parity_get_actionable_items(priority_filter: "high")

Scenario 2: Working in Different Project

# You're in /home/moika/Documents/code/other-project
cd /home/moika/Documents/code/other-project

# MCP functions work with explicit path
fork_parity_get_actionable_items(
  repository_path: "/home/moika/Documents/code/kuucode",
  priority_filter: "high"
)

Scenario 3: From Anywhere on System

# You're in /home/moika/Downloads or anywhere else
cd /home/moika/Downloads

# MCP still works with full path
fork_parity_sync_and_analyze(
  repository_path: "/home/moika/Documents/code/kuucode"
)

🎮 Integration with Kuucode CLI

Using MCP Through Kuucode

Since you're using kuucode CLI, the MCP is available whenever kuucode is running:

# Start kuucode from anywhere
kuucode

# MCP functions are available in the session
# They work regardless of your current directory

Kuucode Session Benefits:

  • MCP functions available in any kuucode conversation
  • Persistent configuration loaded from kuucode.json
  • Context awareness of your project structure
  • Integrated workflow with other development tools

MCP Configuration in Kuucode

Your kuucode.json tells kuucode where to find the MCP:

{
  "mcp": {
    "fork-parity": {
      "type": "local",
      "command": ["fork-parity-mcp"],
      "environment": {
        "UPSTREAM_REMOTE_NAME": "upstream",
        "UPSTREAM_BRANCH": "dev",
        "LOCAL_BRANCH": "master"
      }
    }
  }
}

This means:

  • ✅ MCP is always available when you use kuucode
  • Environment variables are automatically set
  • No manual setup needed for each session

🔄 Automated Workflows

GitHub Actions (Runs Without You)

Set up automated workflows that run completely independently:

# .github/workflows/parity-daily.yml
name: Daily Parity Check
on:
  schedule:
    - cron: "0 9 * * *" # 9 AM daily
jobs:
  parity-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run Parity Analysis
        run: |
          fork-parity-mcp sync-and-analyze
          fork-parity-mcp send-notification daily

Benefits:

  • ✅ Runs automatically every day at 9 AM
  • No need for you to be online or have project open
  • Sends notifications to Discord/Slack when done
  • Updates parity database with new commits

Cron Jobs (Local Automation)

Set up local automation that runs even when you're not working:

# Add to your crontab
0 9 * * * cd /home/moika/Documents/code/kuucode && fork-parity-mcp sync-and-analyze

📱 Notification-Driven Workflow

Get Notified When Tasks Arrive

Instead of manually checking, get automatic notifications:

Discord Integration:

fork_parity_setup_notifications(channels: [{
  "type": "discord",
  "config": {
    "webhook": "your-webhook-url"
  }
}])

What You'll Receive:

  • 🌅 Morning digest: "3 new high-priority commits need review"
  • 🚨 Critical alerts: "Security vulnerability detected in upstream"
  • Integration updates: "2 commits auto-integrated successfully"
  • 📊 Weekly reports: "Integration summary and trends"

Mobile-Friendly Workflow

  • Discord/Slack notifications work on mobile
  • Quick review of commit summaries
  • Decision making on-the-go
  • Detailed analysis when you're back at computer

🎯 Practical Usage Patterns

Pattern 1: Daily Check-In

# Morning routine (2 minutes)
kuucode  # Start kuucode session
# Ask: "What parity tasks need attention today?"
# MCP automatically checks and responds

Pattern 2: Weekly Deep Dive

# Weekend planning (30 minutes)
kuucode
# Ask: "Sync with upstream and show me all new commits"
# Ask: "Create review templates for high-priority items"
# Ask: "Generate integration plan for this week"

Pattern 3: Automated + Notification

# Set up once, then just respond to notifications
fork_parity_setup_github_actions()
fork_parity_setup_notifications()

# Then just respond when you get alerts:
# "Discord: 🚨 Critical security fix available"
# You: Open kuucode and ask "Show me the security issue details"

🏆 Key Benefits

Flexibility

  • ✅ Works whether project is open or closed
  • ✅ Works from any directory on your system
  • ✅ Works through kuucode CLI from anywhere
  • ✅ Works automatically with GitHub Actions

Convenience

  • No background processes consuming resources
  • No persistent connections to maintain
  • On-demand analysis when you need it
  • Notification-driven workflow

Integration

  • Seamless with kuucode CLI workflow
  • Git repository access from filesystem
  • Configuration-driven behavior
  • Automated workflows for continuous monitoring

🚀 Getting Started

Right Now (Project Closed):

# From anywhere on your system
kuucode
# Ask: "What parity tasks do I have?"
# MCP will check /home/moika/Documents/code/kuucode automatically

Set Up Automation:

kuucode
# Ask: "Set up daily parity notifications"
# Ask: "Configure GitHub Actions for automated monitoring"

The enhanced fork-parity MCP is designed to work seamlessly in the background - no need to keep projects open or manage running processes! 🎯