When you are building a tool that lives inside an AI agent — an automation, an extension, a MCP-triggered workflow — you need a link shortener the agent can actually call. A REST API is one option. A hosted MCP server is the better one, and KooLink offers both.
Here is what "a shortener API for agents" should look like.
REST API for programmatic control
If you want to call a shortener from your own code, a REST API is the baseline. KooLink's is dead simple:
POST https://kool.ink/api/links
{ "url": "https://example.com/very/long/path" }
→ { "shortUrl": "https://kool.ink/xyz" }
Turn up with anonymous access — no API key, no account, no free-tier cap. Shorten one URL or ten thousand.
The response is JSON, so it is trivial to parse in any language.
MCP server for an AI agent
A REST API is not what an AI agent wants. An agent does not "call an endpoint" — it uses tools. That is exactly what the Model Context Protocol (MCP) provides.
Point your agent at KooLink's hosted MCP server and it gets a shorten_url tool:
https://mcp.kool.ink
Then inside Claude, Cursor, Windsurf, or any MCP client, you just ask:
shorten this for me: https://github.com/you/yourrepo/blob/main/docs/long/path.md
The agent calls shorten_url and hands you back kool.ink/xyz. No browser, no copy-paste, no leaving the tool you are in.
Both from the same service
The point of KooLink offering both is that you do not have to choose based on the integration you are using today. Shorten programmatically with the REST API, and let your agent do it with the MCP server. Same service, same free tier, same unlimited links.
What a good agent shortener has
- Anonymous. No API key to mint or rotate. The shorter the setup, the better.
- Unlimited. No cap that an automation will hit at 9am on Tuesday.
- Permanent. Links that do not expire after a period of inactivity.
- A stable JSON contract. So scripting and templates can rely on the response shape.
- An MCP server. So your agent can use it as a tool, not an endpoint.
KooLink is the only widely-used shortener that has all five. Most of the field ships a REST API and calls it a day.
Try it
- From code:
POST https://kool.ink/api/linkswith{"url": "..."} - From your agent: point it at
https://mcp.kool.ink - From your terminal:
npx @koolink/koolink https://example.com/long/path
Free forever. Unlimited. No signup.