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

UsageClientGuide
Chat UIChatGPT/docs/chat-ui/chatgpt
Chat UIClaude/docs/chat-ui/claude
Chat UIGrok/docs/chat-ui/grok
ProgrammaticLangChain/docs/programmatic-usage/langchain
ProgrammaticCrewAI/docs/programmatic-usage/crewai
ProgrammaticOpenAI Agents/docs/programmatic-usage/openai-agents
ProgrammaticPydanticAI/docs/programmatic-usage/pydantic-ai
ProgrammaticHTTPX/docs/programmatic-usage/httpx
ProgrammaticAutoGen/docs/programmatic-usage/autogen

On this page