Self-host Cloudflare Worker (advanced)
Lectura de 4 min
Most people don't need this — but if you want full control over the OAuth flow, custom middleware, or self-hosting in a corp network, the Slima MCP server is an open-source Cloudflare Worker you can run yourself.

Why self-host
- Corp network: don't want traffic leaving
- Custom OAuth: integrate corp SSO
- Add audit logging / rate limiting
- Learning: understand the server's internals
Prereqs
- Node.js + npm
- A Cloudflare account (free tier works)
wranglerCLI (npm i -g wrangler)
Steps
1 · Fork the repo
git clone https://github.com/slima-ai/slima-mcp-server
cd slima-mcp-server
2 · Set up wrangler.toml
name = "my-slima-mcp"
main = "src/index.ts"
compatibility_date = "2026-01-01"
[[kv_namespaces]]
binding = "OAUTH_KV"
id = "your-kv-namespace-id"
[vars]
SLIMA_API_BASE = "https://slima.ai/api/v1"
3 · Deploy
npm install
wrangler login
npm run deploy:worker
Deploy yields a URL like https://my-slima-mcp.workers.dev.
4 · Point client config at your server
E.g. Claude Desktop:
"slima": {
"command": "npx",
"args": ["-y", "slima-mcp@0", "--server", "https://my-slima-mcp.workers.dev"]
}
Or in claude.ai's Custom Connector, set the URL to your worker.
Tokens for the Slima API
Self-host worker still talks to Slima's /api/v1 — your users still need a Slima account + API token.
Self-hosting doesn't bypass Slima subscriptions — your worker's traffic still hits the Slima API and is subject to the same quota / billing.
Debug
wrangler tail my-slima-mcp
Live production worker logs.
See: Advanced debug
Related
Was this helpful?