Skip to main content

MCP Registry Bridge Module

The Registry Bridge adapter connects the praisonaiagents.tools registry to the praisonai.mcp_server registry, enabling tools from PraisonAI Agents to be exposed via MCP without code duplication.

Overview

Key Features:
  • Lazy loading: Tools are only imported when first called
  • Automatic hint inference from tool names
  • Namespace prefixing to avoid collisions
  • No eager imports or performance impact

Code Usage

Check Bridge Availability

Register Bridged Tools

Unregister Bridged Tools

Check Bridge Status

Automatic Hint Inference

The bridge automatically infers tool annotation hints from tool names:

Inference Rules

Lazy Handler Creation

Tools are loaded lazily - the module is only imported when the tool is first called:

Category Extraction

Categories are extracted from tool names:

Integration with MCP Server

Automatic Registration

Server with Bridge

Collision Handling

Skip on Collision (Default)

Error on Collision

Performance Characteristics

Best Practices

  1. Check availability before registering bridged tools
  2. Use namespace prefix to avoid collisions with built-in tools
  3. Register once at server startup, not per-request
  4. Handle missing praisonaiagents gracefully

Example: Conditional Bridge

See Also