Skip to main content

MCP Server for Phone-a-Friend assistance

Project description

Phone-a-Friend MCP Server 🧠📞

An AI-to-AI consultation system that enables one AI to "phone a friend" (another AI) for critical thinking, long context reasoning, and complex problem solving via OpenRouter.

The Problem 🤔

Sometimes an AI encounters complex problems that require:

  • Deep critical thinking beyond immediate capabilities
  • Long context reasoning with extensive information
  • Multi-step analysis that benefits from external perspective
  • Specialized expertise from different AI models

The Solution �

Phone-a-Friend MCP Server creates a two-step consultation process:

  1. Context + Reasoning: Package all relevant context and send to external AI for deep analysis
  2. Extract Actionable Insights: Process the reasoning response into usable format for the primary AI

This enables AI systems to leverage other AI models as "consultants" for complex reasoning tasks.

Architecture 🏗️

Primary AI → Phone-a-Friend MCP → OpenRouter → External AI (O3, Claude, etc.) → Processed Response → Primary AI

Sequential Workflow:

  1. analyze_context - Gather and structure all relevant context
  2. get_critical_thinking - Send context to external AI via OpenRouter for reasoning
  3. extract_actionable_insights - Process response into actionable format

When to Use 🎯

Ideal for:

  • Complex multi-step problems requiring deep analysis
  • Situations needing long context reasoning (>100k tokens)
  • Cross-domain expertise consultation
  • Critical decision-making with high stakes
  • Problems requiring multiple perspectives

Quick Start ⚡

Configure your MCP client (e.g., Claude Desktop) using the JSON block below—no cloning or manual installation required. The uv runner will automatically download and execute the server package if it isn't present.

Add the following JSON configuration to your MCP client and replace <YOUR_API_KEY> with your key:

{
  "mcpServers": {
    "phone-a-friend": {
      "command": "uvx",
      "args": [
        "phone-a-friend-mcp-server",
        "--provider", "openai",
        "--api-key", "<YOUR_API_KEY>"
      ]
    }
  }
}

That's it! You can now use the phone_a_friend tool in any compatible client. For more options, see the Advanced Configuration section.

Available Tools 🛠️

phone_a_friend

📞 Consult external AI for critical thinking and complex reasoning. Makes API calls to get responses.

fax_a_friend

📠 Generate master prompt file for manual AI consultation. Creates file for copy-paste workflow.

Parameters

phone_a_friend

  • all_related_context (required): General, non-code context such as constraints, tracebacks, or high-level requirements.
  • file_list (required): Array of file paths or glob patterns. Just pass the paths – the server automatically reads those files (skips anything in .gitignore or non-text/binary) and builds the full code context for the external AI.
  • task (required): A clear, specific description of what you want the external AI to do.

fax_a_friend

  • all_related_context (required): Same as above.
  • file_list (required): Same as above.
  • task (required): Same as above.
  • output_directory (required): Directory where the generated fax_a_friend.md master prompt file will be saved.

Advanced Configuration 🔧

This section covers all configuration options, including environment variables, CLI flags, and model selection.

Providers and API Keys

The server can be configured via CLI flags or environment variables.

Provider CLI Flag Environment Variable
OpenAI --provider openai OPENAI_API_KEY
OpenRouter --provider openrouter OPENROUTER_API_KEY
Anthropic --provider anthropic ANTHROPIC_API_KEY
Google --provider google GOOGLE_API_KEY

CLI Example:

phone-a-friend-mcp-server --provider openai --api-key "sk-..."

Environment Variable Example:

export OPENAI_API_KEY="sk-..."
phone-a-friend-mcp-server

Model Selection

You can override the default model for each provider.

Provider Default Model
OpenAI o3
Anthropic Claude 4 Opus
Google Gemini 2.5 Pro Preview 05-06
OpenRouter anthropic/claude-4-opus

Override with CLI:

phone-a-friend-mcp-server --model "o3"

Override with Environment Variable:

export PHONE_A_FRIEND_MODEL="o3"

Additional Options

Feature CLI Flag Environment Variable Default
Temperature --temperature 0.5 PHONE_A_FRIEND_TEMPERATURE 0.4
Base URL --base-url ... PHONE_A_FRIEND_BASE_URL Provider default

Use Cases 🎯

  1. In-depth Reasoning for Vibe Coding
  2. For complex algorithms, data structures, or mathematical computations
  3. Frontend Development with React, Vue, CSS, or modern frontend frameworks

License 📄

MIT License - see LICENSE file 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

Built Distribution

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

File details

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

File metadata

  • Download URL: iflow_mcp_abhishekbakat_phone_a_friend_mcp_server-0.2.0.tar.gz
  • Upload date:
  • Size: 88.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_abhishekbakat_phone_a_friend_mcp_server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2e497b01a4cdd58df1b955ad3cb0f289f81872c46bfcdd107ef8184c9c3c3877
MD5 765450c9730b2b56c3574df7d315c805
BLAKE2b-256 80eecf2248d23156e5cba74f604e39fcb6ff13275c344d83b7d60f358744567b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iflow_mcp_abhishekbakat_phone_a_friend_mcp_server-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_abhishekbakat_phone_a_friend_mcp_server-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 addcbb39775501670dac7ce21b3762eafc440418b1055a581a257a1019ff9007
MD5 b4d8ef7f8a73c9e2367a4a98bc7ddf3f
BLAKE2b-256 0306318f7f13ce1668312908c9d3ea6267f03c6617f1bccfb637754998eca3c7

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