The Three MCP Layers

Client, light server, and heavy host — which MCP package you need and when

PraisonAI has three distinct MCP roles across three packages — connecting to servers, serving a small tool set, and hosting the full capability registry.

python
from praisonaiagents import Agent, MCP

agent = Agent(
    name="assistant",
    instructions="Use connected tools to help the user.",
    tools=MCP("npx -y @modelcontextprotocol/server-filesystem /tmp"),
)
agent.start("List files in /tmp.")

The snippet above is the client layer. Serving your own agents uses the light or heavy layer instead.

Diagram

Three MCP Layers

📋 MCP Client
praisonaiagents/mcp
Connect to external MCP servers

🟠 Light Server
praisonai-code / praisonai serve mcp
Basic ToolsMCPServer

⚙️ Heavy Host
praisonai-mcp
Full MCPServer + adapters + auth

Which Layer Do I Need?

Diagram

Connect my agent to
an external MCP server

Serve a small tool set
from config

Serve full capabilities /
recipes with auth

What do I want to do?

praisonaiagents[mcp]
MCP client

praisonai-code
praisonai serve mcp

praisonai-mcp
praisonai-mcp serve

The Layers

Each layer maps to one package and one job.

LayerPackageInstallRole
Clientpraisonaiagents/mcp/pip install "praisonaiagents[mcp]"Connect agents to external MCP servers
Light serverpraisonai-codepip install praisonai-codeConfig-driven basic tool hosting (ToolsMCPServer)
Heavy hostpraisonai-mcppip install "praisonai-mcp[all]"Full MCPServer, adapters, recipe bridge, HTTP-stream auth

Client

Connect an agent to any external MCP server and use its tools.

python
from praisonaiagents import Agent, MCP

agent = Agent(
    instructions="You can read and write files.",
    tools=MCP("npx -y @modelcontextprotocol/server-filesystem /tmp"),
)
agent.start("Create notes.txt with 'Hello World'.")

Light server

Serve a small, config-driven tool set from the terminal CLI.

bash
pip install praisonai-code
praisonai serve mcp

Heavy host

Serve the full PraisonAI capability registry, recipes, and auth.

bash
pip install "praisonai-mcp[all]"
praisonai-mcp serve --transport stdio

Best Practices

Client for consuming, host for serving

Use the agents-tier MCP class to consume external tools. Use praisonai-mcp to expose your own agents to MCP clients.

Light server for a fixed tool set

praisonai serve mcp is the lightest way to publish a handful of config-driven tools without the heavy host.

Heavy host for auth and recipes

Reach for praisonai-mcp when you need OAuth 2.1 / OIDC, HTTP-stream transport, or recipe serving.


Related