MCP server

Connect your P9.lt account to Claude or any other AI agent. The AI can create QR codes, re-point dynamic links and read scan statistics on your behalf — within your plan limits.

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI agents use external services securely. The P9.lt MCP server lives at https://p9.lt/mcp and performs every action through the same REST API with your account permissions.

Authorization

Two ways — pick whichever your client supports:

API key
Every registered user gets an API key for free. Find it under Account → API. Pass it as an Authorization: Bearer header.
OAuth sign-in
For clients without a token field (claude.ai, Claude Desktop). After entering the server URL you are taken through the normal P9.lt login and a consent screen — no key copying needed. Revoke access by changing your account password — that disconnects every connected AI agent. If you authenticated with an API key, regenerate it under Account → API to cut access.

How to connect

claude.ai / Claude Desktop
  1. Open Settings → Connectors → Add custom connector.
  2. Enter the URL https://p9.lt/mcp.
  3. Click "Connect", sign in to P9.lt and approve access.
Claude Code (terminal)
claude mcp add --transport http p9 https://p9.lt/mcp --header "Authorization: Bearer {api_key}"
Other MCP clients

Any Streamable HTTP MCP client works: URL https://p9.lt/mcp, auth via an Authorization: Bearer <API key> header or OAuth 2.1 (discovered automatically via /.well-known/oauth-protected-resource).

Tools

Your AI agent will see these tools:

Tool Description
account_info Account information
list_links List dynamic links
get_link Get dynamic link
create_link Create dynamic link
update_link Update dynamic link
delete_link Delete dynamic link
list_qr_codes List QR codes
get_qr_code Get QR code
create_qr_code Create QR code
delete_qr_code Delete QR code
link_statistics Link scan statistics
list_projects List projects
create_project Create project
update_project Update project
delete_project Delete project
list_domains List custom domains

Limits & security

  • Every action goes through the REST API — your plan limits and the 60 req/min rate limit apply.
  • OAuth access tokens last 7 days and refresh automatically (refresh tokens — 90 days, rotated on every use).
  • The AI agent can perform irreversible actions (e.g. delete a link) — tools are annotated so agents ask before doing so.
  • Access uses your account permissions: the agent never sees other users' data.

Downloading a QR code as PNG

QR codes are stored as SVG. Some AI agents cannot render SVG in their chat window — in that case ask the agent to use the get_qr_code_png tool: it returns the QR code as a PNG image directly in the conversation. Pass the qr_code_id (from create_qr_code or list_qr_codes) and an optional pixel size (100–2000, default 1000).

Example prompt for the agent: "Send me QR code 2150 as a PNG, 800 pixels."

If Imagick is installed on the server you get an exact copy of the saved design. If it is not, the QR code is regenerated from the same payload (it scans identically) but without the logo and custom dot styles — the agent tells you when that happens.

Example

Ask your AI agent: "Create a dynamic link to my-site.com/sale, attach a QR code to it, and tell me next week how many people scanned it." — all of it possible through the MCP tools alone.