MCP Server & API Tokens
Marketix ships a built-in Model Context Protocol (MCP) server. It lets any MCP-compatible AI client — Claude, Cursor, ChatGPT, GitHub Copilot, and others — read and create data in your projects on your behalf, authenticated with a personal API token.
Everything you reach through the MCP server is scoped to the projects you belong to. A token grants exactly the access your own account has — nothing more.
Creating an API token
Section titled “Creating an API token”- Open your Account page and find the API tokens section.
- Enter a descriptive name (e.g. “Claude Desktop”) and click Create token.
- The plaintext token is shown once, immediately after creation. Copy it now — for security it is never displayed again.
The same section lists your existing tokens (name, created, last used) and lets you revoke any of them. Revoking a token immediately cuts off any client using it.
Connecting a client
Section titled “Connecting a client”The MCP server is served over HTTP (Streamable HTTP transport) at:
https://<your-marketix-host>/mcp/marketixClients authenticate with a bearer token header:
Authorization: Bearer <your-token>The exact endpoint URL and this header are also shown in the API tokens section of your Account page for convenient copying.
Clients that support custom headers
Section titled “Clients that support custom headers”Point the client at the endpoint above and add the Authorization header. The client then discovers the available tools automatically.
Clients without custom-header support
Section titled “Clients without custom-header support”Some desktop clients cannot send a custom header directly. Use the mcp-remote bridge, for example:
{ "mcpServers": { "marketix": { "command": "npx", "args": [ "mcp-remote", "https://<your-marketix-host>/mcp/marketix", "--header", "Authorization: Bearer <your-token>" ] } }}Available tools
Section titled “Available tools”Once connected, the client can call these tools. All project-scoped tools take a project argument (its ID or name) and only operate on projects you can access.
| Tool | Returns |
|---|---|
list_projects | The projects you belong to (id, name, your role). |
list_links | Short links in a project (slug, target, domain, clicks, status). |
list_domains | Domains in a project. |
list_qr_codes | QR codes in a project (name, type, dynamic/static, scans). |
get_link_stats | Click statistics for one link over a period — totals plus breakdowns by country, browser, OS, and referrer. |
Create
Section titled “Create”| Tool | Creates |
|---|---|
create_link | A short link in a project (domain, target URL, optional slug/type/expiry/password). |
create_qr_code | A QR code (static or dynamic) for a target URL, using the default styling. |
New links and QR codes are created exactly as if you had used the web UI, including validation and your project’s link settings. There are no update or delete tools — those actions remain in the web app.