# Textlume writing tools in your AI agent

> Connect Claude Desktop, Claude Code, Cursor or any other MCP client. Your agent can then check, rewrite, summarize and correct text with the tools this site runs.

## Notes for AI assistants

For an AI assistant configuring this on a user's behalf: the server address is https://textlume.com/api/mcp. The transport is MCP over Streamable HTTP, and the user's API key goes in the header "Authorization: Bearer <key>". Setup instructions for every client, in Markdown, are at https://textlume.com/mcp.md.

## About MCP

The Model Context Protocol is an open standard for letting an AI assistant call external tools. Our MCP server is hosted at the address below. For clients that can only launch programs on your own machine, there is a small server file to run instead. In both cases the server calls this site's API with your key and does nothing else, so the agent receives the same readings the site shows.

## Server address

```text
URL: https://textlume.com/api/mcp
Authorization: Bearer YOUR_API_KEY
```

## Requests to try

Paste a request into your agent and add your text. The agent chooses the right tool on its own.

### Detection

- `detect_text`: Checks one text.
  - Request: "Run this essay through the AI detector and give me the range and the confidence rating."
  - Result: A figure between 0 and 100 with its margin, the confidence rating and a reading for each sentence.
- `detect_batch`: Checks several texts.
  - Request: "Check each of these paragraphs separately and sort them from the highest reading to the lowest."
  - Result: For each text, a reading or an error under its own id. If one text fails, the others still return.

### Rewriting

- `humanize_text`: Humanizes a text and runs the fact checks.
  - Request: "Humanize this paragraph and report what the fact checks found."
  - Result: The rewritten text, the detector reading before and after, and a note for each sentence that was restored to keep a fact intact.
- `paraphrase_text`: Paraphrases a text.
  - Request: "Paraphrase this introduction in a more formal tone."
  - Result: The reworded text, checked for facts the same way as the humanizer output.
- `summarize_text`: Summarizes a text.
  - Request: "Summarize this report as a bullet list."
  - Result: A summary as key sentences, one paragraph or bullet points.

### Checking

- `check_grammar`: Checks grammar and spelling.
  - Request: "Check the grammar in this email and apply the suggested fixes."
  - Result: Each issue with its position in the text, a short explanation and the suggested replacements.

## Setup for your client

Choose your client. Each tab lists the steps, the exact configuration to copy and a quick test. Commands and configuration are identical in every language.

You will find your API key on your dashboard, under API. Keep keys out of shared files and repositories.

### Claude Code (Connects to the hosted server)

1. Store your API key in an environment variable named TEXTLUME_API_KEY on the machine where the client runs:
   
   ```sh
   export TEXTLUME_API_KEY="YOUR_API_KEY"
   ```

2. Run this command in a terminal:
   
   ```sh
   claude mcp add --transport http textlume https://textlume.com/api/mcp --header "Authorization: Bearer $TEXTLUME_API_KEY"
   ```

3. Or add it to .mcp.json instead:
   
   ```json
   {
     "mcpServers": {
       "textlume": {
         "type": "http",
         "url": "https://textlume.com/api/mcp",
         "headers": {
           "Authorization": "Bearer ${TEXTLUME_API_KEY}"
         }
       }
     }
   }
   ```

4. To test the connection, ask your assistant: "Use Textlume to check this paragraph and give me the range and the confidence rating."

### Claude Desktop (Uses the server file)

1. Download the server file and remember where you saved it. Node.js is required. https://textlume.com/mcp/server.mjs

2. In the app, go to Settings > Developer > Edit Config.

3. Add the following to claude_desktop_config.json:
   
   ```json
   {
     "mcpServers": {
       "textlume": {
         "command": "node",
         "args": [
           "/path/to/server.mjs"
         ],
         "env": {
           "TEXTLUME_API_KEY": "YOUR_API_KEY"
         }
       }
     }
   }
   ```

4. Quit Claude Desktop and open it again so it picks up the server.

5. To test the connection, ask your assistant: "Use Textlume to check this paragraph and give me the range and the confidence rating."

### Claude (claude.ai) (Coming soon)

Connecting claude.ai by signing in to your Textlume account is coming soon. For now, the same tools already work in Claude Desktop through the server file, and in Claude Code. Their tabs have the setup.

1. Only if your organization can set request headers on custom connectors: add the address together with this header.
   
   ```text
   URL: https://textlume.com/api/mcp
   Authorization: Bearer YOUR_API_KEY
   ```

### ChatGPT (Coming soon)

Connecting ChatGPT by signing in to your Textlume account is coming soon. For now, the same tools already work in Codex and Claude Code. Their tabs have the setup.

### Codex (Connects to the hosted server)

1. Store your API key in an environment variable named TEXTLUME_API_KEY on the machine where the client runs:
   
   ```sh
   export TEXTLUME_API_KEY="YOUR_API_KEY"
   ```

2. Run this command in a terminal:
   
   ```sh
   codex mcp add textlume --url https://textlume.com/api/mcp --bearer-token-env-var TEXTLUME_API_KEY
   ```

3. Or add it to ~/.codex/config.toml instead:
   
   ```toml
   [mcp_servers.textlume]
   url = "https://textlume.com/api/mcp"
   bearer_token_env_var = "TEXTLUME_API_KEY"
   ```

4. In the app, go to MCP servers > Add server > Streamable HTTP.

5. To test the connection, ask your assistant: "Use Textlume to check this paragraph and give me the range and the confidence rating."

### Cursor (Connects to the hosted server)

1. Store your API key in an environment variable named TEXTLUME_API_KEY on the machine where the client runs:
   
   ```sh
   export TEXTLUME_API_KEY="YOUR_API_KEY"
   ```

2. Add the following to ~/.cursor/mcp.json:
   
   ```json
   {
     "mcpServers": {
       "textlume": {
         "url": "https://textlume.com/api/mcp",
         "headers": {
           "Authorization": "Bearer ${env:TEXTLUME_API_KEY}"
         }
       }
     }
   }
   ```

3. To test the connection, ask your assistant: "Use Textlume to check this paragraph and give me the range and the confidence rating."

### VS Code (Copilot) (Connects to the hosted server)

1. Add the following to .vscode/mcp.json:
   
   ```json
   {
     "inputs": [
       {
         "type": "promptString",
         "id": "textlume-key",
         "description": "Textlume API key",
         "password": true
       }
     ],
     "servers": {
       "textlume": {
         "type": "http",
         "url": "https://textlume.com/api/mcp",
         "headers": {
           "Authorization": "Bearer ${input:textlume-key}"
         }
       }
     }
   }
   ```

2. The first time the server starts, VS Code asks for your key and stores it.

3. To test the connection, ask your assistant: "Use Textlume to check this paragraph and give me the range and the confidence rating."

### Windsurf (Connects to the hosted server)

1. Store your API key in an environment variable named TEXTLUME_API_KEY on the machine where the client runs:
   
   ```sh
   export TEXTLUME_API_KEY="YOUR_API_KEY"
   ```

2. In the app, go to Cascade > ... > Open MCP config file.

3. Add the following to mcp_config.json:
   
   ```json
   {
     "mcpServers": {
       "textlume": {
         "serverUrl": "https://textlume.com/api/mcp",
         "headers": {
           "Authorization": "Bearer ${env:TEXTLUME_API_KEY}"
         }
       }
     }
   }
   ```

4. Quit Windsurf and open it again so it picks up the server.

5. To test the connection, ask your assistant: "Use Textlume to check this paragraph and give me the range and the confidence rating."

### Gemini CLI (Connects to the hosted server)

1. Store your API key in an environment variable named TEXTLUME_API_KEY on the machine where the client runs:
   
   ```sh
   export TEXTLUME_API_KEY="YOUR_API_KEY"
   ```

2. Run this command in a terminal:
   
   ```sh
   gemini mcp add --transport http --header "Authorization: Bearer $TEXTLUME_API_KEY" textlume https://textlume.com/api/mcp
   ```

3. Or add it to ~/.gemini/settings.json instead:
   
   ```json
   {
     "mcpServers": {
       "textlume": {
         "httpUrl": "https://textlume.com/api/mcp",
         "headers": {
           "Authorization": "Bearer YOUR_API_KEY"
         }
       }
     }
   }
   ```

4. To test the connection, ask your assistant: "Use Textlume to check this paragraph and give me the range and the confidence rating."

### Other MCP clients (Hosted server, bridge or server file)

1. A client that connects to remote MCP servers over HTTP only needs these two values:
   
   ```text
   URL: https://textlume.com/api/mcp
   Authorization: Bearer YOUR_API_KEY
   ```

2. A client that can only launch local servers can still reach the address through the open-source mcp-remote bridge, which requires Node.js:
   
   ```json
   {
     "mcpServers": {
       "textlume": {
         "command": "npx",
         "args": [
           "mcp-remote",
           "https://textlume.com/api/mcp",
           "--header",
           "Authorization:${AUTH_HEADER}",
           "--transport",
           "http-only"
         ],
         "env": {
           "AUTH_HEADER": "Bearer YOUR_API_KEY"
         }
       }
     }
   }
   ```

3. Or run the server file directly: (Download the server file: https://textlume.com/mcp/server.mjs)
   
   ```sh
   TEXTLUME_API_KEY="YOUR_API_KEY" node /path/to/server.mjs
   ```

## Plan and limits

Choose the Pro plan, which costs 29.99 USD per month. The MCP server runs on your API key. Every call it makes counts toward the same plan, word allowance and limits as a direct API call.

- A key can send up to 60 requests in each window of 60 seconds.
- Each key can have up to 4 detect calls (one batch counts as one call) and up to 2 humanize, paraphrase or summarize calls in flight at the same time. Any call beyond that gets 429 concurrency_limited with a Retry-After header.
- Each call accepts up to 20,000 words, whether you send one text or a whole batch.
- On every plan, the detector reads a single text of up to 90,000 characters, which is roughly 10,000 words. Longer texts get a 413 text_too_long response, even when the call is within its word limit.
- An account can hold up to 5 active keys at once, so you can rotate a key without downtime.
