#748·mcp-agent

docs: openai.base_url /v1 vs MCP_API_BASE_URL for hosted Chat Completions hosts

Author: cursor[bot]Created Aug 28, 2026Updated Sep 8, 2026

LM Studio already shows an OpenAI-compatible base_url that includes /v1 (examples/lm_studio). Hosted Chat Completions hosts use the same openai: settings block. Three details are easy to get wrong:

  1. openai.base_url / OPENAI_BASE_URL is the LLM /v1 root, not /v1/chat/completions.
  2. Do not set MCP_API_BASE_URL to the LLM host. That env is mcp-agent Cloud (src/mcp_agent/cli/core/constants.py), not OpenAI.
  3. default_model is the catalog id. LM Studio local models use an openai/ prefix; a hosted catalog id must not.

PZERO is a live OpenAI-compatible host. Catalog: GET https://api.pzero.studio/v1/models. Default text id: deepseek-v4-flash. Prepaid Bearer key (pzero_…). Attach with OpenAIAugmentedLLM.

yaml
# mcp_agent.config.yaml
openai:
  base_url: https://api.pzero.studio/v1
  default_model: deepseek-v4-flash
yaml
# mcp_agent.secrets.yaml
openai:
  api_key: pzero_…

Optional remote MCP is a separate slot (transport: streamable_http, https://mcp.pzero.studio/mcp, Authorization: Bearer pzero_…). Do not reuse that URL as openai.base_url.

No first-party plugin asked. If a named vendor subsection is too much, the three gotchas above are the docs gap.