TinyKit Pro Docs

MCP Integration (llms.txt)

TinyKit Pro includes a Model Context Protocol (MCP) integration via the /llms.txt endpoint. This endpoint provides site information optimized for consumption...

TinyKit Pro includes a Model Context Protocol (MCP) integration via the /llms.txt endpoint. This endpoint provides site information optimized for consumption by large language models.

What is llms.txt?

The llms.txt specification (https://llmstxt.org) defines a standardized format for providing website information to AI language models. Similar to robots.txt for web crawlers, llms.txt helps LLMs understand your site's structure and purpose.

Endpoint

URL: /llms.txt

Method: GET

Content-Type: text/plain; charset=utf-8

Cache: Public, max-age 3600 seconds (1 hour)

Implementation

The endpoint is implemented at src/app/llms.txt/route.ts:

import { fetchQuery } from "convex/nextjs";
import { api } from "@/convex/_generated/api";

export const dynamic = "force-dynamic";

export async function GET() {
  const baseUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000";

  try {
    const settings = await fetchQuery(
      api.siteSettings.public.queries.getPublicSettings,
      {},
    );

    const siteName = settings.siteName ?? "My SaaS App";
    const slogan = settings.slogan ?? "";
    const description =
      settings.description ?? "A production-ready SaaS application";

    const content = `# ${siteName}

> ${description}

${slogan ? `${slogan}\n\n` : ""}Built with Next.js, Convex, and Stripe.

## Links

- [Home](${baseUrl}): Main landing page
- [Sign Up](${baseUrl}/auth/sign-up): Create an account
- [Sign In](${baseUrl}/auth/sign-in): Access your account
`;

    return new Response(content, {
      headers: {
        "Content-Type": "text/plain; charset=utf-8",
        "Cache-Control": "public, max-age=3600, s-maxage=3600",
      },
    });
  } catch {
    // Fallback content
  }
}

Example Output

When accessed, the endpoint returns content like:

# TinySaaS

> A production-ready SaaS application for teams

Transform your organization productivity with real-time collaboration.

Built with Next.js, Convex, and Stripe.

## Links

- [Home](https://yourdomain.com): Main landing page
- [Sign Up](https://yourdomain.com/auth/sign-up): Create an account
- [Sign In](https://yourdomain.com/auth/sign-in): Access your account

Dynamic Content

The endpoint pulls content dynamically from your site settings:

SettingSourceFallback
Site NamesiteSettings.siteName"My SaaS App"
DescriptionsiteSettings.description"A production-ready SaaS application"
SlogansiteSettings.slogan(empty)
Base URLNEXT_PUBLIC_SITE_URL env var"http://localhost:3000"

Customization

To add additional links to your llms.txt output, modify src/app/llms.txt/route.ts:

const content = `# ${siteName}

> ${description}

## Links

- [Home](${baseUrl}): Main landing page
- [Sign Up](${baseUrl}/auth/sign-up): Create an account
- [Sign In](${baseUrl}/auth/sign-in): Access your account
- [Documentation](${baseUrl}/docs): Learn how to use our platform
- [API Reference](${baseUrl}/api-docs): Developer API documentation
- [Pricing](${baseUrl}/#pricing): View pricing plans
`;

Adding Sections

You can add more sections to help LLMs understand your site:

const content = `# ${siteName}

> ${description}

## Features

- Real-time collaboration
- Team management with roles
- Subscription billing
- Multi-organization support

## Links

- [Home](${baseUrl}): Main landing page
...

## API

The API is available at ${baseUrl}/api for authenticated users.

## Contact

For support, email support@yourdomain.com
`;

Testing

Visit your llms.txt endpoint directly:

curl http://localhost:3000/llms.txt

Or in the browser:

Use Cases

AI Assistant Integration

LLMs can use your llms.txt to understand:

  • What your application does
  • Where users can sign up or sign in
  • Key features and capabilities
  • How to navigate your site

Claude Code Integration

When using Claude Code with TinyKit Pro, the llms.txt endpoint provides context about your deployed application that AI assistants can reference.

SEO for AI

As AI-powered search becomes more prevalent, having a well-structured llms.txt helps AI systems accurately represent your site in responses.

Best Practices

  1. Keep it concise: LLMs work best with clear, focused information
  2. Update regularly: Ensure links and features are current
  3. Use standard format: Follow the llms.txt specification
  4. Include key actions: Sign up, sign in, main features
  5. Set appropriate cache: Balance freshness with performance

Environment Variables

VariablePurposeDefault
NEXT_PUBLIC_SITE_URLBase URL for generated linkshttp://localhost:3000

← Back to Technical Documentation

On this page

Ship your startup faster. In minutes.

Get TinyKit Pro