Usage Overview
How to use MCP servers from code or chat UIs
MCP (Model Context Protocol) servers are client-agnostic.
You can connect them to main AI services like ChatGPT, Claude, Grok and Gemini.
OR use them from code with a structure like:
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStreamableHTTP
server = MCPServerStreamableHTTP("https://api.mcphero.app/mcp/{server_id}/mcp")
agent = Agent("openai:gpt-4o", toolsets=[server])
result = await agent.run("your instruction")
print(result.output)How to Use MCP
Clients & Guides
| Usage | Client | Guide |
|---|---|---|
| Chat UI | ChatGPT | /docs/chat-ui/chatgpt |
| Chat UI | Claude | /docs/chat-ui/claude |
| Chat UI | Grok | /docs/chat-ui/grok |
| Programmatic | LangChain | /docs/programmatic-usage/langchain |
| Programmatic | CrewAI | /docs/programmatic-usage/crewai |
| Programmatic | OpenAI Agents | /docs/programmatic-usage/openai-agents |
| Programmatic | PydanticAI | /docs/programmatic-usage/pydantic-ai |
| Programmatic | HTTPX | /docs/programmatic-usage/httpx |
| Programmatic | AutoGen | /docs/programmatic-usage/autogen |