An MCP server exposes tools or data through a standardized interface so compatible AI applications can discover and invoke them. Each server supplies the tool schema and runs its execution logic; MCP standardizes the interface, not authentication, authorization, or endpoint security. section 7.0 section 7.3
A product-search server can use a CSV catalog instead of a live commerce API, keeping the tool portable and testable. In an end-to-end request, an AI runtime discovers the server’s search schema, routes a model-generated call to it, and uses its JSON results to answer the user. A local endpoint suits testing; deployment requires a secure public-facing endpoint. section 7.4 section 7.6.2
curl https://api.openai.com/v1/responses \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-mini",
"input": "I need a lightweight vest under $100.",
"tools": [
{
"type": "mcp",
"server_url": "http://localhost:8000",
"require_approval": "never"
}
]
}'
Example Responses API request that connects an AI runtime to an MCP server. Automatic tool execution without approval is suitable only for simplicity; sensitive actions need approval or custom controls. section 7.6.2











