Skip to main content

Claude Command - AI command center for Claude Code

Project description

Claude Command MCP Server

Real-time AI collaboration command center for Claude Code CLI with dynamic multi-provider support.

Overview

Claude Command is an MCP (Model Context Protocol) server that enables live three-way conversations between Claude Code CLI, multiple AI providers, and human developers. Built with fastMCP, it supports dynamic provider switching and real-time streaming conversations.

Features

  • Multi-Provider Support: Gemini, OpenAI, and Anthropic models
  • Dynamic Provider Switching: Call any AI provider on-demand
  • Real-Time Streaming: Watch conversations unfold live via tail -f
  • Context Preservation: Full conversation history maintained across providers
  • Background Processing: Non-blocking AI calls with threading
  • Session Management: Persistent conversation storage in JSON format

Architecture

Built using fastMCP framework with modular client architecture:

Claude Code CLI (Hub)  fastMCP Server  [Gemini  OpenAI  Anthropic]

Installation

Prerequisites

Install Dependencies

git clone https://github.com/shaneholloman/mcp-claude-command
cd mcp-claude-command
uv sync

Configure API Keys

Set environment variables:

export GEMINI_API_KEY="your_gemini_key"
export OPENAI_API_KEY="your_openai_key"
export ANTHROPIC_API_KEY="your_anthropic_key"

Or use command line arguments:

uv run python -m claude_command \
  --gemini-api-key YOUR_GEMINI_KEY \
  --openai-api-key YOUR_OPENAI_KEY \
  --anthropic-api-key YOUR_ANTHROPIC_KEY

Add to Claude Code

Install as a global UV tool and configure with Claude CLI:

# Install claude-command globally
uv tool install .

# Configure with Claude CLI (includes all API keys for multi-provider support)
# Option 1: Using environment variables (if you have them set)
claude mcp add claude-command claude-command \
  -e GEMINI_API_KEY="$GEMINI_API_KEY" \
  -e CLAUDE_COMMAND_OPENAI_API_KEY="$OPENAI_API_KEY" \
  -e CLAUDE_COMMAND_ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
  --scope user

# Option 2: Using your actual API keys directly (replace with your real keys)
claude mcp add claude-command claude-command \
  -e GEMINI_API_KEY="AIzaSyBxxxxxxxxxxxxxxxxxxxxxxx" \
  -e CLAUDE_COMMAND_OPENAI_API_KEY="sk-proj-xxxxxxxxxxxxxxxxxxxxxxx" \
  -e CLAUDE_COMMAND_ANTHROPIC_API_KEY="sk-ant-api03-xxxxxxxxxxxxxxx" \
  --scope user

# Verify configuration
claude mcp list
claude mcp get claude-command

# Verify API keys are properly configured (incontrovertible proof)
claude mcp get claude-command | grep -A 10 "Environment:"

Usage

Available Tools

Tool Description Parameters
claude_command_query Interactive conversation with AI prompt, conversation_id, temperature, provider
claude_command_review Code review by AI code, focus, provider
claude_command_brainstorm Creative brainstorming session topic, context, provider
claude_command_conversation_history Retrieve conversation history conversation_id
claude_command_status Server health and configuration -
claude_command_conversations_list List all conversation files -
claude_command_conversations_cleanup Clean up old conversations keep_count

Provider Selection

Specify AI provider for any tool:

# Use default provider (first available)
claude_command_query prompt="Hello!"

# Use specific provider
claude_command_query prompt="Hello!" provider="gemini"
claude_command_query prompt="What do you think?" provider="openai"
claude_command_query prompt="Your perspective?" provider="anthropic"

Live Streaming

Watch conversations in real-time:

tail -f ~/claude-command/live_stream.txt

Multi-AI Conversations

Create conversations between multiple AI providers:

  1. Start conversation with one provider
  2. Use different providers for follow-up responses
  3. Each AI sees full conversation context
  4. Watch live streaming for real-time collaboration

File Locations

All conversation data stored in ~/claude-command/:

  • Live Stream: live_stream.txt - Real-time conversation output
  • Sessions: session_YYYY-MM-DD_HH-MM-SS_XXXXXXXX.json - Session files
  • Conversations: conversation_YYYY-MM-DD_HH-MM-SS_XXXXXXXX.json - Individual conversations

Configuration

Settings

Configure via environment variables or command line:

  • GEMINI_API_KEY / --gemini-api-key
  • OPENAI_API_KEY / --openai-api-key
  • ANTHROPIC_API_KEY / --anthropic-api-key
  • CONVERSATIONS_DIR / --conversations-dir (default: ~/claude-command)
  • DEFAULT_TEMPERATURE / --temperature (default: 0.7)

Models

Default models by provider:

  • Gemini: gemini-2.0-flash-exp
  • OpenAI: gpt-4
  • Anthropic: claude-3-5-sonnet-20241022

Development

Project Structure

src/claude_command/
├── server.py              # Main MCP server with fastMCP tools
├── settings.py            # Configuration management
├── sessions.py            # Conversation session handling
└── clients/
    ├── interface.py       # AI client interface
    ├── gemini.py         # Gemini implementation
    ├── openai.py         # OpenAI implementation
    ├── anthropic.py      # Anthropic implementation
    └── factory.py        # Client factory

Local Development

git clone https://github.com/shaneholloman/mcp-claude-command
cd mcp-claude-command
uv sync
uv run python -m claude_command --gemini-api-key YOUR_KEY

Requirements

  • Claude Code CLI (will NOT work with Claude Desktop)
  • At least one API key (Gemini, OpenAI, or Anthropic)
  • Python 3.10+
  • uv package manager

License

MIT License - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_command-0.2.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_command-0.2.0-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file claude_command-0.2.0.tar.gz.

File metadata

  • Download URL: claude_command-0.2.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for claude_command-0.2.0.tar.gz
Algorithm Hash digest
SHA256 76f33d61807111b59403091204d97d842556a77f86ec5e35e7d8f8e6d37e344d
MD5 24c6fd2ddcee8538ab8182606c2c5b6e
BLAKE2b-256 8fa7b1bc2ea369268039ba335bfff98d5913ba9952fdd7924b714becde540fb9

See more details on using hashes here.

File details

Details for the file claude_command-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_command-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f0fc82c07835c3ce7276f8bda02c822777920ab2a4d2df504c0fcd596aebf2d
MD5 9f878644b813c547f1918be77ccd5018
BLAKE2b-256 bdfa3ac2567663cf82f0f124a4f9539749b0b62ff8f1cfdac9777b75018ad344

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page