Get the FREE Ultimate OpenClaw Setup Guide →

clarifai -local

Local MCP server for clarifai.com

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio clarifai-clarifai-mcp-server-local ./mcp_binary --pat YOUR_CLARIFAI_PAT --output-path ~/Desktop/ --default-user-id your_user_id --default-app-id your_app_id

How to use

This MCP server acts as a local bridge to the Clarifai API, exposing Clarifai capabilities (like image generation and inference) through the MCP protocol so clients such as IDE extensions can interact with Clarifai without embedding heavy data in prompts. The server runs on your machine as a standalone binary built from the Go source and is configured via the MCP settings file. Tools exposed by this server include upload_file (to upload a local file as Clarifai input), generate_image (text-to-image generation with optional model and app context), clarifai_image_by_path (inference on a local image), clarifai_image_by_url (inference on an image URL), and search-related tools for inputs, annotations, models, and datasets. The server writes output to the configured path and returns textual results or encoded data as appropriate.

How to install

Prerequisites:

  • Go 1.23 or later
  • Git
  • A Clarifai PAT (Personal Access Token) for API access

Installation steps:

  1. Clone the repository and install dependencies

  2. Build the binary for your platform

    • make build (This builds an executable named mcp_binary in the project root. On Windows it will be mcp_binary.exe.)
  3. Prepare MCP settings (example provided in the README)

    • Create a settings JSON (e.g., cline_mcp_settings.json) and set the path to the built binary and required flags, such as --pat, --output-path, --default-user-id, and --default-app-id.
  4. Run the server locally (or integrate via your MCP client framework).

    • Ensure your MCP client references the server under the configured mcpServers entry.

Notes:

  • You can adjust output paths and default IDs to your environment.
  • The PAT must be kept secure; do not commit it to public repos.

Additional notes

Tips and caveats:

  • Ensure your Go toolchain matches the 1.23+ requirement.
  • If the server cannot reach Clarifai, double-check the PAT and network access.
  • The example configuration writes outputs to the user’s Desktop; modify --output-path as needed.
  • The server exposes read-only resources via MCP for Clarifai models, inputs, and annotations; creation/updating is performed via the Tools interface.
  • If you run into permissions issues on macOS/Linux, ensure the executable has execute permissions (e.g., chmod +x mcp_binary).
  • When testing, you can bypass cache and run tests with: go test -v -count=1 ./...

Related MCP Servers

Sponsor this space

Reach thousands of developers