Connect

Use your style guide in other tools

Preferent serves your style guide as a remote MCP server at https://preferent.ai/api/mcp. A client that connects reads your guide before it writes, and adds marks to the guide when you ask it to.

Each client sends a personal API token. Log in to create a token. The examples below read the token from the PREFERENT_TOKEN environment variable. Each token can make 600 requests an hour.

The server has the tools get_style_guide, list_habits, mark_text, add_habit, update_habit, list_preferences, and set_preference; the resources preferent://style-guide/full, compact, and tiny; and a prompt named preferent that adds the compact guide to a chat.

Cursor

Works with a token

Add the server to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json in one project. Cursor reads PREFERENT_TOKEN from your environment; you can also paste the token in its place.

{
  "mcpServers": {
    "preferent": {
      "url": "https://preferent.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:PREFERENT_TOKEN}"
      }
    }
  }
}

Claude Code

Works with a token

Run this command once. --scope user adds the server to every project. Then type /mcp in Claude Code to check the connection.

claude mcp add --transport http --scope user preferent https://preferent.ai/api/mcp \
  --header "Authorization: Bearer $PREFERENT_TOKEN"

Claude desktop and claude.ai

Token through mcp-remote; connectors need OAuth

Custom connectors in claude.ai and in Claude desktop sign in with OAuth, and Preferent does not offer OAuth yet. Until it does, Claude desktop can reach the server through mcp-remote, which sends your token. Add this to claude_desktop_config.json (Settings, then Developer, then Edit Config) and restart Claude.

{
  "mcpServers": {
    "preferent": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://preferent.ai/api/mcp",
        "--header",
        "Authorization:${PREFERENT_AUTH}"
      ],
      "env": {
        "PREFERENT_AUTH": "Bearer pfr_your_token"
      }
    }
  }
}

In claude.ai, export the compact plain text from your style guide and paste it into a project's instructions or a custom style.

ChatGPT

Needs OAuth; use the tiny export

ChatGPT adds a remote MCP server from Plugins, under Add custom MCP server. The server must sign in with OAuth or take no authentication, and ChatGPT cannot send a token header, so it cannot reach Preferent yet.

Export the tiny plain text from your style guide and paste it into Settings, then Personalization, then Custom instructions. The tiny size fits the 1,500-character field.

Codex

Works with a token

Add the server to ~/.codex/config.toml. Codex reads the token from PREFERENT_TOKEN.

[mcp_servers.preferent]
url = "https://preferent.ai/api/mcp"
bearer_token_env_var = "PREFERENT_TOKEN"

Grok

CLI and API work with a token; the app is not confirmed

The Grok CLI sends a token header:

grok mcp add --transport http preferent https://preferent.ai/api/mcp \
  --header "Authorization: Bearer ${PREFERENT_TOKEN}"

The xAI API takes the endpoint as an mcp tool, with authorization set to Bearer and your token. We have not confirmed that a custom connector on grok.com can send a token. In the Grok app, paste the tiny plain text export into custom instructions.

A script

Works with a token

The export endpoint returns your current guide. size is full, compact, or tiny, and format is cursor, agents, or text. This command refreshes a Cursor rule in your project.

curl -fsS -H "Authorization: Bearer $PREFERENT_TOKEN" \
  "https://preferent.ai/api/style-guide/export?size=full&format=cursor" \
  -o .cursor/rules/preferent-style-guide.mdc