KosmoKrator

crm

Affinity MCP Gateway for AI Agents

Expose Affinity tools to Claude Code, Cursor, Codex, and other MCP clients through the local KosmoKrator MCP gateway.

8 functions 6 read 2 write API key auth

Affinity MCP Gateway

Expose Affinity to MCP clients with `kosmokrator mcp:serve --integration=affinity`.

If the client has never used KosmoKrator before, install it first, then register this integration as a stdio MCP server. The gateway exposes only the selected integration in the example below.

curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
kosmokrator mcp:gateway:install --integration=affinity --write=deny --json
{
  "mcpServers": {
    "kosmokrator-affinity": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=affinity",
        "--write=deny"
      ]
    }
  }
}

Serve Manually

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

MCP Tool Names

KosmoKrator exposes integration tools through the gateway with stable names:

MCP toolSource functionType
integration__affinity__affinity_list_contacts affinity.affinity_list_contacts Read read
integration__affinity__affinity_get_contact affinity.affinity_get_contact Read read
integration__affinity__affinity_create_contact affinity.affinity_create_contact Write write
integration__affinity__affinity_list_organizations affinity.affinity_list_organizations Read read
integration__affinity__affinity_get_organization affinity.affinity_get_organization Read read
integration__affinity__affinity_create_organization affinity.affinity_create_organization Write write
integration__affinity__affinity_list_lists affinity.affinity_list_lists Read read
integration__affinity__affinity_get_current_user affinity.affinity_get_current_user Read read

Write Access

Start with --write=deny for read-only MCP clients. Use --write=ask or --write=allow only when the client and workspace are trusted.