Skip to main content
MCP (Model Context Protocol) lets agents connect to external tool servers, instantly adding file system access, database queries, API integrations, and more.
The user asks to inspect the filesystem; the agent calls MCP tools on the connected server.

Which MCP package do I need?

Three packages cover three MCP roles — connecting, light serving, and full hosting. This page covers the client layer. To serve your own agents, see the praisonai-mcp Package and The Three MCP Layers.

Quick Start

1

Connect to an MCP server

2

SSE-based MCP server

3

Streamable HTTP MCP server

Requires an up-to-date mcp package (pip install -U 'mcp'). The transport is powered by the official SDK’s streamablehttp_client.Pass the full endpoint URL your server exposes. Bare-host URLs are no longer rewritten to /mcp (see PraisonAI #3032).
4

Multiple MCP servers


How It Works


MCP Server Types

Remote Streamable HTTP servers connect through the official MCP SDK client.

Common Patterns

Pattern 1 — File management agent

Pattern 2 — Database agent

Pattern 3 — GitHub integration


Best Practices

Start with the official @modelcontextprotocol npm packages for common integrations (filesystem, SQLite, GitHub, etc.). They’re well-tested and actively maintained.
When using the filesystem MCP server, pass the narrowest directory path you need. Giving access to / or /home when you only need /app/data creates unnecessary risk.
Never hardcode API keys or tokens in your code. Pass them as environment variables to the MCP server via the env parameter, and source them from your environment or secrets manager.
Agents can use tools from multiple MCP servers simultaneously. Unpack each server’s tools with *MCP(...) and combine them into a single tools list for maximum capability. Loading via load_mcp_tools auto-namespaces each server’s tools (e.g. filesystem_search, github_search) so overlapping names never collide.

Tools — built-in tools and custom tool functions

MCP Tool Filtering — filter which tools to expose per agent