Connect a client

Create an access token and point Claude Code, Claude Desktop or Cursor at Modulify.

On this page

Connecting takes two things: a token you create in Modulify, and one line of configuration in your AI client. The same token works in every client, and every client points at the same server URL.

Before you begin

You need a Modulify account and a client that speaks MCP over HTTP. Claude Code, Claude Desktop and Cursor all do, as does anything else that reads an mcp.json style config.

Create a token

Open the user menu in the dashboard and choose Tokens, at /dashboard/tokens. The page is titled Tokens and explains itself: "Connect any MCP client to Modulify." Learn more, right after it, opens this page. Each token acts as you, so grant only what it needs.

Click Create token. The form asks for six things:

  1. Token name. Name it after the client you are handing it to, so you know which one to revoke later. The placeholder suggests "Claude Code on my laptop". Up to 60 characters, and it is required.
  2. Expires after. 1 hour, 1 day, 7 days, 30, 90 or 180 days, 1 year, the longest dated choice, or No expiry, for a token that keeps working until you revoke or delete it. It defaults to 90 days and cannot be changed once the token is issued.
  3. When it expires, shown unless you chose No expiry. Keep it as expired, the default, leaves the token in your list marked Expired. Delete it deletes the token once it expires, which suits a token made for one job. It cannot be changed once the token is issued either.
  4. Workspaces, under Where it can work. This only appears when you are a member of more than one workspace. The default is Every workspace I am a member of. Choose Only the workspaces I pick and tick the ones the token should reach.
  5. Sites, under Where it can work. The default is Every site in those workspaces. Choose Only the sites I pick to search your sites and tick the ones the token should reach. A token limited to sites cannot create sites, and cannot change a whole workspace, folder or bought domain, see Limiting a token to sites.
  6. What this token can do. The scopes, in groups such as Sites, Chat and code, and Data. Fifteen of the twenty-seven are ticked for you. The twelve left unticked are the ones behind deleting, rewriting, revealing and buying things. Select all ticks every scope, and each group's own checkbox ticks its group. Tokens and scopes explains each.

Click Create token. A missing name, an empty scope list, or a workspace or site choice with nothing ticked is flagged under the field itself, for example "Give the token a name so you can recognise which client is using it." or "Pick at least one thing this token is allowed to do.", and the form scrolls to it. Nothing is created until each is filled in.

Copy the token immediately

The new token appears once, in a grey panel headed Copy this token now, right under the new token's row in the list: "This is the only time it is shown. If you lose it, revoke the token and create another one."

Copy it with the copy button. The token starts with mdf_mcp_. Click I have copied it to dismiss the panel. The panel also goes away on its own once the token is deleted, revoked or expires, from this page or anywhere else, since there is nothing left worth copying.

Modulify never stores the token itself, only a one-way hash of it and its last six characters, which is all the token list shows afterwards. There is no way to read the full value back.

Connect Claude Code

Run this in your terminal, with the token you copied in place of YOUR_TOKEN:

claude mcp add --transport http modulify https://api.modulify.ai/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Connect a client that reads a config file

Claude Desktop, Cursor and anything else with a JSON MCP config take the same server with the same header:

{
  "mcpServers": {
    "modulify": {
      "type": "http",
      "url": "https://api.modulify.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

The server is plain HTTP, so there is nothing to install and no local process to keep running.

Call the tools from your own code

The same token also works for the HTTP API, where every tool is a plain HTTP method your scripts and backends can call without an MCP client: POST a tool's arguments as JSON to /v1/ followed by the tool name, with the same token in the Authorization header. The token keeps the same permissions. A first call:

curl -X POST https://api.modulify.ai/v1/list_workspaces \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Check the connection

Ask the client to list your Modulify workspaces. That calls list_workspaces, which needs nothing but the token and returns the name, plan and your role in each workspace. Almost every other tool needs a workspaceId or a site from one of them, so it is the natural first call.

From there, ask it to list the sites in one of those workspaces. That is list_sites, and the site ids it returns are what the rest of the catalog takes.

If the client cannot connect

Modulify answers an unauthenticated request with a 401 and one of four descriptions, which name the problem exactly:

What you see What it means
A Modulify access token is required. No Authorization header arrived. Check the header is spelled Authorization: Bearer <token>.
This access token is invalid, revoked or expired. The value does not match a live token: it was mistyped, revoked or deleted, including a token deleted once it expired because When it expires was set to Delete it. Check you pasted the whole thing, including the mdf_mcp_ prefix.
This access token has expired. The token has passed its expiry date. An expired token cannot be extended, so create a new one.
This access token belongs to a banned account. If you think this is a mistake, contact [email protected]. The account that owns the token is banned, so none of its tokens work.

If the client connects but a tool you expected is missing, the token does not hold that tool's scope. Tools are registered per token, so a missing scope means the tool is absent from the list rather than failing when called. Edit the token on the Tokens page and tick the scope, then reconnect the client. A token limited to specific sites also leaves out the tools it can never use, such as create_site, list_folders and the member and bought domain tools.

If a call is refused with "This token is limited to specific workspaces", the token was narrowed at creation to workspaces that do not include the one you aimed at. If it is refused with "This token is limited to specific sites", the token was narrowed to sites, and the call either aimed at another site or works on a whole workspace, folder or bought domain. If it is refused with a message about API access, your role in that workspace does not hold the API access permission and a workspace owner has to grant it. If it is refused with "This token cannot reach what ... was pointed at", the id does not exist, or it belongs to a workspace your account is not a member of. The two cases get the same answer on purpose, so a token cannot be used to find out whether someone else's site exists.

Let the client read these docs

Your client can read these docs as well as call the tools. Every docs page has a Markdown version at its own address with .md added, such as https://modulify.ai/docs/mcp/connect-a-client.md. Open .md version, in the Open in menu at the top of each page, opens it, and Copy page copies it.

  • https://modulify.ai/docs/llms.txt lists every docs page with a one-line summary.
  • https://modulify.ai/docs/llms-full.txt holds every docs page in one file.
  • https://modulify.ai/agents.md is a short guide written for agents: how a token works, which tool to call first, and what stays with you, such as anything that charges a card.

Point the client at one of them, or paste the address into its chat.

Next