Connect an agent
Integrate mikrouli into your scripts and AI agents via REST API or the hosted MCP server.
Machine-readable guide (llms.txt)Step 1: Get an API key
All write endpoints and the MCP server require an API key. Sign in, open the API Keys page, create a key, and copy the mk_... value. The full secret is shown once at creation time only.
- Sign in to your account
- Open the API Keys page from the account menu
- Create a new key and copy the mk_... value
Keep the key secret. Pass it as the x-api-key header on every machine call.
REST API
Authentication header
Pass your API key in the x-api-key request header on every call.
x-api-key: mk_<your-key>
Create a short link
POST /api/urls with a JSON body containing the target URL.
curl -s -X POST https://mikrou.li/api/urls \
-H "Content-Type: application/json" \
-H "x-api-key: mk_<your-key>" \
-d '{"url":"https://example.com/long-url"}' | jq .
MCP server
Connect an MCP-aware agent harness to the hosted Streamable HTTP endpoint.
MCP endpoint
/api/mcp
Protocol: Streamable HTTP (MCP 2024-11-05)
Authenticate with the same x-api-key header as the REST API.
curl -s -X POST https://mikrou.li/api/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: mk_<your-key>" \
-d '{
"jsonrpc": "2.0",
"method": "initialize",
"id": 1,
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": { "name": "my-agent", "version": "1" }
}
}'
Add to Claude Code
Run this command once to register mikrouli as an MCP server in Claude Code:
claude mcp add --scope user --transport http mikrouli \
https://mikrou.li/api/mcp \
--header "x-api-key: mk_<your-key>"