Skip to main content
Define MCP servers directly in YAML workflows to create agents with external tool capabilities in a declarative way.
The user declares MCP servers in YAML; PraisonAI wires those tools into the agent at startup.

How It Works

Quick Start

1

Create YAML Workflow

Define an agent with MCP servers in YAML:
2

Run the Workflow

Execute the YAML workflow with MCP integration:

Configuration Schema

Basic MCP Server

With Environment Variables

Multiple Servers


Complete Example

Here’s a production-ready YAML configuration:
Run with:

Important Limitations

Per-server tool filtering (tools.include/exclude keys) is not yet supported by the YAML/TOML MCP server schema. Apply filtering in Python via MCP(allowed_tools=...) after calling mcp.get_tools() in your application code.

Current Limitation Example

Workaround in Python


Environment Variable Patterns

Using .env Files

Conditional Enabling


Best Practices

Never hardcode API keys in YAML files. Always use environment variable substitution with ${VARIABLE_NAME} syntax.
Use the enabled field to control which servers are active. This allows you to have optional integrations that only activate when configured.
Add comments explaining what each server does and what environment variables it requires. This helps with team collaboration.
Before deploying, test your YAML configuration locally to ensure all servers connect properly and required environment variables are available.

Load MCP Tools

Wire configured MCP servers into agents with one line

MCP CLI

Configure and manage MCP servers from the command line