MCP / AI Integration
Connect AI assistants to AWSYS.CO via the Model Context Protocol
The AWSYS.CO MCP server implements the Model Context Protocol over stateless Streamable HTTP. It exposes 65 tools that AI assistants such as Claude, ChatGPT, Codex and Cursor can call to create links, view analytics, manage folders, configure webhooks and more — all through natural-language conversation.
Protocol Details
| Property | Value |
|---|---|
| Protocol | MCP over Streamable HTTP (stateless JSON-RPC 2.0) |
| Protocol versions | 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05 |
| Endpoint | POST https://awsys.co/mcp |
| Server name | awsys-shortener (“AWSYS Links”) |
| Server version | 1.6.0 |
| Transport | Each POST is self-contained — no persistent connections or sessions required |
| CORS | POST responses allow any origin (browser preflight requests are not supported); allowed request headers: Content-Type, Authorization, Mcp-Session-Id, MCP-Protocol-Version |
Version negotiation
If the protocolVersion sent in initialize is one of the supported versions, the server answers with that same version; otherwise it answers with the newest, 2025-11-25. The initialize result also includes serverInfo (title “AWSYS Links”) and an instructions string that describes AWSYS and how links are namespaced.
// → initialize
{ "jsonrpc": "2.0", "id": 1, "method": "initialize",
"params": { "protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": { "name": "example", "version": "1.0" } } }
// ← result
{ "jsonrpc": "2.0", "id": 1, "result": {
"protocolVersion": "2025-06-18",
"capabilities": { "tools": {} },
"serverInfo": { "name": "awsys-shortener", "title": "AWSYS Links", "version": "1.6.0" },
"instructions": "AWSYS (awsys.co) is a URL shortener. ..."
} }
initialize, ping and notifications don't require authentication. Every other method does.
Authentication
The AWSYS MCP server accepts two authentication methods:
- OAuth 2.1 (recommended for Claude.ai, ChatGPT and Codex) — connect from the assistant's UI without copying an API key. PKCE, refresh tokens and automatic discovery. See the OAuth 2.1 docs.
- API key (existing integrations) — pass your awsys_... key as a Bearer token. Works alongside OAuth with no migration required.
Authorization: Bearer YOUR_API_KEY
The key is hashed and matched against your account. Plan access is evaluated live on every call — upgrading or downgrading takes effect immediately.
Connect from any MCP client
Any MCP client that supports remote servers can connect to AWSYS. Point it at the server URL below; the client signs the user in with OAuth 2.1, so no API key is needed.
| Server URL | https://awsys.co/mcp |
| Transport | Streamable HTTP |
| Authentication | OAuth 2.1 authorization code with PKCE, discovered automatically from the server (API keys also work) |
| Client registration | Client ID Metadata Document (CIMD) or Dynamic Client Registration (DCR, RFC 7591) |
| Redirect URIs | https callbacks; plain http only on loopback hosts (localhost, 127.0.0.1, [::1]), on any port |
Full details are in the OAuth 2.1 reference.
Command-line clients
Claude Code and Gemini CLI add the server with one command, then open a browser to sign in (in Claude Code run /mcp and choose Authenticate; in Gemini CLI run /mcp auth awsys):
# Claude Code
claude mcp add --transport http awsys https://awsys.co/mcp
# Gemini CLI
gemini mcp add --transport http awsys https://awsys.co/mcp
Install links
Cursor and VS Code accept install links that add the server in one click. The Cursor link carries the server entry as base64-encoded JSON; the VS Code link carries it as URL-encoded JSON:
# Cursor — config = base64({"url":"https://awsys.co/mcp"})
cursor://anysphere.cursor-deeplink/mcp/install?name=awsys&config=eyJ1cmwiOiJodHRwczovL2F3c3lzLmNvL21jcCJ9
# VS Code — vscode:mcp/install?<URL-encoded {"name":"awsys","type":"http","url":"https://awsys.co/mcp"}>
vscode:mcp/install?%7B%22name%22%3A%22awsys%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fawsys.co%2Fmcp%22%7D
# VS Code, wrapped so it opens from any browser
https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522awsys%2522%252C%2522type%2522%253A%2522http%2522%252C%2522url%2522%253A%2522https%253A%252F%252Fawsys.co%252Fmcp%2522%257D
Config files
Clients that read a JSON config file use one of these shapes (Cursor: ~/.cursor/mcp.json; VS Code: .vscode/mcp.json):
// Cursor — ~/.cursor/mcp.json
{ "mcpServers": { "awsys": { "url": "https://awsys.co/mcp" } } }
// VS Code — .vscode/mcp.json
{ "servers": { "awsys": { "type": "http", "url": "https://awsys.co/mcp" } } }
Step-by-step setup for ChatGPT, Claude, Cursor, VS Code, Grok, Gemini CLI, Perplexity and Le Chat is on the AI assistants page.
Quick Start with Claude
With the Claude Code CLI or any MCP client that supports custom headers, add the AWSYS.CO server to your configuration:
{
"mcpServers": {
"awsys": {
"type": "http",
"url": "https://awsys.co/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Once connected, you can ask things like:
- “Shorten https://example.com/launch with the slug launch”
- “Show me clicks for the last 7 days on my launch link”
- “Create a folder called Marketing and move my last 3 links into it”
- “Set up a webhook to notify https://my-server.com/hook on link clicks”
Tool annotations
Every tool in tools/list carries a title and MCP tool annotations. Clients use them to decide when to ask you for confirmation — ChatGPT and Claude, for example, confirm destructive actions before running them.
| Annotation | Meaning |
|---|---|
readOnlyHint | true only when the tool just reads your account data. Any create, update, delete, queued job or outbound request is false. |
destructiveHint | true when the tool deletes, overwrites, cancels or sends something that can't be undone — being able to recreate the data doesn't make it false. |
openWorldHint | true when the tool reaches arbitrary third-party destinations or services: any destination URL (checked with Google Safe Browsing), webhook endpoints, DNS lookups or the Bitly API. false when it only touches your own AWSYS account. |
idempotentHint | true when repeating the call with the same arguments has no additional effect. |
All 65 tools set readOnlyHint, destructiveHint and openWorldHint explicitly: 30 are read-only, 24 are destructive and 8 are open-world. tools/list never includes the internal plan gate; tools your plan doesn't include are simply not listed.
Example tools/list entry:
{
"name": "delete_link",
"title": "Delete Link",
"description": "Permanently delete a short link. Redirects stop working immediately.",
"inputSchema": {
"type": "object",
"properties": { "short_code": { "type": "string", "description": "The short code to delete" } },
"required": ["short_code"]
},
"annotations": {
"title": "Delete Link",
"readOnlyHint": false,
"destructiveHint": true,
"openWorldHint": false,
"idempotentHint": true
}
}
Structured results
When a tool returns a JSON object, the result carries it twice: as structuredContent, which clients can use directly, and as a JSON-formatted text block in content[0].text for clients that predate MCP 2025-06-18. Tool errors set isError: true.
Some tools add content blocks after the text block. get_qr_code, for example, also returns the QR code as an inline PNG image (type: "image") for clients that don't display external image URLs; that image is never repeated in structuredContent.
Available Tools (65)
Plan shows the lowest plan that lists the tool. Some tools also enforce limits inside the tool (for example, custom slugs need Starter or higher). Tools marked ChatGPT are part of the OpenAI client profile.
Links
| Tool | Description | Plan | Annotations |
|---|---|---|---|
shorten_url | Create a short link with full options (slug, expiry, password, geo rules, OG meta, routing) | All plans | write open world ChatGPT |
list_links | Paginated, sortable list of your links | All plans | read-only ChatGPT |
get_link | Details for a single link by short code | All plans | read-only ChatGPT |
update_link | Change destination, expiry, click cap, password, routing, OG metadata or geo rules | All plans | write destructive open world ChatGPT |
delete_link | Permanently delete a link; it stops redirecting | All plans | write destructive ChatGPT |
bulk_shorten | Create up to 50 links in one request | Builder+ | write open world ChatGPT |
get_link_trust_score | Stored trust/safety scan result for a short code | All plans | read-only ChatGPT |
Analytics and Export
| Tool | Description | Plan | Annotations |
|---|---|---|---|
get_link_stats | Click analytics for one link: totals, top countries and referrers | All plans | read-only ChatGPT |
get_recent_clicks | Recent click events across all your links | All plans | read-only ChatGPT |
get_aggregate_stats | Aggregated analytics for one link: clicks by day, countries, devices, referrers, UTM | Builder+ | read-only ChatGPT |
get_usage | Links, clicks and tracked-click usage against your plan | All plans | read-only ChatGPT |
export_links | Export all your links as structured JSON | Pro+ | read-only |
export_link_stats | Export raw click records for one link | Pro+ | read-only |
QR Codes
| Tool | Description | Plan | Annotations |
|---|---|---|---|
get_qr_code | QR code for a link: PNG image URL plus the image inline as MCP image content (inline copy up to 512 px), and printWarnings for link settings that can stop a printed code from working (expiry, click limit, password, URL-scan verdict, disabled, geo restriction) | All plans | read-only ChatGPT |
get_qr_settings | Saved QR customization for a link | All plans | read-only ChatGPT |
update_qr_settings | Save QR colors, logo and error correction for a link | All plans | write destructive ChatGPT |
Folders
| Tool | Description | Plan | Annotations |
|---|---|---|---|
list_folders | List folders with link counts | All plans | read-only ChatGPT |
create_folder | Create a folder | All plans | write ChatGPT |
update_folder | Rename a folder or change its color | All plans | write destructive ChatGPT |
delete_folder | Delete a folder (its links are unassigned, not deleted) | All plans | write destructive ChatGPT |
assign_link_to_folder | Move a link into a folder, or out of its folder | All plans | write destructive ChatGPT |
Tags, UTM Templates, Saved Views
| Tool | Description | Plan | Annotations |
|---|---|---|---|
add_link_tag | Add a tag to a link | All plans | write ChatGPT |
remove_link_tag | Remove a tag from a link | All plans | write destructive ChatGPT |
list_utm_templates | List saved UTM templates | All plans | read-only ChatGPT |
create_utm_template | Create a UTM template | All plans | write ChatGPT |
delete_utm_template | Delete a UTM template | All plans | write destructive ChatGPT |
list_saved_views | List saved link-list views | All plans | read-only ChatGPT |
create_saved_view | Create a named filter preset | All plans | write ChatGPT |
update_saved_view | Rename a saved view or change its filters | All plans | write destructive ChatGPT |
delete_saved_view | Delete a saved view | All plans | write destructive ChatGPT |
Custom Domains and Namespace
Starter accounts manage custom domains in the dashboard or through the REST API; the MCP domain tools below need Pro or higher.
| Tool | Description | Plan | Annotations |
|---|---|---|---|
list_domains | List custom domains with verification and SSL status | Pro+ | read-only |
check_domain_availability | Check whether a hostname can be added as a custom domain | All plans | read-only |
add_domain | Register a custom domain and get its DNS records | Pro+ | write destructive |
verify_domain | Run DNS verification for a pending domain | Pro+ | write open world |
activate_domain | Start serving short links on a verified domain | Pro+ | write destructive |
update_domain | Set default domain, custom 404 URL or other domain settings | Pro+ | write destructive |
delete_domain | Remove a custom domain | Pro+ | write destructive |
set_namespace | Claim a branded namespace | Pro+ | write destructive |
delete_namespace | Release your branded namespace | Pro+ | write destructive |
Webhooks
| Tool | Description | Plan | Annotations |
|---|---|---|---|
list_webhooks | List webhook endpoints and delivery stats | Pro+ | read-only |
create_webhook | Subscribe an endpoint to link events | Pro+ | write open world |
update_webhook | Change URL, events, name or enabled status | Pro+ | write destructive open world |
test_webhook | Send a test event to an endpoint | Pro+ | write destructive open world |
delete_webhook | Delete a webhook endpoint | Pro+ | write destructive |
Affiliate Programs
| Tool | Description | Plan | Annotations |
|---|---|---|---|
create_affiliate_program | Create a CPC/CPA affiliate program as merchant | Builder+ | write |
list_affiliate_programs | List programs you own as merchant | Builder+ | read-only |
get_affiliate_program | Details of one of your programs | Builder+ | read-only |
update_affiliate_program | Change a program's settings | Builder+ | write destructive |
list_affiliate_partners | List partners in your programs | Builder+ | read-only |
update_affiliate_partner_status | Approve or reject a partner | Builder+ | write destructive |
discover_affiliate_programs | Browse public programs you can join | All plans | read-only |
join_affiliate_program | Apply to join a program as partner | All plans | write |
list_affiliate_partnerships | List programs you've joined | All plans | read-only |
get_affiliate_stats | Click and conversion stats for a program or partnership | All plans | read-only |
get_affiliate_partnership_stats | Stats for one partnership you belong to | All plans | read-only |
get_affiliate_limits | Your affiliate plan limits and usage | All plans | read-only |
leave_affiliate_program | Leave a program you joined (deletes the partnership) | All plans | write destructive |
Imports
| Tool | Description | Plan | Annotations |
|---|---|---|---|
import_from_provider | Start an import of your Bitly links | Pro+ | write open world |
get_import_status | Status of an import job | Pro+ | read-only |
cancel_import | Cancel a running import | Pro+ | write destructive |
Account, AgentLink and Web2App
| Tool | Description | Plan | Annotations |
|---|---|---|---|
get_profile | Account info, plan, namespace prefix and feature flags | All plans | read-only ChatGPT |
get_agentlink_stats | AI-agent click analytics for one link | Pro+ | read-only |
get_agentlink_account_stats | AI-agent analytics across all your links | Pro+ | read-only |
list_agentlink_links | Links that received AI-agent traffic | Pro+ | read-only |
get_web2app_session | Redeem a single-use Web2App routing session token | Pro+ | write destructive |
OpenAI client profile (ChatGPT and Codex)
OAuth clients identified as OpenAI get a curated set of 29 tools. A client is identified as OpenAI when its Client ID Metadata Document URL is on chatgpt.com or openai.com (ChatGPT uses https://chatgpt.com/oauth/client.json), or when it registered through Dynamic Client Registration with redirect URIs that all share one chatgpt.com or openai.com host (subdomains included). Every other OAuth client and every API-key connection gets the default profile: every tool its plan includes.
For OpenAI clients, tools/list returns only the curated set (still filtered by plan), and tools/call answers any other tool name as an unknown tool. The override_scan argument of shorten_url is hidden and stripped, so an assistant can never create a link to a URL that Google Safe Browsing flags as dangerous.
Curated tools:
- Links:
shorten_url,bulk_shorten,list_links,get_link,update_link,delete_link,get_link_trust_score - Stats:
get_link_stats,get_recent_clicks,get_aggregate_stats - QR codes:
get_qr_code,get_qr_settings,update_qr_settings - Folders:
list_folders,create_folder,update_folder,delete_folder,assign_link_to_folder - Tags:
add_link_tag,remove_link_tag - UTM templates:
list_utm_templates,create_utm_template,delete_utm_template - Saved views:
list_saved_views,create_saved_view,update_saved_view,delete_saved_view - Account:
get_profile,get_usage
Webhooks, custom domains, namespaces, imports, AgentLink and affiliate tools are not offered to OpenAI clients: they reach third parties or need setup outside the chat.
Example MCP Request
MCP uses JSON-RPC 2.0. Here is a raw request that calls the shorten_url tool:
curl -X POST https://awsys.co/mcp \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shorten_url",
"arguments": {
"url": "https://example.com/campaign",
"custom_slug": "launch26"
}
}
}'
Response when the account's plan doesn't include custom slugs:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [{ "type": "text", "text": "{\n \"error\": \"Custom slugs are available on the Starter plan and higher. Plan details: https://awsys.co/#pricing\"\n}" }],
"structuredContent": {
"error": "Custom slugs are available on the Starter plan and higher. Plan details: https://awsys.co/#pricing"
},
"isError": true
}
}
In practice you don't call the MCP endpoint directly — AI clients handle the JSON-RPC layer once you configure the server URL and credentials.
Plan Access
Tool availability mirrors the REST API plan rules. The MCP server reads your current plan on every request — there is no caching. Features gated inside a tool return an error that names the plan that includes them, with a link to https://awsys.co/#pricing.