Custom Python MCP Server
Quick Start
Requirements
- Python 3.10 or higher
- Conda for environment management
- yfinance package for stock data
- mcp-python-sdk for MCP server implementation
- OpenAI API key (for the agent’s LLM)
Features
Custom Tools
Create your own custom tools with Python.
MCP Integration
Seamless integration with Model Context Protocol.
Type Hints
Strong typing for better code reliability.
Async Support
Built-in support for asynchronous functions.
Implementation Details
FastMCP Class
TheFastMCP class from the mcp-python-sdk package provides a simple way to create MCP servers in Python:
Agent Integration
To use your custom MCP server with PraisonAI agents, use theMCP class to specify the command to run your Python script:

