Skip to content

A comprehensive configuration setup for Claude Code with Model Context Protocol (MCP) servers, custom commands, and automated workflows.

Notifications You must be signed in to change notification settings

encodia/claude-setup

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude Code Setup

A comprehensive configuration setup for Claude Code with Model Context Protocol (MCP) servers, custom commands, and automated workflows.

Claude Code MCP Python

Table of Contents

Overview

This project provides a pre-configured environment for Claude Code with enhanced capabilities through:

  • MCP Servers: Context7, Puppeteer, Sequential Thinking, DeepWiki
  • Custom Commands: Intelligent workflows for commits, tasks, and problem-solving
  • Hook System: Automated directory management and workflow triggers
  • Structured Workflows: Organized task management with reporting and planning

Quick Start

# 1. Install dependencies
pip install uv

# 2. Clone this configuration
git clone <your-repo> claude-setup
cd claude-setup

# 3. Start using commands
/task_medium implement user authentication

Prerequisites

Before using this setup, ensure you have:

  • Claude Code: Installed and configured
  • Python 3.8+: For hook script execution
  • uv: Package manager for Python script execution
  • Node.js: For MCP server functionality (npx)

Installation

1. Install uv (if not already installed)

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# After installation, open a new terminal and verify:
uv --version

2. Setup Configuration

# Copy configuration files to your project
cp -r .claude/ /your/project/
cp .mcp.json /your/project/

# Ensure hook permissions
chmod +x .claude/hooks/task_medium_prep_hook.py

Features

🎯 Custom Commands

  • /commit: Intelligent commit workflow with conventional standards
  • /code-review: Reviews uncommitted changes before committing
  • /task_medium: Advanced problem-solving with automated directory management
  • /task_easy: Simplified task workflow for lighter needs

πŸ€– Custom Agents

  • investigator: Expert code investigator that tracks down related code to problems
    • Uses sequential thinking and advanced search tools
    • Generates comprehensive INVESTIGATION_REPORT.md files
    • Integrated with task_medium workflow
  • code-flow-mapper: Expert code flow mapper that traces execution paths and file interconnections
    • Maps code flow and analyzes file relationships
    • Generates FLOW_REPORT.md files
  • planner: Expert planner that takes into account investigation and flow analysis reports
    • Creates detailed plans that solve all problems
    • Generates comprehensive PLAN.md files
  • code-reviewer: Senior code review specialist for quality assurance
    • Reviews changes for quality, security, and maintainability
    • Provides prioritized feedback (critical, warnings, suggestions)
    • Checks for best practices and potential issues

πŸ”Œ MCP Servers

  • Context7: Library documentation and code context
  • Puppeteer: Browser automation and web scraping
  • Sequential Thinking: Advanced reasoning and problem-solving
  • DeepWiki: Repository documentation fetching

⚑ Hook System

  • UserPromptSubmit: Automatic directory creation for task workflows
  • Extensible: Easy to add custom hooks for workflow automation
  • Documentation: Hooks Reference | Hooks Guide

Commands

/task_medium - Advanced Problem Solving

Automated workflow for complex problem-solving with structured investigation and planning.

Usage:

/task_medium [problem description]

Features:

  • βœ… Automatic claude-instance-{id} directory creation
  • βœ… Sequential thinking for complex reasoning
  • βœ… Multi-agent workflow with specialized subagents
  • βœ… Codebase investigation with INVESTIGATION_REPORT.md generation
  • βœ… Code flow mapping with FLOW_REPORT.md analysis
  • βœ… Structured planning with PLAN.md output
  • βœ… Incremental instance numbering
  • βœ… Edge case handling and best practices focus

Example:

/task_medium implement user authentication system

Workflow:

  1. πŸ”§ Hook detects /task_medium prompt
  2. πŸ“ Creates claude-code-storage/claude-instance-{id}/ directory
  3. πŸ” Investigator agent analyzes codebase using sequential thinking
  4. πŸ“„ Generates comprehensive INVESTIGATION_REPORT.md with related files
  5. πŸ—ΊοΈ Code-flow-mapper agent traces execution paths and file interconnections
  6. πŸ“Š Generates detailed FLOW_REPORT.md with code relationships
  7. πŸ“‹ Planner agent reads both reports and creates comprehensive PLAN.md
  8. πŸ‘€ User reviews and approves plan

/code-review - Automated Code Review

Initiates code-reviewer agent to analyze uncommitted changes only.

Usage:

/code-review

Features:

  • Focuses exclusively on uncommitted changes
  • Reviews modified files for quality, security, and maintainability
  • Provides prioritized feedback:
    • 🚨 Critical issues (must fix)
    • ⚠️ Warnings (should fix)
    • πŸ’‘ Suggestions (consider improving)
  • Includes specific fix examples

Example:

# After making changes
/code-review
# Fix any critical issues
/commit

/commit - Intelligent Commits

Streamlined commit workflow following conventional commit standards.

Features:

  • Diff analysis and change summarization
  • Conventional commit message formatting
  • Clean, focused commits

Important: Run /code-review before committing to ensure code quality.

Example:

# Review changes first
/code-review
# After fixing issues
/commit

/task_easy - Simplified Tasks

Lightweight task workflow for simpler problem-solving needs.

Configuration

Directory Structure

claude-setup/
β”œβ”€β”€ .claude/
β”‚   β”œβ”€β”€ settings.json          # Permissions and hook configuration
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”œβ”€β”€ investigator.md    # Code investigation agent
β”‚   β”‚   β”œβ”€β”€ code-flow-mapper.md # Code flow mapping agent
β”‚   β”‚   β”œβ”€β”€ planner.md         # Planning agent
β”‚   β”‚   └── code-reviewer.md   # Code review specialist
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   └── task_medium_prep_hook.py  # Auto directory creation
β”‚   └── commands/
β”‚       β”œβ”€β”€ task_medium.md     # Advanced task workflow
β”‚       β”œβ”€β”€ task_easy.md       # Simple task workflow
β”‚       β”œβ”€β”€ code-review.md     # Code review workflow
β”‚       └── commit.md          # Commit workflow
β”œβ”€β”€ .mcp.json                  # MCP server configuration
β”œβ”€β”€ claude-code-storage/       # Auto-generated task directories
└── README.md

Settings Configuration

The .claude/settings.json file contains:

{
  "permissions": {
    "allow": ["WebFetch(domain:docs.anthropic.com)", ...],
    "deny": [...]
  },
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "uv run .claude/hooks/task_medium_prep_hook.py"
          }
        ]
      }
    ]
  },
  "enabledMcpjsonServers": ["context7", "puppeteer", "sequential-thinking", ...]
}

MCP Configuration

The .mcp.json file defines server configurations:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["@context7/claude-dev", "--minTokens", "1000"]
    },
    "puppeteer": {
      "command": "npx",
      "args": ["@puppeteer/claude-dev"]
    }
  }
}

Troubleshooting

Common Issues

Hook not triggering:

  • Ensure uv is installed and in PATH
  • Check script permissions: chmod +x .claude/hooks/task_medium_prep_hook.py
  • Verify hook configuration in .claude/settings.json

Directory creation fails:

  • Check file system permissions
  • Ensure claude-code-storage/ parent directory exists
  • Review hook script logs for error details

MCP servers not loading:

  • Verify Node.js and npx are installed
  • Check .mcp.json configuration syntax
  • Ensure MCP packages are available via npx

Debug Mode

Enable debug mode for detailed logging:

claude --debug

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and test thoroughly
  4. Submit a pull request with detailed description

Adding Custom Hooks

  1. Create script in .claude/hooks/
  2. Make executable: chmod +x .claude/hooks/your_hook.py
  3. Add configuration to .claude/settings.json
  4. Test with sample inputs

Resources:

Star History

Star History Chart

License

This configuration setup is provided as-is for Claude Code enhancement.


Need help? Check the documentation:

Or open an issue for project-specific questions.

About

A comprehensive configuration setup for Claude Code with Model Context Protocol (MCP) servers, custom commands, and automated workflows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%