Skip to content

Connect an AI client ​

This page is for everyone. You create a token, give it to your AI client together with the server's address, and ask a first question.

Create a token ​

  1. Sign in to the management page and open MCP tokens.
  2. Under Create a token, type a name for the machine that will hold it, such as laptop.
  3. Press Create token.
  4. A card titled Copy this token now appears. Copy the token, or one of the ready-made snippets below it.

WARNING

The token is shown this once. The server keeps only a fingerprint of it, so it cannot be shown again. If you lose it, revoke it and create another.

Add the server to your client ​

Your client needs two things: the address of the MCP endpoint and the token.

The address is under MCP endpoint on the MCP tokens page and on Overview. On a new installation it is:

http://127.0.0.1:8765/mcp

That address works only for a client on the same machine as the server. For a client on another machine, the administrator first makes the server reachable and sets its public address: see Server settings. The page then shows the new address.

Claude Code ​

The card gives you the whole command, with your token already in it, under Add it to Claude Code. It looks like this:

claude mcp add --transport http nama-marketing http://127.0.0.1:8765/mcp --header "Authorization: Bearer YOUR_TOKEN"

Run it in a terminal on the machine where Claude Code is installed. Claude Code then keeps the server for you in the project you ran it in. To have it in every project, add --scope user to the command.

If you would rather write the entry in a project's .mcp.json file, which other people may see, keep the token out of the file. Claude Code fills in an environment variable written as ${NAME}:

json
{
  "mcpServers": {
    "nama-marketing": {
      "type": "http",
      "url": "http://127.0.0.1:8765/mcp",
      "headers": {
        "Authorization": "Bearer ${NAMA_MARKETING_TOKEN}"
      }
    }
  }
}

Then set the variable as described under Keep the token in an environment variable.

Claude on the web and the Claude desktop app ​

Claude on claude.ai and the Claude desktop app reach an MCP server as a custom connector, and a custom connector can send your token.

Claude connects from the internet, not from your machine

A custom connector is reached from Anthropic's servers, in the desktop app too. So the address http://127.0.0.1:8765/mcp does not work here. The administrator first makes the server reachable from the internet and sets its public address: see Server settings.

  1. In Claude, open Customize, then Connectors.
  2. Press + Add, then Add custom connector.
  3. Type a name, such as nama-marketing, and the address of the MCP endpoint.
  4. Under Authentication, choose No sign in. The server has no sign-in of that kind: the token is what proves who you are.
  5. Under Request headers, add a header named Authorization with the value Bearer YOUR_TOKEN.
  6. Press Add.

On a Team or Enterprise plan an owner adds the connector for the organization, and everyone who uses it then sends the same token. Everything they do would be done as one user of the Marketing MCP server, under that user's name in the activity log. If each person should act as themselves, use a client where each person holds their own token, such as Claude Code.

Anthropic changes these screens from time to time. If yours look different, see Anthropic's own page on custom connectors.

Codex ​

Codex, from OpenAI, reads its MCP servers from the file ~/.codex/config.toml. The Codex command line, its IDE extension and the ChatGPT desktop app share that file. The card gives the entry under Codex: add to ~/.codex/config.toml:

toml
[mcp_servers.nama-marketing]
url = "http://127.0.0.1:8765/mcp"
bearer_token_env_var = "NAMA_MARKETING_TOKEN"

The entry does not hold your token. It names an environment variable, and Codex sends what is in it as the token. Set the variable as described under Keep the token in an environment variable, then start Codex again.

OpenCode ​

OpenCode reads its MCP servers from opencode.json: the one in your project's folder, or ~/.config/opencode/opencode.json for every project. The card gives the entry under OpenCode: add to opencode.json:

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "nama-marketing": {
      "type": "remote",
      "url": "http://127.0.0.1:8765/mcp",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {env:NAMA_MARKETING_TOKEN}"
      }
    }
  }
}

If the file already has other settings, add only the nama-marketing part inside its mcp section.

  • "oauth": false tells OpenCode not to look for a sign-in of another kind. The token is what this server takes.
  • {env:NAMA_MARKETING_TOKEN} is filled in from an environment variable, so the file does not hold your token. Set the variable as described below, then start OpenCode again.

Keep the token in an environment variable ​

The Codex and OpenCode entries, and the .mcp.json entry for Claude Code, read the token from the environment variable NAMA_MARKETING_TOKEN. Set it on the machine where the client runs.

On Windows, in a terminal:

setx NAMA_MARKETING_TOKEN "YOUR_TOKEN"

Then close the terminal and open a new one: setx reaches only programs started afterwards.

On Linux or macOS, add this line to your shell's startup file, such as ~/.bashrc or ~/.zshrc, and open a new terminal:

export NAMA_MARKETING_TOKEN="YOUR_TOKEN"

Any other client ​

Any client that can reach an MCP server over HTTP and send a header can use it. Give it:

  • the address of the MCP endpoint;
  • the header Authorization: Bearer YOUR_TOKEN.

For a client that reads its MCP servers from a file in the mcpServers form, the card gives a whole entry, with your token in it, under Or put it in a client config file. Keep a file that holds a token to yourself.

The server speaks HTTP only

Some clients add an MCP server by starting a program on your machine. That does not work here. The client has to connect to the address above, and the server has to be running already.

Check that it works ​

Ask your client something that changes nothing:

Who am I signed in as on the marketing server, and what am I allowed to change?

Show me the status of the marketing server.

The client answers with who you are signed in as, whether you may make changes, which platforms you have connected, and the limits that are in force.

If it says that no platform is connected, connect your accounts on the management page first: Google, Meta, LinkedIn.

From here, ask in your own words. You never need the name of a tool. Before anything is changed, the client shows you what would happen: see How it keeps you safe.

A token is yours alone ​

A token acts as you: it reaches the accounts you connected and it has your write access, or your lack of it. Everything done with it is written to the activity log under your name.

  • Create one token for each machine, so you can cut off one client without touching the others.
  • Do not share a token. A colleague gets their own user and their own tokens.
  • Revoke a token you no longer trust. On MCP tokens, under Your tokens, press Revoke beside it. Any client that uses it stops working at once.

The Your tokens table shows each token's name, its first characters, when it was created, when it was last used and whether it is Active or Revoked. A token that was never used, or not for a long time, is a good one to revoke.

If an administrator disables your account, your tokens stop working until it is enabled again.