Claude Code Integration ShortURL MCP

📘 OverviewClaude Code MCP Overview →

When writing documentation, sending PR descriptions, or sharing links with colleagues, those long GitHub permanent links or parameterized URLs can be annoying. By connecting to the ShortURL MCP Server, you can shorten long links into a clean https://surl.id/xxxxx with just one command in the Claude Code terminal.

Obtain API Token

Before using the ShortURL MCP Server, you need to prepare an Ace Data Cloud API Token. The method to obtain it is consistent with the Claude Code VS Code configuration tutorial:

  1. Open the Ace Data Cloud Console - Application List to get your API Token for backup.
  2. If you are not logged in or registered, you will be automatically redirected to the login page; after logging in or registering, you will be automatically returned to the current page.
  3. The first application will come with a free quota, allowing you to experience the Claude Code MCP service for free.

Get Ace Data Cloud API Key

One token can be used for all MCP Servers provided by Ace Data Cloud, and there is no need to apply separately for ShortURL. The documentation and screenshots suggest displaying only a masked version, such as YOUR_ACEDATACLOUD_API_KEY, and do not paste the full token into public repositories, issues, screenshots, or chat records.

Using the web version of claude.ai or Claude Desktop? They support OAuth one-click authorization, eliminating the need to manually fill in the token. For details, see the Claude.ai / Desktop tutorial for ShortURL MCP.

Configure Claude Code

Choose one from the following three options. -H must be uppercase; lowercase -h is --help; please replace the token after Authorization with the actual value you copied from the console.

For current project only: local

Suitable for trial use, the configuration is bound only to the project directory where you run the command. Claude Code will write the record into the local ~/.claude.json, along with the current project path.

claude mcp add shorturl --transport http https://shorturl.mcp.acedata.cloud/mcp \
  -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
  -s local

Usable for all projects: user

Suitable for frequent use of ShortURL MCP across multiple projects. The configuration is written into the local ~/.claude.json user-level configuration, and any project opened in Claude Code thereafter will be able to see it.

claude mcp add shorturl --transport http https://shorturl.mcp.acedata.cloud/mcp \
  -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
  -s user

Shared with the project: project

Suitable for team projects. The configuration is written into the .mcp.json in the current project root directory, which can be submitted to a private repository for teammates to reuse; do not submit the real token to public repositories, and it is recommended to change it to an environment variable placeholder or have each person add it locally.

claude mcp add shorturl --transport http https://shorturl.mcp.acedata.cloud/mcp \
  -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
  -s project

When the project-level configuration is read by Claude Code for the first time, it may display Pending approval, and you need to confirm trust in this project configuration within the Claude Code session. This is a normal security prompt.

Verify Connection

After configuration, run:

claude mcp list

If you see shorturl showing ✓ Connected, it indicates a successful handshake. If it fails, check the token, service URL, and configuration scope; do not judge the current status based on historical client versions or fixed tool counts.

Use Cases

After configuration, return to the Claude Code session and directly use natural language to call ShortURL:

When writing commit messages or PR descriptions

To reference an issue or document link, but it's too long:

Shorten this issue link; I want to put it in the commit message.

Batch processing links in README

shorturl_batch_create shortens multiple links at once:

Help me replace all long external links in the README with short links.

Sharing with non-technical colleagues

PMs may be confused by a string of hash character links; short links are more intuitive and friendly:

Please shorten these document links; I want to send them to the group.

Tool List

Tool Description
shorturl_create Generate short links
shorturl_batch_create Batch generate short links
shorturl_get_api_info Get API information
shorturl_get_usage_guide Get usage guide