Skip to main content

Claude Command - AI command center for Claude Code

Project description

Claude Command MCP Server

Real-time AI 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:"

[!IMPORTANT] Now, restart Claude's CLI. This is important.

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.3.0.tar.gz (26.4 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.3.0-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for claude_command-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ba1a40edca702236baecf412a3006b11c8fb207b0c86d23b53451c0de06ee26e
MD5 e550bc23deac567ac8c386c90cece77d
BLAKE2b-256 4ee1a466caad7dbf2fbba9be37a48c0e8e31af27b19bf82bb77df476b29bfd52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for claude_command-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b9ea44001647dd931c2a89ec6555cf6ed09e82f9026d2fd7c908a13cccbc48e
MD5 f2d22a6b34d603a9ca2df436991377db
BLAKE2b-256 baad330853eb3f014abc58210d9bc076f5b80f9528357f9b3ae8b7a6f6b9ffac

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