Connecting AI Agents via MCP

MCP setup happens in your external client, not inside m18t. Point an MCP client at https://m18t.com/mcp, authenticate with a bearer token, and pick a brand

What you'll learn

  • Where MCP setup actually happens (your external client, not inside m18t).
  • How to point an MCP client at the m18t endpoint and authenticate it: by signing in from the client, or with a token.
  • How brand scoping and token expiry work in practice.

The concept

m18t speaks the Model Context Protocol (MCP), a standard for letting an AI agent call typed tools against a system. m18t is the server; your AI tool — an IDE assistant, a terminal agent, a desktop client — is the client.

The important thing to get right up front: there is no MCP screen inside m18t. You don't configure agents in the Studio. All setup happens in the external client, by adding the m18t server to it. m18t exposes the endpoint and checks who is calling on every tool call.

The endpoint is https://m18t.com/mcp. A request without a credential gets a 401 that tells the client where to sign in, so a client that supports sign-in can start it. There are two ways to authenticate: sign in from the client, or send a Personal Access Token as a header.

How to connect a client

  1. Pick how the client authenticates. If your client supports signing in to a remote server, use that: it opens m18t in your browser, shows which application is asking, and you approve it. No token to copy. Otherwise create a Personal Access Token under Settings → API tokens, where you choose whether it can write, which brands it can reach, and when it expires.

  2. Claude Code: one command. In your project folder, run:

    claude mcp add --transport http m18t https://m18t.com/mcp
    

    Then start Claude Code, run /mcp, pick m18t and approve the sign-in in your browser. To use a token instead, add it as a header:

    claude mcp add --transport http m18t https://m18t.com/mcp --header "Authorization: Bearer YOUR_M18T_PAT_HERE"
    

    Add --scope user to make m18t available in every project, not only this one.

  3. Other clients: add the m18t server. Register a remote HTTP MCP server at https://m18t.com/mcp. For sign-in, the address is all you need. For a token, add an Authorization: Bearer <token> header. The generic shape most clients accept:

    {
      "mcpServers": {
        "m18t": {
          "url": "https://m18t.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_M18T_PAT_HERE"
          }
        }
      }
    }
    

    Clients that only launch local commands (not remote URLs) need an HTTP-bridge wrapper — consult your client's docs for its remote-server pattern.

  4. Reload the client so it re-reads its config and connects. Your client should now list m18t's tools.

  5. Tell the agent which brand to use. Every brand-scoped tool takes an explicit brand. Have the agent call list_brands first, then pass the right brand on each call. (If your workspace has exactly one brand, tools default to it.)

Variations

  • Multiple brands, one connection. You don't connect once per brand. One connection covers the whole workspace; the agent moves between brands by passing a different brand on each tool call.
  • Read-only is a real setting. The surface includes create and update tools. No tool deletes your work. The only two deletes remove an empty funnel or a tag nothing uses; anything else, a person removes. To keep an agent from writing at all, issue it a token marked read-only; that is checked on our side on every call, not asked for in a prompt.

FAQ

I get a 401 / "access denied" — what's wrong? A 401 on the first request is normal: it is how m18t tells a client to sign in. If it persists, the credential is wrong or expired. Sign in again from the client, or generate a fresh token, put it in your client's config, and reload. Also confirm the account has a selected business.

The connection succeeds but no tools show up. The tools appear once the credential resolves to a workspace. If the client lists the server with no tools, finish the sign-in (in Claude Code, run /mcp) or re-check the token.

Is the endpoint https://m18t.com/mcp or mcp.m18t.com? Use https://m18t.com/mcp. The /api/mcp path is the auth-walled app prefix and hosts no MCP handler; an mcp.m18t.com subdomain is planned but not the live endpoint.

Can I configure MCP from inside m18t? No. There is no in-app MCP screen. Setup lives in your client; m18t is only where you issue and revoke tokens.

Why does the agent ask me which brand to use? Because every brand-scoped tool requires an explicit brand to prevent cross-brand leakage. Have the agent run list_brands and operate on the one you name.

What's next

Was this article helpful?