Skip to main content
The SDK supports 10 built-in LLM providers and allows custom provider configuration for any OpenAI or Anthropic-compatible endpoint. It can also run models on MCPJam’s own credits, so an eval in CI needs no provider key at all.

Model String Format

All models use the format provider/model-id:

MCPJam-hosted (no provider key)

Prefix a model with mcpjam/ and MCPJam calls the provider for you, billing your organization’s credits. The only secret you need is an MCPJam API key — which is usually already in your CI for saving results.
apiKey falls back to MCPJAM_API_KEY, so in CI you can leave it out entirely.

Available models

mcpjam/anthropic/claude-* and mcpjam/openai/gpt-5*. Other vendors are not hosted — use their own prefix and key.

Which project pays

By default the API key’s organization Default project, which is also where results are saved — so nothing extra to configure. Set MCPJAM_PROJECT_ID to bill a specific project.

Cost

Spend appears under the organization’s usage. Per-run cost attribution for these runs is not wired up yet, so an individual eval run will not show a dollar figure.

Limits

Handled for you, but worth knowing about if you see one in a log:
  • Leases last 30 minutes and are renewed automatically.
  • Each lease has its own spend and call ceiling; the SDK mints a fresh one when it is used up.
  • Your organization’s credit balance and spend budget are checked on every call. “Spending limit reached” means add credits — it is not retried.
  • A suite revokes its leases when it finishes. If you build runs by hand, call releaseMcpjamModelLeases() in an afterAll.

Built-in Providers

Anthropic

Models

Example


OpenAI

Models

Example


Azure OpenAI

Environment Variables

Example


Amazon Bedrock

Authentication uses a Bedrock API key (bearer token). The AWS region is read from AWS_REGION unless a full runtime endpoint is supplied via baseUrls.bedrock (e.g. https://bedrock-runtime.us-east-1.amazonaws.com).

Models

Use any Bedrock model or inference profile ID your AWS account has been granted access to:

Environment Variables

Example


Google (Gemini)

Models

Example


Mistral

Models

Example


DeepSeek

Models

Example


Ollama (Local)

Models

Any locally installed model:
  • llama3
  • codellama
  • mistral
  • mixtral
  • etc.
Ensure Ollama is running locally before use. The API key parameter is required but not used, so pass any string.

Example


OpenRouter

Access many models through one API:

Example


xAI (Grok)

Models

Example


Custom Providers

Add your own OpenAI or Anthropic-compatible endpoints.

CustomProvider Type

Properties

OpenAI-Compatible Example

Anthropic-Compatible Example

LiteLLM Example


Helper Functions

parseLLMString()

Parse a model string into provider and model ID.

Example


createModelFromString()

Create a provider model instance directly.

Example


createCustomProvider()

Create a custom provider configuration object.

Example


Environment Variables Summary