Skip to content

Commit dd8e5b7

Browse files
wh4ucursoragent
andcommitted
Serve llms.txt from Worker at GET /llms.txt
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 948e58b commit dd8e5b7

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createMcpHandler } from "agents/mcp";
22
import { createServer } from "./mcp/server.js";
33
import type { Env } from "./types.js";
4+
import { LLMS_TXT_CONTENT } from "./llms-txt.js";
45

56
export { RateLimiter } from "./storage/rate-limiter.js";
67

@@ -10,6 +11,13 @@ export default {
1011
env: Env,
1112
ctx: ExecutionContext,
1213
): Promise<Response> => {
14+
const url = new URL(request.url);
15+
if (request.method === "GET" && url.pathname === "/llms.txt") {
16+
return new Response(LLMS_TXT_CONTENT, {
17+
headers: { "Content-Type": "text/plain; charset=utf-8" },
18+
});
19+
}
20+
1321
const server = createServer(env, ctx);
1422
const handler = createMcpHandler(server, {
1523
corsOptions: {

src/llms-txt.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Content for GET /llms.txt. Keep in sync with repo root llms.txt.
3+
*/
4+
export const LLMS_TXT_CONTENT = `# DomainsReseller MCP Server
5+
6+
> MCP server for managing domain names from your IDE using natural language. Built for the Webhosting4U domain registrar.
7+
8+
## Overview
9+
10+
Production-ready Model Context Protocol (MCP) server that exposes 32 tools for domain management: registration, transfer, renewal, DNS, nameservers, WHOIS contacts, lock, email forwarding, pricing, and credits. Runs on Cloudflare Workers. Designed for use with VS Code, Cursor, or any MCP-compatible IDE.
11+
12+
## How to use
13+
14+
- Endpoint: https://mcp-domains.webhosting4u.gr/mcp
15+
- Transport: Streamable HTTP
16+
- Auth: Call auth_login with email and DomainsReseller API key; receive a session token valid 12 hours. Use the session_token for all other tool calls.
17+
- Prerequisites: Domain Reseller account and API key from Webhosting4U; credits required for register/transfer/renew.
18+
19+
## Key links
20+
21+
- Repository: https://github.com/Webhosting4U/Domain-Names-MCP-Server
22+
- Setup guide: https://github.com/Webhosting4U/Domain-Names-MCP-Server/blob/main/docs/CLIENT_SETUP.md
23+
- Webhosting4U: https://webhosting4u.gr
24+
- Domain Reseller signup: https://webhosting4u.gr/customers/index.php?rp=/store/webhosting/domain-reseller
25+
- MCP protocol: https://modelcontextprotocol.io/
26+
27+
## Tech
28+
29+
TypeScript, Cloudflare Workers, Workers KV, D1, Durable Objects, MCP Streamable HTTP, Zod. API keys encrypted at rest (AES-256-GCM). AGPL-3.0.
30+
`;

0 commit comments

Comments
 (0)