Connect the Tantra MCP server

Install the Tantra MCP server, give it your API key, and use Tantra campaigns, contacts, and templates as tools inside Claude or Cursor.

intermediate5 min readUpdated Sat Jul 25 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

Open in Tantra

These open the app in a new tab. You may be asked to sign in.

Overview

The Tantra MCP server lets an AI client such as Claude or Cursor work with your Tantra account through tools. Once connected, you can ask the client to list campaigns, create contacts, or read dashboard metrics, and it calls Tantra for you. This article shows how to install the server, give it your API key, and confirm it works.

MCP stands for Model Context Protocol, an open standard that lets AI clients call external tools. The Tantra MCP server is a thin proxy that forwards each tool call to the Tantra API.

How it works

The server runs as a small Node program. You start it, give it a Tantra API key, and point your AI client at it. When you ask the client to do something in Tantra, the client calls one of the server's tools, the server calls the Tantra API with your key, and the result comes back to the client.

There are two ways to run the server:

  • Per user (stdio): you run the server locally for yourself. This is the common choice. Your API key lives in the server's environment.
  • Hosted (Streamable HTTP): one shared server serves many people, and each person sends their own key with each request. Use this only if you are hosting a shared server for a team.

Most people want the per user setup. The rest of this article covers it.

Before you start

  • A Tantra API key. Create one on the API Keys page and copy the tk_live_ value at creation. See Create and manage API keys.
  • Node.js installed on your machine.
  • The Tantra MCP server files. Get the server repository and install it.

Step-by-step: install the server

Run these commands in the Tantra MCP server folder:

npm install
npm run build

The build step compiles the server so the client can run it. It produces a dist/index.js file that your client will point at.

Step-by-step: give the server your API key

The server reads your key from an environment variable named TANTRA_API_KEY. You set this in your client's configuration, shown in the next step. You can also set TANTRA_API_URL to choose the backend. It defaults to the production Tantra API.

Step-by-step: add the server to your client

Claude Code

Run this command, replacing the key with your own and the path with the location of the built server on your machine:

claude mcp add tantra \
  --env TANTRA_API_URL=https://api.usetantra.com/api/v1 \
  --env TANTRA_API_KEY=tk_live_your_key_here \
  -- node "/path/to/Tantra MCP/dist/index.js"

Claude Desktop or Cursor

Add an entry to the client's MCP config file, for example claude_desktop_config.json or .mcp.json. Replace the key and the path with your own:

{
  "mcpServers": {
    "tantra": {
      "command": "node",
      "args": ["/path/to/Tantra MCP/dist/index.js"],
      "env": {
        "TANTRA_API_URL": "https://api.usetantra.com/api/v1",
        "TANTRA_API_KEY": "tk_live_your_key_here"
      }
    }
  }
}

The client picks up this config and starts the server when it launches.

Step-by-step: confirm the connection

Ask your client to run the whoami tool, or run the built-in inspector from the server folder:

npm run inspect

whoami returns your Tantra profile. If it returns your account, the key works and the connection is good.

What happens next

Once connected, the tools below appear in your client. Ask the client in plain language, for example "list my active campaigns," and it picks the right tool. Each tool returns the Tantra API's JSON response. Actions like starting a campaign take effect in Tantra right away, the same as if you did them in the app.

Available tools

The server exposes these tools. The set is the same whether you run it per user or hosted.

ToolWhat it does
whoamiReturns your account profile. Use it to check that your key works.
list_campaignsLists your campaigns. Filter by status, tag, or page.
get_campaignGets one campaign by its id.
get_campaign_statsReturns delivery and RSVP statistics for a campaign.
create_campaignCreates a calendar or smart calendar campaign.
start_campaignStarts a campaign and triggers its first batch.
pause_campaignPauses a running campaign.
list_contactsLists contacts. Filter by search, tags, list, or campaign.
list_contact_listsLists all your contact lists.
create_contactCreates a single contact. First name and a valid email are required.
import_contactsBulk imports contacts into a named list, up to 50,000 per call.
list_templatesLists your message templates.
get_dashboard_metricsReturns aggregated dashboard metrics for the account.

Best practices

  • Use a dedicated API key for the MCP server, named so you can recognize it. You can revoke it without affecting other integrations.
  • Keep your key out of shared files. It is a live secret.
  • After a client update, run npm run build again so the server files are current.

Common mistakes

  • Pointing the client at the source folder instead of the built dist/index.js. Build first, then point at the built file.
  • Using an expired or revoked key. Create a fresh key and update the config.
  • Forgetting to rebuild after updating the server, which can leave old tools in place.

Troubleshooting

SymptomCauseFix
Startup error saying no credentials are setNeither an API key nor a full Clerk email and password set is presentSet TANTRA_API_KEY to your tk_live_ key in the client config
Tantra returns a 401 after a valid keyThe key was revoked or rotated, or the backend URL is wrongCreate a new key, or check TANTRA_API_URL
Tools do not appear in the clientThe server was not built, or the client points at the wrong fileRun npm run build and point the client at dist/index.js

FAQ

Which clients work with the Tantra MCP server?

Any MCP compatible client, including Claude Desktop, Claude Code, and Cursor.

Do I need to keep the server running myself?

For the per user setup, your client starts and stops the server for you based on its config. You do not run it by hand.

Can several people share one server?

Yes, using the hosted Streamable HTTP setup, where each person sends their own key with each request. Most individuals do not need this.

Where does my API key live?

For the per user setup, in your client's config as the TANTRA_API_KEY environment variable. Treat that file as a secret.

Can the server do everything the Tantra app can?

No. It exposes the specific tools listed above, focused on campaigns, contacts, templates, and dashboard metrics.

Was this article helpful?

Related articles