Skip to main content
The Model Context Protocol (MCP) enables AI assistants and development tools to interact directly with H0p. Create and manage short links, domains, and view analytics without leaving your AI workflow.

What is MCP?

MCP (Model Context Protocol) is an open standard that allows AI tools to securely connect to external services. With H0p’s MCP server, your AI assistant can:

Create links

Generate short links directly from conversations or code comments.

Manage domains

View and configure custom domains without opening the dashboard.

View analytics

Get click stats and performance data in your development workflow.

Organize content

Create and manage folders and tags programmatically.

Supported tools

H0p’s MCP server works with:
ToolTypeStatus
Claude DesktopDesktop appSupported
Claude CodeCLISupported
CursorIDESupported
WindsurfIDESupported
ChatGPTWeb appVia custom actions

Prerequisites

Before setting up MCP, you need:
  1. H0p account - Sign up at dashboard.h0p.co
  2. Organization slug - Found in your organization settings
Your MCP URL follows this pattern:
https://api.h0p.co/mcp/{organization-slug}
H0p’s MCP server uses OAuth 2.0 authentication. You’ll be prompted to authorize access when connecting for the first time.

Claude Desktop

Claude Desktop supports remote MCP servers with OAuth authentication.
1

Open Connectors settings

Open Claude Desktop and go to Settings > Connectors.
2

Add custom connector

Click Add custom connector at the bottom of the Connectors section.
3

Enter the MCP URL

Enter your H0p MCP server URL:
https://api.h0p.co/mcp/{your-org-slug}
Click Add to proceed.
4

Authenticate with OAuth

Claude Desktop will redirect you to H0p’s authorization page. Sign in with your H0p account and authorize the connection.Once authorized, Claude will have access to your H0p tools.
5

Configure tool permissions

Back in Settings > Connectors, click on H0p to configure which tools Claude can use. Enable or disable specific tools based on your needs.

Example usage

Once connected, ask Claude:
“Create a short link to https://example.com/landing with the slug ‘promo’”
“Show me the click stats for the last 7 days”
“List all my custom domains”

Claude Code

Claude Code supports OAuth 2.0 authentication for remote MCP servers.
1

Add the MCP server

Use the CLI to add H0p as a remote HTTP server:
claude mcp add --transport http h0p https://api.h0p.co/mcp/{your-org-slug}
2

Authenticate with OAuth

In Claude Code, use the /mcp command to authenticate:
> /mcp
Select Authenticate for H0p. This opens your browser for OAuth authorization.
3

Start using

After authentication, Claude Code has access to H0p tools. Authentication tokens are stored securely and refreshed automatically.
Use /mcp anytime to check connection status, re-authenticate, or clear authentication.
See the Claude Code integration guide for detailed setup instructions.

Cursor

Cursor supports MCP servers with OAuth authentication.
1

Open Cursor settings

Go to Settings > Features > MCP Servers.
2

Add H0p server

Add a new MCP server with the HTTP transport:
{
  "h0p": {
    "type": "http",
    "url": "https://api.h0p.co/mcp/{your-org-slug}"
  }
}
3

Authenticate

When Cursor attempts to connect, you’ll be prompted to authorize via OAuth. Complete the authorization in your browser.
4

Reload Cursor

Restart Cursor or reload the window to apply changes.
See the Cursor integration guide for detailed setup instructions.

Windsurf

Windsurf supports remote MCP servers with OAuth.
1

Open Windsurf settings

Navigate to Settings > AI > MCP Configuration.
2

Add H0p server

Configure the H0p MCP server:
{
  "servers": {
    "h0p": {
      "type": "http",
      "url": "https://api.h0p.co/mcp/{your-org-slug}"
    }
  }
}
3

Authenticate

Complete OAuth authorization when prompted.
See the Windsurf integration guide for detailed setup instructions.

ChatGPT

ChatGPT supports MCP servers with OAuth authentication via Developer Mode. This feature is available for Pro, Plus, Business, Enterprise, and Education accounts.

Available MCP tools

H0p’s MCP server provides these tools:
ToolDescription
create-short-linkCreate a new short link
update-short-linkUpdate an existing link
get-short-linkGet link details
list-short-linksList all short links
delete-short-linkDelete a link

Domains

ToolDescription
create-domainAdd a new custom domain
update-domainUpdate domain settings
get-domainGet domain details
list-domainsList all domains
get-all-domainsList all available domains including platform defaults
check-domain-dnsVerify domain DNS configuration
delete-domainRemove a domain

Folders

ToolDescription
create-folderCreate a new folder
update-folderUpdate folder name or color
get-folderGet folder details
list-foldersList all folders
delete-folderDelete a folder

Tags

ToolDescription
create-tagCreate a new tag
update-tagUpdate tag name or color
get-tagGet tag details
list-tagsList all tags
delete-tagDelete a tag

Analytics

ToolDescription
get-stats-overviewGet analytics grouped by dimension
get-clicks-over-timeGet daily click counts

Troubleshooting

If authorization fails:
  • Ensure you’re logged into the correct H0p account
  • Check that your organization slug in the URL is correct
  • Try clearing your browser cookies and re-authorizing
  • Verify your H0p account has access to the specified organization
Verify your MCP URL:
  • URL should be https://api.h0p.co/mcp/{org-slug}
  • Organization slug must match your active organization
  • Check your internet connection
MCP tools may take a moment to load. Try:
  • Refreshing the connection
  • Restarting your AI tool
  • Re-authenticating via /mcp (Claude Code) or Connectors settings
Your H0p account role determines available permissions:
  • Owners and Admins have full access
  • Members have limited access to some features
  • Check your role in organization settings
MCP requests count against API rate limits. If you hit limits:
  • Wait a few seconds between requests
  • Consider batching operations

Documentation MCP

In addition to the H0p MCP server for managing links, this documentation site also provides an MCP server for AI-assisted documentation browsing.

What it does

The documentation MCP allows AI tools to search and navigate H0p’s documentation. When connected, AI assistants can:
  • Search documentation content
  • Find relevant pages for specific questions
  • Navigate to the right documentation section

Connecting to the documentation MCP

Look for the MCP button on any documentation page to copy the configuration for your AI tool. This is separate from the main H0p MCP server and is specifically for browsing documentation.

Example queries

With the documentation MCP configured, you can ask your AI assistant:
“How do I create a webhook in H0p?”
“What are the rate limits for the H0p API?”
“Show me how to set up a custom domain”
The AI will search this documentation and provide relevant answers with links to the source pages.

Code generation

You can also ask your AI assistant to generate code that integrates with the H0p API. For example:
“Write a Go function that creates a short link with UTM parameters from a struct containing campaign data”
“Create a Python script that fetches all my short links and exports them to a CSV file”
“Build a TypeScript utility that batch-creates short links from an array of URLs”
The AI will use the documentation to understand the H0p API structure and generate accurate, working code:
// Example output for the Go request
func CreateCampaignLink(client *http.Client, apiKey string, campaign Campaign) (*ShortLink, error) {
    payload := map[string]interface{}{
        "destination": map[string]string{
            "type":  "link",
            "value": campaign.URL,
        },
        "slug": campaign.Slug,
        "utmSource":   campaign.Source,
        "utmMedium":   campaign.Medium,
        "utmCampaign": campaign.Name,
    }

    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST", "https://api.h0p.co/short-link", bytes.NewBuffer(body))
    req.Header.Set("x-api-key", apiKey)
    req.Header.Set("Content-Type", "application/json")

    resp, err := client.Do(req)
    // ... handle response
}

Best practices

Be specific about what you want:Good: “Create a short link to https://example.com/sale with slug ‘spring-sale’ and tag it with ‘marketing’”Less specific: “Make a link”
When creating multiple links, ask for them all at once to reduce API calls.
When using MCP with code generation, review the generated API calls before running them in production.

Next steps

API Reference

Complete API documentation.

Webhooks

Set up real-time notifications.