Connect turl.ca to your MCP client
Shorten and manage links from the REST API, an AI agent, or your scripts.
MCP for AI agents
turl.ca runs a Model Context Protocol server at https://turl.ca/mcp, so Claude Desktop, Cursor, the MCP Inspector, and other agents can shorten and manage links directly.
Install in VS Code MCP Registry record Other Bins MCP guides
Add https://turl.ca/mcp as a remote MCP server in your client, then sign in with your Pastebin.ca account.
In Claude, open Customize → Connectors → Add → Custom → Web, enter the URL and use Claude’s published identity when prompted.
Try it List my three most recent short links and show their destinations.
Option B — API-key bearer (automation)
For headless use, send a minted key directly:
{
"mcpServers": {
"turl": {
"url": "https://turl.ca/mcp",
"headers": { "Authorization": "Bearer pbca_live_…" }
}
}
}pbca account api-key create \
--scopes link:read,link:create,link:delete \
--audience https://turl.caTools
| Tool | Scope | Purpose |
|---|---|---|
whoami | — | Echo account id, scopes, audience, and token kind. |
create_link | link:create | Shorten a URL; returns resolution, trust reason, safety state, and expiry. |
get_link | link:read | Fetch one link with its current resolution behavior. |
list_my_links | link:read | List links with current resolution behavior; cursor-paginated. |
delete_link | link:delete | Retire one of the caller's links. |
OAuth & DPoP
pastebin.ca is the OAuth authorization server; turl.ca is a protected resource and never mints tokens.
- OAuth tokens are audience-bound to
https://turl.ca/mcp(RFC 8707) and honored only on the MCP route. - If a key is DPoP-bound (RFC 9449), every MCP request must carry a matching ES256 proof; replays are rejected. Plain bearer keys work without DPoP.
- Revoke a key or connected app anytime from your pastebin.ca account.
Discovery
| Document | URL |
|---|---|
| OpenAPI 3.1 | /api/v1/openapi.json |
| Agent card | /.well-known/agent.json |
| MCP protected resource | /.well-known/oauth-protected-resource/mcp |
| LLM site map | /llms.txt |