320px
5-minute setup

Run 320px with a local AI

Connect Ollama, LM Studio, Claude Desktop, or Cursor to 320px over MCP — no cloud API key for your model required. Your contacts and campaigns stay on 320px's edge; your model runs wherever you run it.

Why run a local model?

  • Privacy. Your prompts — including any contact data you mention — never leave your machine.
  • Cost. Inference is free once the model is downloaded. Only the 320px MCP calls count against your plan.
  • Compliance. Regulated industries (GDPR, HIPAA, finance) can keep all inference on-premises and still run full marketing automation.
  • Any model. Works with Llama 3, Qwen 2.5, Mistral, Gemma, DeepSeek, Phi-4 — anything your MCP client can drive.

Before you start

  1. A 320px account — sign up free, no credit card.
  2. Your 320px API key — Studio → Settings → API Keys → New key. Copy it now.
  3. One of the MCP clients below installed on your machine.

Step 1 — Get your API key

  1. Open Studio.
  2. Navigate to Settings → API Keys.
  3. Click New key, give it a name (e.g. local-ollama), and copy the value.
Keep it secret. The key grants full tenant access. Don't commit it to git or paste it into a shared config.

Step 2 — Configure your MCP client

Ollama + any OpenAI-compatible MCP bridge

Ollama serves a local model at http://localhost:11434. Use mcp-server-fetch or a compatible bridge to expose MCP to Ollama. Then add 320px to the bridge config:

{
  "mcpServers": {
    "320px": {
      "transport": "http",
      "url": "https://api.320px.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Replace YOUR_API_KEY with the key from Step 1. Restart the bridge. Ollama will now have access to all 320px MCP tools.

LM Studio

LM Studio 0.3+ has built-in MCP support. In the MCP panel, click Add server:

  • Transport: HTTP
  • URL: https://api.320px.com/mcp
  • Authorization header: Bearer YOUR_API_KEY

Save and reload. The 320px tool list will appear in the tools panel.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "320px": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"],
      "env": {
        "MCP_SERVER_URL": "https://api.320px.com/mcp",
        "MCP_AUTH_HEADER": "Authorization",
        "MCP_AUTH_VALUE": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Restart Claude Desktop. You'll see 320px tools in the tool picker.

Claude Desktop connects Claude (the cloud model) via a local MCP bridge — your prompts still go to Anthropic, but your 320px data only leaves via the MCP tool calls you explicitly make.

Cursor

Open Cursor → Settings → MCP and add a new server:

{
  "320px": {
    "transport": "http",
    "url": "https://api.320px.com/mcp",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
}

Save. Cursor's agent mode now has direct access to your contacts, campaigns, segments, and analytics.

Step 3 — Verify the connection

In your MCP client, send:

Which organization am I connected to?

The model will call get_current_organization. A successful response looks like:

[organization] Acme Inc (id: org_abc123)
--------------------------------------------------------------
{
  "organization": { "id": "org_abc123", "name": "Acme Inc", "slug": "acme" },
  "result": {
    "id": "org_abc123",
    "name": "Acme Inc",
    "slug": "acme",
    "source": "user-linked API key"
  }
}

Every tool response is prefixed with that [organization] header so you always know which tenant is being acted on. If you see an auth error, double-check the API key and that you pasted it without trailing spaces.

Step 4 — Run your first workflow

Try this prompt:

List my contacts, then show me my campaigns. Pick one campaign
and fetch its stats.

Your model will chain list_contactslist_campaignsget_campaign_stats. Every step appears in the Studio audit log in real time — you can pause or cancel at any point.

Notice what's not in the prompt: no organization ID. The active org is implicit — it comes from your API key. If you belong to multiple orgs, ask the model to "list my organizations, then switch to <name>"; the switch persists 24 hours across calls made with the same key.

Tips for working with local models

  • Larger context window = better chaining. Models with 32k+ context handle multi-step campaign workflows more reliably (Llama 3 70B, Qwen 2.5 72B, Mistral Large).
  • Confirm the org before writes. The [organization] header on every response tells you which tenant is active — glance at it before approving any create_contact or send_campaign call.
  • Switch orgs without re-auth. One API key + switch_organization beats juggling one key per tenant. The override lives in KV for 24h.
  • Tools are namespaced by verb. list_* is read-only, get_* fetches a single row, create_*/send_* write. A cautious system prompt can whitelist just the list_/get_ tools.

Next steps