KosmoKrator

ai

Replicate MCP Integration for OpenAI Agents SDK

Connect Replicate to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 6 read 1 write API key auth

Connect Replicate to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

Replicate MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "mcpServers": {
    "kosmokrator-replicate": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=replicate",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=replicate --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Replicate instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Replicate Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the Replicate integration catalog.

MCP toolSource functionTypeDescription
integration__replicate__replicate_list_predictions replicate.replicate_list_predictions Read List recent Replicate predictions. Returns prediction IDs, statuses, model versions, and outputs.
integration__replicate__replicate_get_prediction replicate.replicate_get_prediction Read Get detailed information about a specific Replicate prediction by its ID, including status, output, logs, and error details.
integration__replicate__replicate_create_prediction replicate.replicate_create_prediction Write Create a new prediction on Replicate by providing a model version and input. Returns the prediction object with status. Poll get_prediction for results.
integration__replicate__replicate_list_models replicate.replicate_list_models Read List available Replicate models. Returns model names, owners, descriptions, and latest version IDs.
integration__replicate__replicate_get_model replicate.replicate_get_model Read Get detailed information about a specific Replicate model by owner and name, including description, versions, and input schema.
integration__replicate__replicate_list_collections replicate.replicate_list_collections Read List curated model collections on Replicate. Returns collection names, descriptions, and model slugs.
integration__replicate__replicate_get_current_user replicate.replicate_get_current_user Read Get the current Replicate user profile and billing information.

Related Replicate Pages