KosmoKrator

healthcare

Weave MCP Integration for OpenAI Agents SDK

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

7 functions 7 read 0 write Bearer token auth

Connect Weave 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.

Weave MCP Config for OpenAI Agents SDK

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

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

Run the Gateway Manually

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

Why Use KosmoKrator Here

Scoped tools

Expose only Weave 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.

Weave Tools Visible to OpenAI Agents

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

MCP toolSource functionTypeDescription
integration__weave__weave_list_patients weave.weave_list_patients Read Search and list patients from Weave. Returns patient records with names, contact info, and metadata. Use the query parameter to search by name, phone, or email.
integration__weave__weave_get_patient weave.weave_get_patient Read Retrieve a single patient by ID. Returns full patient details including demographics and contact information.
integration__weave__weave_list_appointments weave.weave_list_appointments Read List appointments from Weave with optional date range filtering. Returns appointment records with patient info, scheduled times, and status.
integration__weave__weave_get_appointment weave.weave_get_appointment Read Retrieve a single appointment by ID. Returns full details including patient info, scheduled time, duration, and status.
integration__weave__weave_list_messages weave.weave_list_messages Read List patient messages from Weave with optional type filtering. Returns message records with sender, recipient, content previews, and status.
integration__weave__weave_get_message weave.weave_get_message Read Retrieve a single message by ID. Returns full message content, sender, recipient, timestamps, and delivery status.
integration__weave__weave_get_current_user weave.weave_get_current_user Read Get the currently authenticated Weave user profile. Returns user details including name, email, role, and organization info.

Related Weave Pages