MCP Servers

Use Foza models with Model Context Protocol (MCP) servers

Setup#

Any MCP-compatible client can connect to the Foza gateway using the OpenAI-compatible API.

1

Get your API key

Create an API key at Console → API Keys and subscribe it to a model.

2

Configure your MCP client

In your MCP client configuration, set the LLM provider to use:

  • Base URL: https://api.foza.ai/v1
  • API Key: sk-foza-xxxxx
  • Model: Enter your model slug, e.g., anthropic/claude-sonnet-4.6
3

Example: Using with MCP SDK

import { OpenAI } from "openai";
 
const client = new OpenAI({
  baseURL: "https://api.foza.ai/v1",
  apiKey: "sk-foza-xxxxx",
});
 
// Use with your MCP server tools
const response = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-4.6",
  messages: [{ role: "user", content: "Hello!" }],
  tools: mcpTools, // Your MCP server tools
});

The Foza gateway is fully OpenAI-compatible, so any MCP client that supports OpenAI providers will work out of the box.