Skip to main content
The --mcp flag enables integration with Model Context Protocol (MCP) servers, allowing agents to use external tools and services.
All praisonai mcp <cmd> host commands (serve, list-tools, doctor, serve-recipe) also run as praisonai-mcp <cmd> when only the standalone praisonai-mcp package is installed. Config commands (list, add, remove, test, sync, tools, describe, status, run, auth, logout) require praisonai-code; running one without it prints:

Quick Start

List MCP servers example

Usage

Manage MCP Server Configuration

Basic MCP Server

Expected Output:

MCP with Environment Variables

Expected Output:

Multiple Environment Variables

Filesystem

Read, write, and list files

Brave Search

Web search capabilities

GitHub

GitHub repository operations

PostgreSQL

Database queries

Slack

Slack messaging

Google Drive

Google Drive access

Use Cases

File Operations

Web Research

Database Queries

Expected Output:

GitHub Operations

Combine with Other Features

MCP Server Configuration

Command Format

Examples:
  • --mcp "npx -y @modelcontextprotocol/server-filesystem ."
  • --mcp "python -m mcp_server"
  • --mcp "node ./my-server.js"

Environment Variables Format

Never commit API keys or secrets to version control. Use environment variables or secure secret management.

Best Practices

Test MCP servers independently before using them with agents to ensure they’re working correctly.

Security

Use environment variables for sensitive credentials

Testing

Test MCP servers with simple commands first

Permissions

Grant minimum necessary permissions to MCP servers

Monitoring

Use --metrics to track MCP tool usage

Troubleshooting

MCP Configuration Management

In addition to the --mcp flag, you can manage MCP server configurations using the praisonai mcp command.

List Configurations

Expected Output:

Create Configuration

Example:

Show Configuration

Expected Output:

Enable/Disable Configuration

Delete Configuration

Verify MCP Setup

Check server health and inspect available tools before wiring them into agents.
For ad-hoc server runs, use praisonai mcp serve --transport stdio (local) or --transport http-stream (remote). Saved configs live under ~/.praisonai/mcp/.

Configuration File Format

MCP configs are stored as JSON files in ~/.praisonai/mcp/:

Storage Locations

Legacy .praison/mcp.json paths are still recognised for backward compatibility but ~/.praisonai/mcp/ is the canonical location.

Python API