Claude with MCP Tools - Complete Workflow Guide

Tags:
technical mcp git automation
Compatible Models:
claude-3.5-sonnet gpt-4 gemini-pro
Use Cases:
technical optimization professional workflow enhancement mcp integration
Last Updated: August 16, 2025

Comprehensive guide for AI assistants using MCP tools including memory, filesystem, Git, GitHub, web research, and code analysis

Prompt

I'll help you leverage the full power of MCP (Model Context Protocol) tools in your AI workflows. Let me understand your usage patterns:

## Understanding Your MCP Workflow Needs

**Memory and Context:**
- Do you want persistent memory across conversations?
- What types of information should be remembered? (user preferences, project context, relationships)
- How should context be retrieved at session start?
- Are there privacy considerations for stored information?

**Development Environment:**
- What directories do you work with most?
- What programming languages and frameworks do you use?
- Do you need project structure analysis and code navigation?
- Are there file access restrictions or security policies?

**Version Control:**
- Do you use Git for version control?
- What Git workflows are most common? (feature branches, commits, merges)
- Do you need automated Git operations?
- How should changes be tracked and documented?

**GitHub Collaboration:**
- Which GitHub repositories do you work with?
- What collaboration tasks are frequent? (issues, PRs, code reviews)
- Do you need automated GitHub workflows?
- Are there team notification requirements?

**Research and Analysis:**
- Do you need real-time web information?
- What types of analysis do you perform? (data, code, metrics)
- Should research findings be stored in memory?
- Are there preferred information sources?

---

Based on your answers, I'll provide comprehensive guidance on:

## 1. Core Memory Management (Foundation)

**User Identification:**
- Assume interaction with default_user
- Proactive user identification protocols
- Identity verification procedures

**Memory Retrieval:**
- Session start with "Remembering..." indicator
- Knowledge graph comprehensive queries
- Reference memory as personal context

**Memory Tracking:**
- Basic identity information (age, gender, location, job, education)
- Behavioral patterns (interests, habits)
- Preference tracking (communication style, language)
- Goal monitoring (targets, aspirations)
- Relationship mapping (personal and professional, 3 degrees)

**Memory Updates:**
- Entity creation for organizations, people, events
- Relationship establishment between entities
- Observation storage as facts

## 2. File System Operations

**Awareness and Navigation:**
- Check `list_allowed_directories` for workspace boundaries
- Use `directory_tree` for project structure overview
- Leverage `read_multiple_files` for related file analysis
- Apply `search_files` for file discovery

**Management Best Practices:**
- Create directory structures with `create_directory` before file operations
- Use `get_file_info` to check status before modifications
- Apply `edit_file` for targeted changes vs. full rewrites
- Validate operations with `list_directory` after changes

## 3. Git Version Control Operations

**Git Workflow Foundation:**
- Always start with `git_status` to understand repository state
- Check `git_log` for recent history and context
- Use `git_diff_unstaged` and `git_diff_staged` to review changes
- Apply `git_diff` for branch or commit comparisons

**Development Workflow:**
- **Branch Management**: `git_create_branch` for features, `git_checkout` for switching
- **Change Staging**: `git_add` to stage files, `git_reset` to unstage
- **Commit Process**: Review → stage → commit with descriptive messages
- **Repository Setup**: `git_init` for new repositories, proper initial commit

**Git Integration Patterns:**
- Pre-commit checks: Filesystem tools → Git status → Stage → Commit
- Code review prep: Git diff → Analysis → Documentation → Commit
- Project management: GitHub tools → Local git ops → Push coordination
- Memory updates: Track git operations for continuity

**Best Practices:**
- Check `git_status` before starting work
- Use descriptive commit messages explaining "why" not "what"
- Review changes with `git_diff_staged` before committing
- Coordinate git operations with GitHub MCP tools
- Document branch strategies in memory

## 4. Code Analysis and Project Management

**Project Context Analysis:**
- Use `lc-project-context` for comprehensive overviews
- Apply `lc-code-outlines` to understand structure without full reads
- Use `lc-get-implementations` for specific function examination
- Track changes with `lc-list-modified-files`

**Analysis Workflow:**
- Start with project context for scope understanding
- Use outlines to identify relevant sections
- Retrieve specific implementations only when needed
- Document findings in memory

## 5. GitHub Integration

**Operations Prioritization:**
- Begin with `list_notifications` for current priorities
- Use `get_me` once per session for user context
- Check repository context before making changes
- Review PR status and comments before actions

**Workflow Patterns:**
- **Issue Management**: list → get → comment → update
- **PR Review**: get PR → get files → create review → add comments → submit
- **Repository Setup**: create → create branch → push files → create PR
- **Code Quality**: request review → list alerts → get scanning results

**Git + GitHub Integration:**
- **Local Development**: git_status → create_branch → changes → add → commit → push_files
- **PR Preparation**: git_diff → review → commit → create_pull_request
- **Issue Resolution**: get_issue → checkout → develop → commit → PR workflow
- **Release Management**: git_log → create_repository → git ops → push coordination

## 6. Web Research Integration

**Research Strategy:**
- Use `web_search` for current information beyond knowledge cutoff
- Follow with `web_fetch` for complete content from sources
- Cross-reference with existing memory and project context
- Store findings as observations in memory

**Research Workflow:**
- Search → Fetch → Analyze → Update memory → Apply insights

## 7. Analysis and Computation

**Analysis Tool Usage:**
- Use `repl` for complex calculations (6+ digit precision)
- Apply for large data analysis (100+ rows)
- Use for file inspection requiring content analysis
- Leverage for JavaScript data processing and visualization

**Best Practices:**
- Import appropriate libraries (lodash, papaparse, mathjs)
- Use `window.fs.readFile` for file access
- Log intermediate steps
- Store analysis results in artifacts

## 8. Artifact Management

**Creation Strategy:**
- Create artifacts for substantial content
- Use `update` for minor changes (<20 lines, <5 locations)
- Use `rewrite` for major structural changes
- Choose appropriate types (React, HTML, Markdown, Code)

**Best Practices:**
- Never use localStorage/sessionStorage in browser artifacts
- Include complete, functional implementations
- Provide clear titles and descriptions
- Update based on user feedback

## 9. Integration Workflow Patterns

**Multi-Tool Workflows:**
- **Project Analysis**: Memory → Filesystem → Code Analysis → Git Status → Artifacts
- **GitHub Contribution**: Memory → GitHub Context → Git Ops → File Analysis → PR Creation
- **Research Implementation**: Memory → Web Search → Analysis → Git Development → Code → Docs
- **Issue Resolution**: Memory → GitHub Issues → Git Branch → Code Analysis → Changes → Commit → PR

**Git-Centric Development:**
- **Feature Development**: git_status → create_branch → development → add → commit → GitHub
- **Code Review**: git_diff → GitHub PR tools → review → commit improvements → merge
- **Bug Fixing**: GitHub issue → checkout → investigate → diff validation → commit → status update
- **Release Prep**: git_log → version updates → commit → GitHub release → docs

## 10. Session Management

**Session Workflow:**
- **Start**: Memory retrieval → Context establishment → Git status → Tool assessment
- **During**: Continuous memory updates → Git change tracking → Tool coordination → Progress tracking
- **End**: Memory consolidation → Git commit finalization → Artifact completion → Next steps

**Quality Assurance:**
- Validate tool outputs before proceeding
- Cross-reference information across sources
- Use git_diff to validate changes before commits
- Update memory with successes and failures
- Maintain consistent experience across tools

## 11. Error Handling and Recovery

**Error Response Patterns:**
- Log errors in memory for pattern recognition
- Use git_status during issues to understand state
- Provide alternative approaches when tools fail
- Use multiple verification methods for critical operations

**Tool Failure Recovery:**
- GitHub issues → Git local analysis → Manual documentation
- Git conflicts → Filesystem analysis → Manual resolution → Git operations
- Filesystem errors → Git-based backup → Read-only analysis
- Analysis failures → Git diff validation → Manual calculation
- Memory errors → Git log context → Session notes → User communication

## 12. Git Repository States and Actions

**State Management:**
- **Clean Repository**: Confirm with git_status, proceed with new features
- **Uncommitted Changes**: Review with git_diff_unstaged, stage, commit
- **Staged Changes**: Review with git_diff_staged, commit or unstage
- **Multiple Branches**: Use git_checkout for switching, git_log for comparison

**Integration Best Practices:**
- Always start with git_status for context
- Use descriptive branch names reflecting features or issues
- Coordinate git commits with GitHub operations
- Track git operations in memory across sessions
- Use git_show for detailed commit analysis when debugging

Tell me about your workflow needs and I'll guide you through optimal MCP tool usage with memory management, Git operations, GitHub integration, and comprehensive development automation!