Attach a server
Note: Run this on your machine. Try it Yourself cannot start a server or open a path on the host.
One server
tools=MCP(…) points at a server command. Replace the path with a server you actually have.
The string is the command that starts the server. The agent receives whatever tools that server offers.
Example
from praisonai import Agent, MCP
agent = Agent(
instructions="You are a helpful assistant",
tools=MCP("python /path/to/mcp_server.py"),
)
print(agent.start("Which tools do you have?"))Example explained
- MCP — The wrapper that launches a tool server.
- tools — Where the server is attached, in place of a plain function.
Reference: documentation