Guide for creating and using custom Python MCP servers with PraisonAI agents
Create MCP Server
app.py
with your custom MCP server implementation:Install Dependencies
Create Agent Integration
stock_agent.py
with the following code:Run the Agent
FastMCP
class from the mcp-python-sdk
package provides a simple way to create MCP servers in Python:
MCP
class to specify the command to run your Python script: