Skip to main content

AlphaAvatar Framework plugin for MCP service

Project description

MCP Plugin for AlphaAvatar

A high-performance Model Context Protocol (MCP) orchestration layer for AlphaAvatar.

This plugin provides a unified, parallel, and latency-optimized interface for discovering and invoking tools exposed by one or more MCP servers — without relying on LiveKit’s native MCP tool injection chain.

We intentionally disable LiveKit’s native “inject each MCP tool into Agent as separate tool” mechanism.

Why?

  • Too many tools degrade Agent reasoning performance.
  • Serial tool calls increase latency.
  • Tool explosion harms LLM decision quality.

Instead, we provide a single unified MCP interface that:

  • Supports tool discovery
  • Enables parallel execution
  • Coordinates multi-server workflows
  • Improves overall Agent tool-call performance

Overview

The MCP Plugin acts as a Tool Orchestrator Middleware between AlphaAvatar Agents and external MCP servers.

It enables:

  • 🔍 Tool discovery across heterogeneous MCP servers
  • ⚡ Parallel tool execution (concurrent dispatch)
  • 🧠 Workflow coordination across multiple servers
  • 🔗 Unified abstraction for diverse capabilities (RAG, search, automation, data APIs, etc.)

Unlike traditional tool injection approaches, this design:

  • Prevents exponential tool growth inside the Agent
  • Reduces reasoning noise
  • Avoids serial execution bottlenecks
  • Improves scalability for multi-server MCP deployments

Core Architecture

AlphaAvatar Agent
        │
        ▼
    MCPHost (Unified Tool)
        │
        ├── search_tools()
        └── call_tools()
                │
                ├── MCP Server A
                ├── MCP Server B
                └── MCP Server C

The Agent only sees one tool: MCP.

Internally, MCPHost:

  1. Discovers relevant tools
  2. Validates schemas
  3. Dispatches calls in parallel
  4. Aggregates structured responses

Performance Design Philosophy

❌ What We Avoid

  • Injecting hundreds of tools into the Agent
  • Serial tool invocation chains
  • Tool schema explosion
  • Repeated LLM tool selection loops

✅ What We Enable

  • Single unified MCP interface
  • Parallel tool dispatch
  • Multi-server orchestration
  • Scalable architecture

Installation

pip install alpha-avatar-plugins-mcp

Usage

Step 1️⃣ Enable MCP in Configuration

Enable MCP and register remote MCP servers inside your yaml configuration file.

enable_mcp: true

mcp_servers:
  livekit-docs:
    url: "https://docs.livekit.io/mcp"
    instruction: >
      LiveKit Docs MCP Server provides unified access to the LiveKit ecosystem,
      allowing you to search documentation, explore GitHub code across livekit
      and livekit-examples repositories, retrieve package changelogs, and browse
      Python Agents SDK examples—all in one place.

  github-copilot:
    url: "https://api.githubcopilot.com/mcp/"
    headers:
      Authorization: "Bearer <GITHUB_PAT>"
    instruction: >
      The GitHub MCP server (via GitHub Copilot) enables AI agents to interact
      with repositories, issues, pull requests, and code through a standardized
      MCP interface.

🔐 Environment Variables

Sensitive credentials such as <GITHUB_PAT> should be injected via environment variables:

export GITHUB_PAT=your_personal_access_token

At runtime:

  • The system automatically resolves <GITHUB_PAT>
  • Injects it into the request headers
  • Keeps secrets out of version-controlled config files

Step 2️⃣ Start AlphaAvatar

Once MCP is enabled and servers are configured:

alphaavatar serve <yarm-file-path>

During startup:

  1. MCPHost initializes
  2. All configured MCP servers are connected
  3. Server metadata is injected into MCP tool description
  4. MCP becomes available as a unified tool inside the Agent

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

alpha_avatar_plugins_mcp-0.5.4.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

alpha_avatar_plugins_mcp-0.5.4-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file alpha_avatar_plugins_mcp-0.5.4.tar.gz.

File metadata

  • Download URL: alpha_avatar_plugins_mcp-0.5.4.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for alpha_avatar_plugins_mcp-0.5.4.tar.gz
Algorithm Hash digest
SHA256 2db337c56000b4dd46a6581eecb3d3d1e719447da5ec0ac24c98707136c988aa
MD5 ac1d5dd3e6a400da066c2bf6596d9fc8
BLAKE2b-256 aa4e141c2b11c0bbcea5bbaeb65607b2fd1b490a1b395b29d2b49274e3c87204

See more details on using hashes here.

File details

Details for the file alpha_avatar_plugins_mcp-0.5.4-py3-none-any.whl.

File metadata

File hashes

Hashes for alpha_avatar_plugins_mcp-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 aa5a1a944828d9461e2b17b933a0128993ab876a31a519c8b6aef73baaa2d98a
MD5 cc93a0436e0eef0a9d3ba1d5716703a1
BLAKE2b-256 da98aa641b43f44533ca9ab3bdfe17bb19210e48efea3bf18c7da3de3e323fec

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