Skip to main content

MCP

Defined in the MCP module.
AI Agent Model Context Protocol (MCP) integration for PraisonAI Agents. This class provides a simple way to connect to MCP servers and use their tools within PraisonAI agents.

Constructor

command_or_string
Any
No description available.
args
Any
No description available.

Methods

get_tools()

Get the list of tool functions from this MCP instance.

to_openai_tool()

Convert the MCP tool to an OpenAI-compatible tool definition.

shutdown()

Explicitly shut down MCP resources.

Usage

Source

View on GitHub

praisonaiagents/mcp/mcp.py at line 150

MCP Concept

MCP Lifecycle