mcpmc/docs/MCPMC_STDIO_INTEGRATION.md
Ryan Malloy 4db7228a76 Organize documentation into docs/ directory
- Move SECURITY.md, QUICK_START.md, MCPMC_STDIO_INTEGRATION.md to docs/
- Update README.md with documentation links
2025-09-18 12:12:18 -06:00

4.9 KiB

MCPMC Expert System - Claude Code Integration Guide

🎯 Overview

The MCPMC Expert System can now be used directly within Claude Code conversations as an MCP stdio server, providing instant access to 6 specialized engineering experts right in your development workflow.

📦 Installation Methods

# Install and run from the project directory
cd /home/rpm/claude/mcpmc/src/backend
uvx mcpmc

# Or install globally 
uvx --from /home/rpm/claude/mcpmc/src/backend mcpmc

Method 2: Development Installation

# For local development and testing
cd /home/rpm/claude/mcpmc/src/backend
uv run python -m src.mcpmc

🔧 Claude Code Integration

Add to Claude Code MCP Configuration

# Add MCPMC expert system to Claude Code
claude mcp add mcpmc-experts "uvx --from /home/rpm/claude/mcpmc/src/backend mcpmc"

# Or using a shorter alias
claude mcp add experts "uvx --from /home/rpm/claude/mcpmc/src/backend mcpmc"

Verify Installation

# List configured MCP servers
claude mcp list

# Test the connection
claude mcp test mcpmc-experts

🧠 Available Expert Tools

Once integrated, the following tools become available in Claude Code conversations:

1. consult_expert

Get analysis from a single specialized expert:

  • Structural Engineer (Trust: 9.2) - Foundation, cracks, settlement
  • Geotechnical Engineer (Trust: 8.8) - Soil mechanics, bearing capacity
  • HVAC Engineer (Trust: 8.6) - Air quality, ventilation systems
  • Plumbing Expert (Trust: 8.4) - Water systems, drainage
  • Fire Safety Expert (Trust: 9.1) - Emergency egress, life safety
  • Electrical Safety Expert (Trust: 8.9) - Grounding, GFCI, codes

2. multi_agent_conference

Coordinate multiple experts for complex interdisciplinary issues.

3. list_available_experts

Get detailed information about all expert agents and their specializations.

4. search_knowledge_base

Access the engineering knowledge base with semantic search capabilities.

5. elicit_user_input

Request additional clarifying information when expert analysis needs more details.

💡 Usage Examples in Claude Code

Once integrated, you can use these tools naturally in conversation:

You: "I found cracks in my basement foundation wall. Can you consult the structural engineer?"

Claude: I'll consult our structural engineering expert about the foundation cracks.
[Uses consult_expert tool automatically]

Expert Analysis: **STRUCTURAL ANALYSIS:**
• Identified structural risk factors: crack
• **Crack Analysis**: Foundation cracks can indicate settlement, thermal movement, or overloading...
• **Recommendations**: Document crack patterns, install monitoring gauges, investigate underlying causes...

🔍 Advanced Features

Priority-Based Analysis

  • Critical: Immediate safety concerns with emergency protocols
  • High: Urgent structural or safety issues requiring prompt attention
  • Medium: Standard engineering analysis and recommendations
  • Low: General consultation and preventive guidance

Multi-Expert Coordination

Complex issues automatically trigger multi-expert conferences:

  • Foundation settlement → Structural + Geotechnical experts
  • Water intrusion → Structural + Plumbing + HVAC experts
  • Electrical safety → Electrical + Fire Safety experts

Knowledge Base Integration

Expert analysis includes references to:

  • Building codes (IBC, NEC, ASHRAE, NFPA)
  • Engineering standards (ASCE 7, ACI, AISC)
  • Best practices and industry guidelines

🏗️ System Architecture

Claude Code Conversation
        ↓ [MCP Protocol]
    MCPMC Stdio Server  
        ↓ [FastMCP]
    Expert Agent Registry
        ↓ [Analysis]
   6 Specialized Experts → Knowledge Base → User Elicitation

🚀 Benefits

  • Instant Access: No need to switch contexts or open separate applications
  • Expert Coordination: Multiple specialists work together seamlessly
  • Code-Integrated: Engineering insights directly in your development workflow
  • Knowledge Augmented: Backed by comprehensive engineering knowledge base
  • Realistic Analysis: Expert-level responses with actionable recommendations

🛠️ Troubleshooting

Common Issues

  1. Import Errors: Ensure you're in the backend directory

    cd /home/rpm/claude/mcpmc/src/backend
    
  2. Missing Dependencies: Reinstall with uv

    uv sync --reinstall
    
  3. Claude Code Connection: Verify MCP server is registered

    claude mcp list | grep mcpmc
    

Debug Mode

For verbose logging during development:

PYTHONPATH=/home/rpm/claude/mcpmc/src/backend uv run python -m src.mcpmc

📈 Version Information

  • MCPMC: v1.0.0
  • FastMCP: >=2.12.2
  • Python: >=3.13
  • Expert Agents: 6 specialists with 5+ knowledge base entries

Ready to enhance your development workflow with expert engineering insights! 🎉