Skip to main content
Glama

ShortURLMCP

PyPI version PyPI downloads Python 3.10+ License: MIT MCP

Ein Model Context Protocol (MCP)-Server zum Kürzen von URLs unter Verwendung der Short URL API über die AceDataCloud API.

Erstellen Sie kurze, teilbare URLs direkt aus Claude, VS Code oder einem beliebigen MCP-kompatiblen Client.

Funktionen

  • URL-Kürzung - Wandeln Sie lange URLs in kurze, teilbare Links um

  • Stapelverarbeitung - Kürzen Sie mehrere URLs gleichzeitig (bis zu 10 pro Stapel)

  • Kostenloser Dienst - Kein Guthabenverbrauch pro Anfrage

  • Dauerhafte Links - Kurze URLs laufen nie ab

  • surl.id Domain - Kurze URLs verwenden die saubere surl.id-Domain

  • Bearer Auth - Sicherer API-Zugriff mit Token-Authentifizierung

Tool-Referenz

Tool

Beschreibung

shorturl_create

Erstellt eine kurze URL aus einer langen URL.

shorturl_batch_create

Erstellt kurze URLs für mehrere lange URLs in einem einzigen Stapel.

shorturl_get_usage_guide

Ruft einen umfassenden Leitfaden zur Verwendung der ShortURL-Tools ab.

shorturl_get_api_info

Ruft Informationen über den ShortURL-API-Dienst ab.

Schnellstart

1. API-Token abrufen

  1. Registrieren Sie sich auf der AceDataCloud-Plattform

  2. Gehen Sie zur API-Dokumentationsseite

  3. Klicken Sie auf "Acquire", um Ihr API-Token zu erhalten

  4. Kopieren Sie das Token für die unten stehende Verwendung

2. Den gehosteten Server verwenden (Empfohlen)

AceDataCloud hostet einen verwalteten MCP-Server — keine lokale Installation erforderlich.

Endpunkt: https://shorturl.mcp.acedata.cloud/mcp

Alle Anfragen erfordern ein Bearer-Token. Verwenden Sie das API-Token aus Schritt 1.

Claude.ai

Verbinden Sie sich direkt auf Claude.ai mit OAuth — kein API-Token erforderlich:

  1. Gehen Sie zu Claude.ai Einstellungen → Integrationen → Mehr hinzufügen

  2. Geben Sie die Server-URL ein: https://shorturl.mcp.acedata.cloud/mcp

  3. Schließen Sie den OAuth-Anmeldevorgang ab

  4. Beginnen Sie mit der Verwendung der Tools in Ihrer Konversation

Claude Desktop

Fügen Sie dies Ihrer Konfiguration hinzu (~/Library/Application Support/Claude/claude_desktop_config.json unter macOS):

{
  "mcpServers": {
    "shorturl": {
      "type": "streamable-http",
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Cursor / Windsurf

Fügen Sie dies Ihrer MCP-Konfiguration hinzu (.cursor/mcp.json oder .windsurf/mcp.json):

{
  "mcpServers": {
    "shorturl": {
      "type": "streamable-http",
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

VS Code (Copilot)

Fügen Sie dies Ihrer VS Code MCP-Konfiguration hinzu (.vscode/mcp.json):

{
  "servers": {
    "shorturl": {
      "type": "streamable-http",
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Oder installieren Sie die Ace Data Cloud MCP-Erweiterung für VS Code, die alle 15 MCP-Server mit einer Ein-Klick-Einrichtung bündelt.

JetBrains IDEs

  1. Gehen Sie zu Einstellungen → Tools → AI Assistant → Model Context Protocol (MCP)

  2. Klicken Sie auf HinzufügenHTTP

  3. Einfügen:

{
  "mcpServers": {
    "shorturl": {
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Claude Code

Claude Code unterstützt MCP-Server nativ:

claude mcp add shorturl --transport http https://shorturl.mcp.acedata.cloud/mcp \
  -h "Authorization: Bearer YOUR_API_TOKEN"

Oder fügen Sie es der .mcp.json Ihres Projekts hinzu:

{
  "mcpServers": {
    "shorturl": {
      "type": "streamable-http",
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Cline

Fügen Sie dies den MCP-Einstellungen von Cline hinzu (.cline/mcp_settings.json):

{
  "mcpServers": {
    "shorturl": {
      "type": "streamable-http",
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Amazon Q Developer

Fügen Sie dies Ihrer MCP-Konfiguration hinzu:

{
  "mcpServers": {
    "shorturl": {
      "type": "streamable-http",
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Roo Code

Fügen Sie dies den Roo Code MCP-Einstellungen hinzu:

{
  "mcpServers": {
    "shorturl": {
      "type": "streamable-http",
      "url": "https://shorturl.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Continue.dev

Fügen Sie dies der .continue/config.yaml hinzu:

mcpServers:
  - name: shorturl
    type: streamable-http
    url: https://shorturl.mcp.acedata.cloud/mcp
    headers:
      Authorization: "Bearer YOUR_API_TOKEN"

Zed

Fügen Sie dies den Einstellungen von Zed hinzu (~/.config/zed/settings.json):

{
  "language_models": {
    "mcp_servers": {
      "shorturl": {
        "url": "https://shorturl.mcp.acedata.cloud/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_TOKEN"
        }
      }
    }
  }
}

cURL-Test

# Health check (no auth required)
curl https://shorturl.mcp.acedata.cloud/health

# MCP initialize
curl -X POST https://shorturl.mcp.acedata.cloud/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

3. Oder lokal ausführen (Alternative)

Wenn Sie den Server lieber auf Ihrem eigenen Rechner ausführen möchten:

# Install from PyPI
pip install mcp-shorturl
# or
uvx mcp-shorturl

# Set your API token
export ACEDATACLOUD_API_TOKEN="your_token_here"

# Run (stdio mode for Claude Desktop / local clients)
mcp-shorturl

# Run (HTTP mode for remote access)
mcp-shorturl --transport http --port 8000

Claude Desktop (Lokal)

{
  "mcpServers": {
    "shorturl": {
      "command": "uvx",
      "args": ["mcp-shorturl"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_token_here"
      }
    }
  }
}

Docker (Self-Hosting)

docker pull ghcr.io/acedatacloud/mcp-shorturl:latest
docker run -p 8000:8000 ghcr.io/acedatacloud/mcp-shorturl:latest

Clients verbinden sich mit ihrem eigenen Bearer-Token — der Server extrahiert das Token aus dem Authorization-Header jeder Anfrage.

Verfügbare Tools

URL-Kürzungstools

Tool

Beschreibung

shorturl_create

Eine einzelne URL kürzen

shorturl_batch_create

Mehrere URLs gleichzeitig kürzen (max. 10)

Informationstools

Tool

Beschreibung

shorturl_get_usage_guide

Umfassenden Nutzungsleitfaden abrufen

shorturl_get_api_info

API-Details und Fehlercodes abrufen

Anwendungsbeispiele

Eine einzelne URL kürzen

User: Shorten this URL: https://platform.acedata.cloud/documents/a2303356-6672-4eb8-9778-75f55c998fe9

Claude: I'll shorten that URL for you.
[Calls shorturl_create with url="https://platform.acedata.cloud/documents/a2303356-6672-4eb8-9778-75f55c998fe9"]

Result: https://surl.id/1uHCs01xa5

Mehrere URLs stapelweise kürzen

User: Shorten these URLs for my social media posts:
- https://example.com/blog/very-long-article-title-about-ai
- https://example.com/products/new-release-2024

Claude: I'll shorten both URLs at once.
[Calls shorturl_batch_create with urls=[...]]
User: I need clean short links for these reference URLs in my doc.

Claude: I'll create short links for all your references.
[Calls shorturl_batch_create with the list of URLs]

Antwortstruktur

Erfolgreiche Antwort

{
  "success": true,
  "data": {
    "url": "https://surl.id/1uHCs01xa5"
  }
}

Fehlerantwort

{
  "success": false,
  "error": {
    "code": "api_error",
    "message": "fetch failed"
  },
  "trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}

Konfiguration

Umgebungsvariablen

Variable

Beschreibung

Standardwert

ACEDATACLOUD_API_TOKEN

API-Token von AceDataCloud

Erforderlich

ACEDATACLOUD_API_BASE_URL

API-Basis-URL

https://api.acedata.cloud

ACEDATACLOUD_OAUTH_CLIENT_ID

OAuth-Client-ID (gehosteter Modus)

ACEDATACLOUD_PLATFORM_BASE_URL

Plattform-Basis-URL

https://platform.acedata.cloud

SHORTURL_REQUEST_TIMEOUT

Anfrage-Timeout in Sekunden

30

LOG_LEVEL

Protokollierungsebene

INFO

Befehlszeilenoptionen

mcp-shorturl --help

Options:
  --version          Show version
  --transport        Transport mode: stdio (default) or http
  --port             Port for HTTP transport (default: 8000)

Entwicklung

Entwicklungsumgebung einrichten

# Clone repository
git clone https://github.com/AceDataCloud/ShortURLMCP.git
cd ShortURLMCP

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows

# Install with dev dependencies
pip install -e ".[dev,test]"

Tests ausführen

# Run unit tests
pytest

# Run with coverage
pytest --cov=core --cov=tools

# Run integration tests (requires API token)
pytest tests/test_integration.py -m integration

Codequalität

# Format code
ruff format .

# Lint code
ruff check .

# Type check
mypy core tools

Erstellen & Veröffentlichen

# Install build dependencies
pip install -e ".[release]"

# Build package
python -m build

# Upload to PyPI
twine upload dist/*

Projektstruktur

ShortURLMCP/
├── core/                   # Core modules
│   ├── __init__.py
│   ├── client.py          # HTTP client for ShortURL API
│   ├── config.py          # Configuration management
│   ├── exceptions.py      # Custom exceptions
│   └── server.py          # MCP server initialization
├── tools/                  # MCP tool definitions
│   ├── __init__.py
│   ├── shorturl_tools.py  # URL shortening tools
│   └── info_tools.py      # Information tools
├── prompts/                # MCP prompt templates
│   └── __init__.py
├── tests/                  # Test suite
│   ├── conftest.py
│   ├── test_client.py
│   ├── test_config.py
│   └── test_integration.py
├── deploy/                 # Deployment configs
│   ├── run.sh
│   └── production/
│       ├── deployment.yaml
│       ├── ingress.yaml
│       └── service.yaml
├── .env.example           # Environment template
├── .gitignore
├── .ruff.toml             # Ruff linter configuration
├── CHANGELOG.md
├── Dockerfile             # Docker image for HTTP mode
├── docker-compose.yaml    # Docker Compose config
├── LICENSE
├── main.py                # Entry point
├── pyproject.toml         # Project configuration
└── README.md

API-Referenz

Dieser Server umschließt die AceDataCloud Short URL API:

  • Endpunkt: POST /shorturl

  • Eingabe: { "content": "https://long-url.example.com/..." }

  • Ausgabe: { "success": true, "data": { "url": "https://surl.id/..." } }

  • Preise: Kostenlos (0 Credits)

  • Authentifizierung: Bearer-Token

Vollständige API-Dokumentation: AceDataCloud-Plattform

Lizenz

MIT-Lizenz - siehe LICENSE für Details.

Install Server
A
security – no known vulnerabilities
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AceDataCloud/MCPShortURL'

If you have feedback or need assistance with the MCP directory API, please join our Discord server