KosmoKrator

ai

Hugging Face MCP Gateway for AI Agents

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

6 functions 5 read 1 write Bearer token auth

Hugging Face MCP Gateway

Expose Hugging Face to MCP clients with `kosmokrator mcp:serve --integration=hugging-face`.

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=hugging-face --write=deny --json
{
  "mcpServers": {
    "kosmokrator-hugging-face": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=hugging-face",
        "--write=deny"
      ]
    }
  }
}

Serve Manually

kosmokrator mcp:serve --integration=hugging-face --write=deny

MCP Tool Names

KosmoKrator exposes integration tools through the gateway with stable names:

MCP toolSource functionType
integration__hugging_face__huggingface_list_models hugging-face.huggingface_list_models Read read
integration__hugging_face__huggingface_get_model hugging-face.huggingface_get_model Read read
integration__hugging_face__huggingface_list_datasets hugging-face.huggingface_list_datasets Read read
integration__hugging_face__huggingface_inference hugging-face.huggingface_inference Write write
integration__hugging_face__huggingface_list_spaces hugging-face.huggingface_list_spaces Read read
integration__hugging_face__huggingface_get_current_user hugging-face.huggingface_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.