doccupine 0.0.89 → 0.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +29 -0
  2. package/dist/index.js +127 -1
  3. package/dist/templates/components/layout/Button.d.ts +1 -1
  4. package/dist/templates/components/layout/Button.js +9 -0
  5. package/dist/templates/components/layout/Footer.d.ts +1 -1
  6. package/dist/templates/components/layout/Footer.js +1 -1
  7. package/dist/templates/llms/llmsFull.d.ts +12 -0
  8. package/dist/templates/llms/llmsFull.js +59 -0
  9. package/dist/templates/llms/llmsIndex.d.ts +9 -0
  10. package/dist/templates/llms/llmsIndex.js +105 -0
  11. package/dist/templates/llms/llmsPage.d.ts +2 -0
  12. package/dist/templates/llms/llmsPage.js +20 -0
  13. package/dist/templates/mdx/accordion.mdx.d.ts +1 -1
  14. package/dist/templates/mdx/accordion.mdx.js +21 -16
  15. package/dist/templates/mdx/ai-assistant.mdx.d.ts +1 -1
  16. package/dist/templates/mdx/ai-assistant.mdx.js +22 -5
  17. package/dist/templates/mdx/analytics.mdx.d.ts +1 -1
  18. package/dist/templates/mdx/analytics.mdx.js +15 -4
  19. package/dist/templates/mdx/buttons.mdx.d.ts +1 -1
  20. package/dist/templates/mdx/buttons.mdx.js +10 -2
  21. package/dist/templates/mdx/callouts.mdx.d.ts +1 -1
  22. package/dist/templates/mdx/callouts.mdx.js +10 -17
  23. package/dist/templates/mdx/cards.mdx.d.ts +1 -1
  24. package/dist/templates/mdx/cards.mdx.js +10 -5
  25. package/dist/templates/mdx/code.mdx.d.ts +1 -1
  26. package/dist/templates/mdx/code.mdx.js +7 -3
  27. package/dist/templates/mdx/color-swatches.mdx.d.ts +1 -1
  28. package/dist/templates/mdx/color-swatches.mdx.js +7 -4
  29. package/dist/templates/mdx/columns.mdx.d.ts +1 -1
  30. package/dist/templates/mdx/columns.mdx.js +3 -0
  31. package/dist/templates/mdx/commands.mdx.d.ts +1 -1
  32. package/dist/templates/mdx/commands.mdx.js +7 -4
  33. package/dist/templates/mdx/components.mdx.d.ts +1 -1
  34. package/dist/templates/mdx/components.mdx.js +1 -0
  35. package/dist/templates/mdx/deployment-and-hosting.mdx.d.ts +1 -1
  36. package/dist/templates/mdx/deployment-and-hosting.mdx.js +6 -0
  37. package/dist/templates/mdx/fields.mdx.d.ts +1 -1
  38. package/dist/templates/mdx/fields.mdx.js +3 -0
  39. package/dist/templates/mdx/fonts.mdx.d.ts +1 -1
  40. package/dist/templates/mdx/fonts.mdx.js +13 -2
  41. package/dist/templates/mdx/footer-links.mdx.d.ts +1 -1
  42. package/dist/templates/mdx/footer-links.mdx.js +5 -0
  43. package/dist/templates/mdx/globals.mdx.d.ts +1 -1
  44. package/dist/templates/mdx/globals.mdx.js +16 -13
  45. package/dist/templates/mdx/headers-and-text.mdx.d.ts +1 -1
  46. package/dist/templates/mdx/headers-and-text.mdx.js +22 -2
  47. package/dist/templates/mdx/icons.mdx.d.ts +1 -1
  48. package/dist/templates/mdx/icons.mdx.js +3 -0
  49. package/dist/templates/mdx/image-and-embeds.mdx.d.ts +1 -1
  50. package/dist/templates/mdx/image-and-embeds.mdx.js +19 -10
  51. package/dist/templates/mdx/index.mdx.d.ts +1 -1
  52. package/dist/templates/mdx/index.mdx.js +2 -2
  53. package/dist/templates/mdx/lists-and-tables.mdx.d.ts +1 -1
  54. package/dist/templates/mdx/lists-and-tables.mdx.js +8 -2
  55. package/dist/templates/mdx/media-and-assets.mdx.d.ts +1 -1
  56. package/dist/templates/mdx/media-and-assets.mdx.js +14 -5
  57. package/dist/templates/mdx/model-context-protocol.mdx.d.ts +1 -1
  58. package/dist/templates/mdx/model-context-protocol.mdx.js +31 -15
  59. package/dist/templates/mdx/navigation.mdx.d.ts +1 -1
  60. package/dist/templates/mdx/navigation.mdx.js +9 -0
  61. package/dist/templates/mdx/platform/ai-assistant.mdx.d.ts +1 -1
  62. package/dist/templates/mdx/platform/ai-assistant.mdx.js +7 -0
  63. package/dist/templates/mdx/platform/analytics.mdx.d.ts +1 -1
  64. package/dist/templates/mdx/platform/analytics.mdx.js +7 -0
  65. package/dist/templates/mdx/platform/billing.mdx.d.ts +1 -1
  66. package/dist/templates/mdx/platform/billing.mdx.js +8 -0
  67. package/dist/templates/mdx/platform/build-and-deploy.mdx.d.ts +1 -1
  68. package/dist/templates/mdx/platform/build-and-deploy.mdx.js +6 -0
  69. package/dist/templates/mdx/platform/creating-a-project.mdx.d.ts +1 -1
  70. package/dist/templates/mdx/platform/creating-a-project.mdx.js +7 -0
  71. package/dist/templates/mdx/platform/custom-domains.mdx.d.ts +1 -1
  72. package/dist/templates/mdx/platform/custom-domains.mdx.js +5 -0
  73. package/dist/templates/mdx/platform/external-links.mdx.d.ts +1 -1
  74. package/dist/templates/mdx/platform/external-links.mdx.js +5 -0
  75. package/dist/templates/mdx/platform/file-editor.mdx.d.ts +1 -1
  76. package/dist/templates/mdx/platform/file-editor.mdx.js +7 -0
  77. package/dist/templates/mdx/platform/fonts-settings.mdx.d.ts +1 -1
  78. package/dist/templates/mdx/platform/fonts-settings.mdx.js +5 -0
  79. package/dist/templates/mdx/platform/index.mdx.d.ts +1 -1
  80. package/dist/templates/mdx/platform/index.mdx.js +5 -0
  81. package/dist/templates/mdx/platform/navigation-settings.mdx.d.ts +1 -1
  82. package/dist/templates/mdx/platform/navigation-settings.mdx.js +20 -4
  83. package/dist/templates/mdx/platform/project-settings.mdx.d.ts +1 -1
  84. package/dist/templates/mdx/platform/project-settings.mdx.js +4 -0
  85. package/dist/templates/mdx/platform/publishing.mdx.d.ts +1 -1
  86. package/dist/templates/mdx/platform/publishing.mdx.js +6 -0
  87. package/dist/templates/mdx/platform/site-settings.mdx.d.ts +1 -1
  88. package/dist/templates/mdx/platform/site-settings.mdx.js +8 -0
  89. package/dist/templates/mdx/platform/team-members.mdx.d.ts +1 -1
  90. package/dist/templates/mdx/platform/team-members.mdx.js +8 -0
  91. package/dist/templates/mdx/platform/theme-settings.mdx.d.ts +1 -1
  92. package/dist/templates/mdx/platform/theme-settings.mdx.js +7 -0
  93. package/dist/templates/mdx/sections.mdx.d.ts +1 -1
  94. package/dist/templates/mdx/sections.mdx.js +22 -1
  95. package/dist/templates/mdx/steps.mdx.d.ts +1 -1
  96. package/dist/templates/mdx/steps.mdx.js +7 -5
  97. package/dist/templates/mdx/tabs.mdx.d.ts +1 -1
  98. package/dist/templates/mdx/tabs.mdx.js +7 -2
  99. package/dist/templates/mdx/theme.mdx.d.ts +1 -1
  100. package/dist/templates/mdx/theme.mdx.js +10 -0
  101. package/dist/templates/mdx/update.mdx.d.ts +1 -1
  102. package/dist/templates/mdx/update.mdx.js +17 -12
  103. package/dist/templates/package.js +14 -14
  104. package/dist/templates/pnpmWorkspace.d.ts +1 -0
  105. package/dist/templates/pnpmWorkspace.js +7 -0
  106. package/package.json +6 -7
@@ -6,13 +6,17 @@ category: "Components"
6
6
  categoryOrder: 1
7
7
  order: 2
8
8
  ---
9
+
9
10
  # Lists and Tables
11
+
10
12
  Present structured information using lists or tables.
11
13
 
12
14
  ## Lists
13
- Markdown supports both *ordered* and *unordered* lists, as well as nested list structures.
15
+
16
+ Markdown supports both _ordered_ and _unordered_ lists, as well as nested list structures.
14
17
 
15
18
  ### Ordered List
19
+
16
20
  Start each item with a number followed by a period to create an ordered list.
17
21
 
18
22
  \`\`\`md
@@ -27,8 +31,8 @@ Start each item with a number followed by a period to create an ordered list.
27
31
  3. Third item
28
32
  4. Fourth item
29
33
 
30
-
31
34
  ### Unordered List
35
+
32
36
  Use dashes (\`-\`), asterisks (\`*\`), or plus signs (\`+\`) before each item for unordered lists.
33
37
 
34
38
  \`\`\`md
@@ -44,6 +48,7 @@ Use dashes (\`-\`), asterisks (\`*\`), or plus signs (\`+\`) before each item fo
44
48
  - Fourth item
45
49
 
46
50
  ### Nested List
51
+
47
52
  Indent items under another to create nested lists.
48
53
 
49
54
  \`\`\`md
@@ -61,6 +66,7 @@ Indent items under another to create nested lists.
61
66
  - Third item
62
67
 
63
68
  ## Tables
69
+
64
70
  Markdown tables use pipes (\`|\`) to separate columns and hyphens (\`---\`) to define the header row. Place a pipe at the start and end of each row for better compatibility.
65
71
 
66
72
  \`\`\`md
@@ -1 +1 @@
1
- export declare const mediaAndAssetsMdxTemplate = "---\ntitle: \"Media and assets\"\ndescription: \"Serve static files like images, favicons, fonts, and Open Graph previews from the public directory.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 6\n---\n# Media and assets\nDoccupine watches a `public` directory in your project root (the same folder where you execute `npx doccupine`) and copies its contents into the generated Next.js `public` folder. Use it to serve static files such as favicons, Open Graph preview images, custom fonts, or any other media your documentation needs.\n\n## The public directory\nCreate a `public` folder at your project root. Any file you place inside is automatically synced to the generated site and served from the root URL path.\n\n```text\nmy-docs/\n\u251C\u2500\u2500 public/\n\u2502 \u251C\u2500\u2500 favicon.ico\n\u2502 \u251C\u2500\u2500 og-image.png\n\u2502 \u251C\u2500\u2500 logo.svg\n\u2502 \u2514\u2500\u2500 fonts/\n\u2502 \u2514\u2500\u2500 custom-font.woff2\n\u251C\u2500\u2500 docs/\n\u2502 \u2514\u2500\u2500 index.mdx\n\u251C\u2500\u2500 config.json\n\u2514\u2500\u2500 theme.json\n```\n\n## How assets are served\nFiles in the `public` directory are available at the root of your deployed domain. The path inside `public` maps directly to the URL path.\n\n| File | URL |\n|-------------------------------|--------------------------------------------|\n| `public/favicon.ico` | `https://your-domain.com/favicon.ico` |\n| `public/og-image.png` | `https://your-domain.com/og-image.png` |\n| `public/logo.svg` | `https://your-domain.com/logo.svg` |\n| `public/fonts/custom-font.woff2` | `https://your-domain.com/fonts/custom-font.woff2` |\n\n## Common use cases\n\n### Favicon\nDrop a `favicon.ico` into the `public` folder. Browsers pick it up automatically from the root path.\n\n```text\npublic/favicon.ico \u2192 https://your-domain.com/favicon.ico\n```\n\n### Open Graph preview image\nAdd an image for link previews on social media. Reference it in your `config.json` so Doccupine sets the correct meta tags.\n\n```text\npublic/og-image.png \u2192 https://your-domain.com/og-image.png\n```\n\n### Custom fonts\nPlace font files in `public` and reference them from your `fonts.json`. See the **Fonts** page for full configuration details.\n\n```text\npublic/fonts/custom-font.woff2 \u2192 https://your-domain.com/fonts/custom-font.woff2\n```\n\n### Images and other media\nAny image or file you want to reference in your MDX pages can live in `public`. Use a root-relative path in your content:\n\n```mdx\n![Architecture diagram](/architecture.png)\n```\n\n## Live syncing\n\n<Callout type=\"info\">\n Doccupine watches the `public` directory for changes while running. When you add, update, or remove a file, the generated site is updated automatically.\n</Callout>\n\n## Tips\n- **Keep it flat**: For a small number of files, placing them directly in `public` keeps paths short and simple.\n- **Use subfolders for organization**: For larger projects, group assets into folders like `public/fonts`, `public/images`, or `public/icons`.\n- **Mind file size**: Optimize images before adding them to keep deployment size and load times low.\n- **Consistent naming**: Use lowercase, hyphen-separated filenames (e.g., `og-image.png`) for predictable URLs.";
1
+ export declare const mediaAndAssetsMdxTemplate = "---\ntitle: \"Media and assets\"\ndescription: \"Serve static files like images, favicons, fonts, and Open Graph previews from the public directory.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 6\n---\n\n# Media and assets\n\nDoccupine watches a `public` directory in your project root (the same folder where you execute `npx doccupine`) and copies its contents into the generated Next.js `public` folder. Use it to serve static files such as favicons, Open Graph preview images, custom fonts, or any other media your documentation needs.\n\n## The public directory\n\nCreate a `public` folder at your project root. Any file you place inside is automatically synced to the generated site and served from the root URL path.\n\n```text\nmy-docs/\n\u251C\u2500\u2500 public/\n\u2502 \u251C\u2500\u2500 favicon.ico\n\u2502 \u251C\u2500\u2500 og-image.png\n\u2502 \u251C\u2500\u2500 logo.svg\n\u2502 \u2514\u2500\u2500 fonts/\n\u2502 \u2514\u2500\u2500 custom-font.woff2\n\u251C\u2500\u2500 docs/\n\u2502 \u2514\u2500\u2500 index.mdx\n\u251C\u2500\u2500 config.json\n\u2514\u2500\u2500 theme.json\n```\n\n## How assets are served\n\nFiles in the `public` directory are available at the root of your deployed domain. The path inside `public` maps directly to the URL path.\n\n| File | URL |\n| -------------------------------- | ------------------------------------------------- |\n| `public/favicon.ico` | `https://your-domain.com/favicon.ico` |\n| `public/og-image.png` | `https://your-domain.com/og-image.png` |\n| `public/logo.svg` | `https://your-domain.com/logo.svg` |\n| `public/fonts/custom-font.woff2` | `https://your-domain.com/fonts/custom-font.woff2` |\n\n## Common use cases\n\n### Favicon\n\nDrop a `favicon.ico` into the `public` folder. Browsers pick it up automatically from the root path.\n\n```text\npublic/favicon.ico \u2192 https://your-domain.com/favicon.ico\n```\n\n### Open Graph preview image\n\nAdd an image for link previews on social media. Reference it in your `config.json` so Doccupine sets the correct meta tags.\n\n```text\npublic/og-image.png \u2192 https://your-domain.com/og-image.png\n```\n\n### Custom fonts\n\nPlace font files in `public` and reference them from your `fonts.json`. See the **Fonts** page for full configuration details.\n\n```text\npublic/fonts/custom-font.woff2 \u2192 https://your-domain.com/fonts/custom-font.woff2\n```\n\n### Images and other media\n\nAny image or file you want to reference in your MDX pages can live in `public`. Use a root-relative path in your content:\n\n```mdx\n![Architecture diagram](/architecture.png)\n```\n\n## Live syncing\n\n<Callout type=\"info\">\n Doccupine watches the `public` directory for changes while running. When you add, update, or remove a file, the generated site is updated automatically.\n</Callout>\n\n## Tips\n\n- **Keep it flat**: For a small number of files, placing them directly in `public` keeps paths short and simple.\n- **Use subfolders for organization**: For larger projects, group assets into folders like `public/fonts`, `public/images`, or `public/icons`.\n- **Mind file size**: Optimize images before adding them to keep deployment size and load times low.\n- **Consistent naming**: Use lowercase, hyphen-separated filenames (e.g., `og-image.png`) for predictable URLs.";
@@ -6,10 +6,13 @@ category: "Configuration"
6
6
  categoryOrder: 3
7
7
  order: 6
8
8
  ---
9
+
9
10
  # Media and assets
11
+
10
12
  Doccupine watches a \`public\` directory in your project root (the same folder where you execute \`npx doccupine\`) and copies its contents into the generated Next.js \`public\` folder. Use it to serve static files such as favicons, Open Graph preview images, custom fonts, or any other media your documentation needs.
11
13
 
12
14
  ## The public directory
15
+
13
16
  Create a \`public\` folder at your project root. Any file you place inside is automatically synced to the generated site and served from the root URL path.
14
17
 
15
18
  \`\`\`text
@@ -27,18 +30,20 @@ my-docs/
27
30
  \`\`\`
28
31
 
29
32
  ## How assets are served
33
+
30
34
  Files in the \`public\` directory are available at the root of your deployed domain. The path inside \`public\` maps directly to the URL path.
31
35
 
32
- | File | URL |
33
- |-------------------------------|--------------------------------------------|
34
- | \`public/favicon.ico\` | \`https://your-domain.com/favicon.ico\` |
35
- | \`public/og-image.png\` | \`https://your-domain.com/og-image.png\` |
36
- | \`public/logo.svg\` | \`https://your-domain.com/logo.svg\` |
36
+ | File | URL |
37
+ | -------------------------------- | ------------------------------------------------- |
38
+ | \`public/favicon.ico\` | \`https://your-domain.com/favicon.ico\` |
39
+ | \`public/og-image.png\` | \`https://your-domain.com/og-image.png\` |
40
+ | \`public/logo.svg\` | \`https://your-domain.com/logo.svg\` |
37
41
  | \`public/fonts/custom-font.woff2\` | \`https://your-domain.com/fonts/custom-font.woff2\` |
38
42
 
39
43
  ## Common use cases
40
44
 
41
45
  ### Favicon
46
+
42
47
  Drop a \`favicon.ico\` into the \`public\` folder. Browsers pick it up automatically from the root path.
43
48
 
44
49
  \`\`\`text
@@ -46,6 +51,7 @@ public/favicon.ico → https://your-domain.com/favicon.ico
46
51
  \`\`\`
47
52
 
48
53
  ### Open Graph preview image
54
+
49
55
  Add an image for link previews on social media. Reference it in your \`config.json\` so Doccupine sets the correct meta tags.
50
56
 
51
57
  \`\`\`text
@@ -53,6 +59,7 @@ public/og-image.png → https://your-domain.com/og-image.png
53
59
  \`\`\`
54
60
 
55
61
  ### Custom fonts
62
+
56
63
  Place font files in \`public\` and reference them from your \`fonts.json\`. See the **Fonts** page for full configuration details.
57
64
 
58
65
  \`\`\`text
@@ -60,6 +67,7 @@ public/fonts/custom-font.woff2 → https://your-domain.com/fonts/custom-font.wof
60
67
  \`\`\`
61
68
 
62
69
  ### Images and other media
70
+
63
71
  Any image or file you want to reference in your MDX pages can live in \`public\`. Use a root-relative path in your content:
64
72
 
65
73
  \`\`\`mdx
@@ -73,6 +81,7 @@ Any image or file you want to reference in your MDX pages can live in \`public\`
73
81
  </Callout>
74
82
 
75
83
  ## Tips
84
+
76
85
  - **Keep it flat**: For a small number of files, placing them directly in \`public\` keeps paths short and simple.
77
86
  - **Use subfolders for organization**: For larger projects, group assets into folders like \`public/fonts\`, \`public/images\`, or \`public/icons\`.
78
87
  - **Mind file size**: Optimize images before adding them to keep deployment size and load times low.
@@ -1 +1 @@
1
- export declare const mcpMdxTemplate = "---\ntitle: \"Model Context Protocol\"\ndescription: \"Connect your Doccupine documentation to AI tools with an MCP server for enhanced AI-powered documentation search.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 9\n---\n# Model Context Protocol\nConnect your documentation to AI tools with a hosted MCP server.\n\nDoccupine automatically generates a Model Context Protocol (MCP) server from your documentation, making your content accessible to AI applications like Claude, Cursor, VS Code, and other MCP-compatible tools. Your MCP server exposes semantic search capabilities, allowing AI tools to query your documentation directly and provide accurate, context-aware answers.\n\n<Callout type=\"warning\">\n The MCP server requires the [AI Assistant](/ai-assistant) to be configured. Make sure you have set up your LLM provider and API keys before using the MCP server.\n</Callout>\n\n## About MCP servers\n\nThe Model Context Protocol (MCP) is an open protocol that creates standardized connections between AI applications and external services, like documentation. Doccupine generates an MCP server from your documentation, preparing your content for the broader AI ecosystem where any MCP client can connect to your documentation.\n\nYour MCP server exposes search and retrieval tools for AI applications to query your documentation. Your users must connect your MCP server to their preferred AI tools to access your documentation.\n\n### How MCP servers work\n\nWhen an AI tool has your documentation MCP server connected, the AI tool can search your documentation directly instead of making a generic web search in response to a user's prompt. Your MCP server provides access to all indexed content from your documentation site.\n\n* The LLM can proactively search your documentation while generating a response, not just when explicitly asked.\n* The LLM determines when to use the search tool based on the context of the conversation and the relevance of your documentation.\n* Each tool call happens during the generation process, so the LLM searches up-to-date information from your documentation to generate its response.\n\n### MCP compared to web search\n\nAI tools can search the web, but MCP provides distinct advantages for documentation.\n\n* **Direct source access**: Web search depends on what search engines have indexed, which may be stale or incomplete. MCP searches your current indexed documentation directly.\n* **Integrated workflow**: MCP allows the AI to search during response generation rather than performing a separate web search.\n* **Semantic search**: MCP uses vector embeddings for semantic similarity search, providing more relevant results than keyword-based web search.\n* **No search noise**: SEO and ranking algorithms influence web search results. MCP goes straight to your documentation content.\n\n## Access your MCP server\n\nDoccupine automatically generates an MCP server for your documentation and hosts it at your documentation URL with the `/api/mcp` path. For example, if your documentation is hosted at `https://example.com`, your MCP server is available at `https://example.com/api/mcp`.\n\nThe MCP server provides both a GET endpoint to discover available tools and a POST endpoint to execute tool calls.\n\n### Authentication\n\nYou can optionally protect your MCP server with an API key by setting the `DOCS_API_KEY` environment variable in your `.env` file:\n\n```bash\nDOCS_API_KEY=your-secret-key\n```\n\nWhen `DOCS_API_KEY` is set, all requests to `/api/mcp` must include an `Authorization` header with a Bearer token:\n\n```text\nAuthorization: Bearer your-secret-key\n```\n\nRequests without a valid token receive a `401 Unauthorized` response. When `DOCS_API_KEY` is not set, the MCP server is publicly accessible with no authentication required.\n\n<Callout type=\"note\">\n Authentication only applies to the `/api/mcp` endpoint. The `/api/rag` endpoint used by the built-in AI Assistant chat is not affected by this setting.\n</Callout>\n\n### API Endpoints\n\n#### GET /api/mcp\n\nReturns information about available tools and the current index status.\n\n**Response:**\n```json\n{\n \"tools\": [\n {\n \"name\": \"search_docs\",\n \"description\": \"Search through the documentation content using semantic search...\",\n \"inputSchema\": { ... }\n },\n ...\n ],\n \"index\": {\n \"ready\": true,\n \"chunkCount\": 150\n }\n}\n```\n\n#### POST /api/mcp\n\nExecutes an MCP tool call.\n\n**Request Body:**\n```json\n{\n \"tool\": \"search_docs\",\n \"params\": {\n \"query\": \"how to deploy\",\n \"limit\": 6\n }\n}\n```\n\n**Response:**\n```json\n{\n \"content\": [\n {\n \"path\": \"app/deployment-and-hosting/page.tsx\",\n \"uri\": \"docs://deployment-and-hosting\",\n \"score\": \"0.892\",\n \"text\": \"Deploy your Doccupine site as a Next.js application...\"\n },\n ...\n ]\n}\n```\n\n## Available Tools\n\nYour MCP server exposes three tools for interacting with your documentation:\n\n### search_docs\n\nSearch through the documentation content using semantic search. Returns relevant chunks of documentation based on the query using vector embeddings and cosine similarity.\n\n**Parameters:**\n- `query` (required): The search query to find relevant documentation\n- `limit` (optional): Maximum number of results to return (default: 6)\n\n**Example:**\n```json\n{\n \"tool\": \"search_docs\",\n \"params\": {\n \"query\": \"how to configure AI assistant\",\n \"limit\": 5\n }\n}\n```\n\n### get_doc\n\nGet the full content of a specific documentation page by its path.\n\n**Parameters:**\n- `path` (required): The file path to the documentation page (e.g., `app/getting-started/page.tsx`)\n\n**Example:**\n```json\n{\n \"tool\": \"get_doc\",\n \"params\": {\n \"path\": \"app/deployment-and-hosting/page.tsx\"\n }\n}\n```\n\n### list_docs\n\nList all available documentation pages, optionally filtered by directory.\n\n**Parameters:**\n- `directory` (optional): Optional directory to filter results (e.g., `components`)\n\n**Example:**\n```json\n{\n \"tool\": \"list_docs\",\n \"params\": {\n \"directory\": \"configuration\"\n }\n}\n```\n\n## How it works\n\nDoccupine's MCP server uses semantic search powered by vector embeddings to provide accurate, context-aware search results.\n\n### Indexing Process\n\n1. **Document Discovery**: The server scans your `app/` directory for all `page.tsx`, `page.ts`, `page.jsx`, and `page.js` files.\n2. **Content Extraction**: It extracts content from `const content =` declarations in your page files.\n3. **Chunking**: Large documents are split into chunks of approximately 800 characters with 100 character overlap for better context preservation.\n4. **Embedding Generation**: Each chunk is converted to a vector embedding using your configured LLM provider's embedding model.\n5. **Index Building**: All embeddings are stored in memory for fast similarity search.\n\n### Search Process\n\n1. **Query Embedding**: The search query is converted to a vector embedding using the same embedding model.\n2. **Similarity Calculation**: Cosine similarity is calculated between the query embedding and all document chunk embeddings.\n3. **Ranking**: Results are sorted by similarity score (highest first).\n4. **Response**: The top N results (based on the limit parameter) are returned with their paths, URIs, scores, and text content.\n\n<Callout type=\"note\">\n The index is built automatically when the server starts. It is stored in memory and persists for the lifetime of the server process. If you update your documentation, restart the server to rebuild the index.\n</Callout>\n\n## Use your MCP server\n\nYour users must connect your MCP server to their preferred AI tools.\n\n1. Make your MCP server URL publicly available.\n2. Users copy your MCP server URL and add it to their tools.\n3. Users access your documentation through their tools.\n\nThese are some of the ways you can help your users connect to your MCP server:\n\n<Tabs>\n <TabContent title=\"Claude\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the steps to connect it to Claude.\n 1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings.\n 2. Select **Add custom connector**.\n 3. Add your MCP server name and URL.\n 4. Select **Add**.\n 5. When using Claude, select the attachments button (the plus icon).\n 6. Select your MCP server.\n </Step>\n </Steps>\n See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details.\n </TabContent>\n <TabContent title=\"Claude Code\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the command to connect it to Claude Code.\n ```bash\n claude mcp add --transport http <name> <url>\n ```\n </Step>\n </Steps>\n See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details.\n </TabContent>\n <TabContent title=\"Cursor\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the steps to connect it to Cursor.\n 1. Use <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> on Windows) to open the command palette.\n 2. Search for \"Open MCP settings\".\n 3. Select **Add custom MCP**. This opens the `mcp.json` file.\n 4. In `mcp.json`, configure your server:\n ```json\n {\n \"mcpServers\": {\n \"<your-mcp-server-name>\": {\n \"url\": \"<your-mcp-server-url>\"\n }\n }\n }\n ```\n </Step>\n </Steps>\n See the [Cursor documentation](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) for more details.\n </TabContent>\n <TabContent title=\"VS Code\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the steps to connect it to VS Code.\n 1. Create a `.vscode/mcp.json` file.\n 2. In `mcp.json`, configure your server:\n ```json\n {\n \"servers\": {\n \"<your-mcp-server-name>\": {\n \"type\": \"http\",\n \"url\": \"<your-mcp-server-url>\"\n }\n }\n }\n ```\n </Step>\n </Steps>\n See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.\n </TabContent>\n</Tabs>\n\n## Requirements\n\nTo use the MCP server, you need to have the AI Assistant configured. The MCP server uses the same LLM configuration for generating embeddings.\n\n| Variable | Required | Description |\n|---|---|---|\n| `LLM_PROVIDER` | Yes | Your LLM provider (`openai`, `anthropic`, or `google`) |\n| `DOCS_API_KEY` | No | When set, requires Bearer token authentication on `/api/mcp` |\n\n<Callout type=\"warning\">\n The MCP server requires an LLM provider to be configured for generating embeddings. Make sure you have set up your AI Assistant with a valid API key before using the MCP server.\n</Callout>\n\nSee the [AI Assistant documentation](/ai-assistant) for configuration details.\n\n## Content indexing\n\nYour MCP server searches content extracted from your page files. The server automatically discovers and indexes all `page.tsx`, `page.ts`, `page.jsx`, and `page.js` files in your `app/` directory.\n\n### Content extraction\n\nThe server extracts content from `const content =` declarations in your page files. Make sure your documentation pages export a `content` constant with your markdown or MDX content.\n\n**Example:**\n```tsx\nexport const content = `\n# Getting Started\n\nWelcome to the documentation...\n`;\n```\n\n### Excluded directories\n\nThe following directories are automatically excluded from indexing:\n- `node_modules`\n- `.next`\n- `.git`\n- `api`\n\n## Troubleshooting\n\n### Index not building\n\nIf the index is not building, check:\n- Your LLM provider is configured correctly in your `.env` file\n- You have a valid API key set\n- Your documentation pages export a `content` constant\n\n### No search results\n\nIf searches return no results:\n- Verify that your documentation pages are in the `app/` directory\n- Check that your pages export a `content` constant\n- Ensure the index has been built (check the `index.ready` status via GET `/api/mcp`)\n\n### Slow search performance\n\nThe first search may be slower as it builds the index. Subsequent searches are fast as they use the in-memory index. If performance is consistently slow:\n- Check your embedding API response times\n- Consider reducing the number of documentation pages\n- Verify your server has sufficient memory\n\n### Cloudflare blocking MCP requests\n\nIf you use Cloudflare as a proxy in front of your documentation site, Cloudflare's bot protection may block server-to-server requests from AI tools like Claude.ai. This can cause MCP connections to fail silently or return errors.\n\nThere are two ways to resolve this:\n\n**Option 1: Disable the Cloudflare proxy (simplest)**\n\nIn your Cloudflare DNS settings, click the orange cloud icon next to your domain record to switch it to \"DNS only\" (grey cloud). This disables Cloudflare's proxy and bot protection for your domain, allowing MCP requests to reach your server directly.\n\n**Option 2: Add a Cloudflare WAF exception (keeps your custom domain proxied)**\n\nIn Cloudflare dashboard:\n\n1. Go to **Security > WAF**.\n2. Click **Create rule**.\n3. Set it up as:\n - **Rule name**: Allow MCP API\n - **Field**: URI Path\n - **Operator**: starts with\n - **Value**: `/api/mcp`\n - **Action**: Skip -- then check all remaining custom rules, Rate limiting rules, and Bot Fight Mode / Super Bot Fight Mode.\n4. Deploy the rule and make sure it is ordered first (above other rules).\n\n<Callout type=\"warning\">\n Also check **Security > Bots** in your Cloudflare dashboard. If \"Bot Fight Mode\" or \"Super Bot Fight Mode\" is enabled, that is very likely what is blocking server-to-server requests from AI tools.\n</Callout>\n\n## Best practices\n\n* **Keep content up-to-date**: Restart your server after updating documentation to rebuild the index with fresh content.\n* **Use descriptive queries**: More specific queries yield better semantic search results.\n* **Monitor index status**: Use the GET endpoint to check if your index is ready before performing searches.\n* **Optimize content structure**: Well-structured markdown with clear headings improves search relevance.";
1
+ export declare const mcpMdxTemplate = "---\ntitle: \"Model Context Protocol\"\ndescription: \"Connect your Doccupine documentation to AI tools with an MCP server for enhanced AI-powered documentation search.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 9\n---\n\n# Model Context Protocol\n\nConnect your documentation to AI tools with a hosted MCP server.\n\nDoccupine automatically generates a Model Context Protocol (MCP) server from your documentation, making your content accessible to AI applications like Claude, Cursor, VS Code, and other MCP-compatible tools. Your MCP server exposes semantic search capabilities, allowing AI tools to query your documentation directly and provide accurate, context-aware answers.\n\n<Callout type=\"warning\">\n The MCP server requires the [AI Assistant](/ai-assistant) to be configured. Make sure you have set up your LLM provider and API keys before using the MCP server.\n</Callout>\n\n## About MCP servers\n\nThe Model Context Protocol (MCP) is an open protocol that creates standardized connections between AI applications and external services, like documentation. Doccupine generates an MCP server from your documentation, preparing your content for the broader AI ecosystem where any MCP client can connect to your documentation.\n\nYour MCP server exposes search and retrieval tools for AI applications to query your documentation. Your users must connect your MCP server to their preferred AI tools to access your documentation.\n\n### How MCP servers work\n\nWhen an AI tool has your documentation MCP server connected, the AI tool can search your documentation directly instead of making a generic web search in response to a user's prompt. Your MCP server provides access to all indexed content from your documentation site.\n\n- The LLM can proactively search your documentation while generating a response, not just when explicitly asked.\n- The LLM determines when to use the search tool based on the context of the conversation and the relevance of your documentation.\n- Each tool call happens during the generation process, so the LLM searches up-to-date information from your documentation to generate its response.\n\n### MCP compared to web search\n\nAI tools can search the web, but MCP provides distinct advantages for documentation.\n\n- **Direct source access**: Web search depends on what search engines have indexed, which may be stale or incomplete. MCP searches your current indexed documentation directly.\n- **Integrated workflow**: MCP allows the AI to search during response generation rather than performing a separate web search.\n- **Semantic search**: MCP uses vector embeddings for semantic similarity search, providing more relevant results than keyword-based web search.\n- **No search noise**: SEO and ranking algorithms influence web search results. MCP goes straight to your documentation content.\n\n## Access your MCP server\n\nDoccupine automatically generates an MCP server for your documentation and hosts it at your documentation URL with the `/api/mcp` path. For example, if your documentation is hosted at `https://example.com`, your MCP server is available at `https://example.com/api/mcp`.\n\nThe MCP server provides both a GET endpoint to discover available tools and a POST endpoint to execute tool calls.\n\n### Authentication\n\nYou can optionally protect your MCP server with an API key by setting the `DOCS_API_KEY` environment variable in your `.env` file:\n\n```bash\nDOCS_API_KEY=your-secret-key\n```\n\nWhen `DOCS_API_KEY` is set, all requests to `/api/mcp` must include an `Authorization` header with a Bearer token:\n\n```text\nAuthorization: Bearer your-secret-key\n```\n\nRequests without a valid token receive a `401 Unauthorized` response. When `DOCS_API_KEY` is not set, the MCP server is publicly accessible with no authentication required.\n\n<Callout type=\"note\">\n Authentication only applies to the `/api/mcp` endpoint. The `/api/rag` endpoint used by the built-in AI Assistant chat is not affected by this setting.\n</Callout>\n\n### API Endpoints\n\n#### GET /api/mcp\n\nReturns information about available tools and the current index status.\n\n**Response:**\n\n```json\n{\n \"tools\": [\n {\n \"name\": \"search_docs\",\n \"description\": \"Search through the documentation content using semantic search...\",\n \"inputSchema\": { ... }\n },\n ...\n ],\n \"index\": {\n \"ready\": true,\n \"chunkCount\": 150\n }\n}\n```\n\n#### POST /api/mcp\n\nExecutes an MCP tool call.\n\n**Request Body:**\n\n```json\n{\n \"tool\": \"search_docs\",\n \"params\": {\n \"query\": \"how to deploy\",\n \"limit\": 6\n }\n}\n```\n\n**Response:**\n\n```json\n{\n \"content\": [\n {\n \"path\": \"app/deployment-and-hosting/page.tsx\",\n \"uri\": \"docs://deployment-and-hosting\",\n \"score\": \"0.892\",\n \"text\": \"Deploy your Doccupine site as a Next.js application...\"\n },\n ...\n ]\n}\n```\n\n## Available Tools\n\nYour MCP server exposes three tools for interacting with your documentation:\n\n### search_docs\n\nSearch through the documentation content using semantic search. Returns relevant chunks of documentation based on the query using vector embeddings and cosine similarity.\n\n**Parameters:**\n\n- `query` (required): The search query to find relevant documentation\n- `limit` (optional): Maximum number of results to return (default: 6)\n\n**Example:**\n\n```json\n{\n \"tool\": \"search_docs\",\n \"params\": {\n \"query\": \"how to configure AI assistant\",\n \"limit\": 5\n }\n}\n```\n\n### get_doc\n\nGet the full content of a specific documentation page by its path.\n\n**Parameters:**\n\n- `path` (required): The file path to the documentation page (e.g., `app/getting-started/page.tsx`)\n\n**Example:**\n\n```json\n{\n \"tool\": \"get_doc\",\n \"params\": {\n \"path\": \"app/deployment-and-hosting/page.tsx\"\n }\n}\n```\n\n### list_docs\n\nList all available documentation pages, optionally filtered by directory.\n\n**Parameters:**\n\n- `directory` (optional): Optional directory to filter results (e.g., `components`)\n\n**Example:**\n\n```json\n{\n \"tool\": \"list_docs\",\n \"params\": {\n \"directory\": \"configuration\"\n }\n}\n```\n\n## How it works\n\nDoccupine's MCP server uses semantic search powered by vector embeddings to provide accurate, context-aware search results.\n\n### Indexing Process\n\n1. **Document Discovery**: The server scans your `app/` directory for all `page.tsx`, `page.ts`, `page.jsx`, and `page.js` files.\n2. **Content Extraction**: It extracts content from `const content =` declarations in your page files.\n3. **Chunking**: Large documents are split into chunks of approximately 800 characters with 100 character overlap for better context preservation.\n4. **Embedding Generation**: Each chunk is converted to a vector embedding using your configured LLM provider's embedding model.\n5. **Index Building**: All embeddings are stored in memory for fast similarity search.\n\n### Search Process\n\n1. **Query Embedding**: The search query is converted to a vector embedding using the same embedding model.\n2. **Similarity Calculation**: Cosine similarity is calculated between the query embedding and all document chunk embeddings.\n3. **Ranking**: Results are sorted by similarity score (highest first).\n4. **Response**: The top N results (based on the limit parameter) are returned with their paths, URIs, scores, and text content.\n\n<Callout type=\"note\">\n The index is built automatically when the server starts. It is stored in memory and persists for the lifetime of the server process. If you update your documentation, restart the server to rebuild the index.\n</Callout>\n\n## Use your MCP server\n\nYour users must connect your MCP server to their preferred AI tools.\n\n1. Make your MCP server URL publicly available.\n2. Users copy your MCP server URL and add it to their tools.\n3. Users access your documentation through their tools.\n\nThese are some of the ways you can help your users connect to your MCP server:\n\n<Tabs>\n <TabContent title=\"Claude\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the steps to connect it to Claude.\n 1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings.\n 2. Select **Add custom connector**.\n 3. Add your MCP server name and URL.\n 4. Select **Add**.\n 5. When using Claude, select the attachments button (the plus icon).\n 6. Select your MCP server.\n </Step>\n </Steps>\n See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details.\n </TabContent>\n <TabContent title=\"Claude Code\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the command to connect it to Claude Code.\n ```bash\n claude mcp add --transport http <name> <url>\n ```\n </Step>\n </Steps>\n See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details.\n </TabContent>\n <TabContent title=\"Cursor\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the steps to connect it to Cursor.\n 1. Use <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> on Windows) to open the command palette.\n 2. Search for \"Open MCP settings\".\n 3. Select **Add custom MCP**. This opens the `mcp.json` file.\n 4. In `mcp.json`, configure your server:\n ```json\n {\n \"mcpServers\": {\n \"<your-mcp-server-name>\": {\n \"url\": \"<your-mcp-server-url>\"\n }\n }\n }\n ```\n </Step>\n </Steps>\n See the [Cursor documentation](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) for more details.\n </TabContent>\n <TabContent title=\"VS Code\">\n <Steps>\n <Step title=\"Get your MCP server URL.\">\n Your MCP server URL is available at `https://your-domain.com/api/mcp`.\n </Step>\n <Step title=\"Publish your MCP server URL for your users.\">\n Create a guide for your users that includes your MCP server URL and the steps to connect it to VS Code.\n 1. Create a `.vscode/mcp.json` file.\n 2. In `mcp.json`, configure your server:\n ```json\n {\n \"servers\": {\n \"<your-mcp-server-name>\": {\n \"type\": \"http\",\n \"url\": \"<your-mcp-server-url>\"\n }\n }\n }\n ```\n </Step>\n </Steps>\n See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.\n </TabContent>\n</Tabs>\n\n## Requirements\n\nTo use the MCP server, you need to have the AI Assistant configured. The MCP server uses the same LLM configuration for generating embeddings.\n\n| Variable | Required | Description |\n| -------------- | -------- | ------------------------------------------------------------ |\n| `LLM_PROVIDER` | Yes | Your LLM provider (`openai`, `anthropic`, or `google`) |\n| `DOCS_API_KEY` | No | When set, requires Bearer token authentication on `/api/mcp` |\n\n<Callout type=\"warning\">\n The MCP server requires an LLM provider to be configured for generating embeddings. Make sure you have set up your AI Assistant with a valid API key before using the MCP server.\n</Callout>\n\nSee the [AI Assistant documentation](/ai-assistant) for configuration details.\n\n## Content indexing\n\nYour MCP server searches content extracted from your page files. The server automatically discovers and indexes all `page.tsx`, `page.ts`, `page.jsx`, and `page.js` files in your `app/` directory.\n\n### Content extraction\n\nThe server extracts content from `const content =` declarations in your page files. Make sure your documentation pages export a `content` constant with your markdown or MDX content.\n\n**Example:**\n\n```tsx\nexport const content = `\n# Getting Started\n\nWelcome to the documentation...\n`;\n```\n\n### Excluded directories\n\nThe following directories are automatically excluded from indexing:\n\n- `node_modules`\n- `.next`\n- `.git`\n- `api`\n\n## Troubleshooting\n\n### Index not building\n\nIf the index is not building, check:\n\n- Your LLM provider is configured correctly in your `.env` file\n- You have a valid API key set\n- Your documentation pages export a `content` constant\n\n### No search results\n\nIf searches return no results:\n\n- Verify that your documentation pages are in the `app/` directory\n- Check that your pages export a `content` constant\n- Ensure the index has been built (check the `index.ready` status via GET `/api/mcp`)\n\n### Slow search performance\n\nThe first search may be slower as it builds the index. Subsequent searches are fast as they use the in-memory index. If performance is consistently slow:\n\n- Check your embedding API response times\n- Consider reducing the number of documentation pages\n- Verify your server has sufficient memory\n\n### Cloudflare blocking MCP requests\n\nIf you use Cloudflare as a proxy in front of your documentation site, Cloudflare's bot protection may block server-to-server requests from AI tools like Claude.ai. This can cause MCP connections to fail silently or return errors.\n\nThere are two ways to resolve this:\n\n**Option 1: Disable the Cloudflare proxy (simplest)**\n\nIn your Cloudflare DNS settings, click the orange cloud icon next to your domain record to switch it to \"DNS only\" (grey cloud). This disables Cloudflare's proxy and bot protection for your domain, allowing MCP requests to reach your server directly.\n\n**Option 2: Add a Cloudflare WAF exception (keeps your custom domain proxied)**\n\nIn Cloudflare dashboard:\n\n1. Go to **Security > WAF**.\n2. Click **Create rule**.\n3. Set it up as:\n - **Rule name**: Allow MCP API\n - **Field**: URI Path\n - **Operator**: starts with\n - **Value**: `/api/mcp`\n - **Action**: Skip -- then check all remaining custom rules, Rate limiting rules, and Bot Fight Mode / Super Bot Fight Mode.\n4. Deploy the rule and make sure it is ordered first (above other rules).\n\n<Callout type=\"warning\">\n Also check **Security > Bots** in your Cloudflare dashboard. If \"Bot Fight Mode\" or \"Super Bot Fight Mode\" is enabled, that is very likely what is blocking server-to-server requests from AI tools.\n</Callout>\n\n## Best practices\n\n- **Keep content up-to-date**: Restart your server after updating documentation to rebuild the index with fresh content.\n- **Use descriptive queries**: More specific queries yield better semantic search results.\n- **Monitor index status**: Use the GET endpoint to check if your index is ready before performing searches.\n- **Optimize content structure**: Well-structured markdown with clear headings improves search relevance.";
@@ -6,7 +6,9 @@ category: "Configuration"
6
6
  categoryOrder: 3
7
7
  order: 9
8
8
  ---
9
+
9
10
  # Model Context Protocol
11
+
10
12
  Connect your documentation to AI tools with a hosted MCP server.
11
13
 
12
14
  Doccupine automatically generates a Model Context Protocol (MCP) server from your documentation, making your content accessible to AI applications like Claude, Cursor, VS Code, and other MCP-compatible tools. Your MCP server exposes semantic search capabilities, allowing AI tools to query your documentation directly and provide accurate, context-aware answers.
@@ -25,18 +27,18 @@ Your MCP server exposes search and retrieval tools for AI applications to query
25
27
 
26
28
  When an AI tool has your documentation MCP server connected, the AI tool can search your documentation directly instead of making a generic web search in response to a user's prompt. Your MCP server provides access to all indexed content from your documentation site.
27
29
 
28
- * The LLM can proactively search your documentation while generating a response, not just when explicitly asked.
29
- * The LLM determines when to use the search tool based on the context of the conversation and the relevance of your documentation.
30
- * Each tool call happens during the generation process, so the LLM searches up-to-date information from your documentation to generate its response.
30
+ - The LLM can proactively search your documentation while generating a response, not just when explicitly asked.
31
+ - The LLM determines when to use the search tool based on the context of the conversation and the relevance of your documentation.
32
+ - Each tool call happens during the generation process, so the LLM searches up-to-date information from your documentation to generate its response.
31
33
 
32
34
  ### MCP compared to web search
33
35
 
34
36
  AI tools can search the web, but MCP provides distinct advantages for documentation.
35
37
 
36
- * **Direct source access**: Web search depends on what search engines have indexed, which may be stale or incomplete. MCP searches your current indexed documentation directly.
37
- * **Integrated workflow**: MCP allows the AI to search during response generation rather than performing a separate web search.
38
- * **Semantic search**: MCP uses vector embeddings for semantic similarity search, providing more relevant results than keyword-based web search.
39
- * **No search noise**: SEO and ranking algorithms influence web search results. MCP goes straight to your documentation content.
38
+ - **Direct source access**: Web search depends on what search engines have indexed, which may be stale or incomplete. MCP searches your current indexed documentation directly.
39
+ - **Integrated workflow**: MCP allows the AI to search during response generation rather than performing a separate web search.
40
+ - **Semantic search**: MCP uses vector embeddings for semantic similarity search, providing more relevant results than keyword-based web search.
41
+ - **No search noise**: SEO and ranking algorithms influence web search results. MCP goes straight to your documentation content.
40
42
 
41
43
  ## Access your MCP server
42
44
 
@@ -71,6 +73,7 @@ Requests without a valid token receive a \`401 Unauthorized\` response. When \`D
71
73
  Returns information about available tools and the current index status.
72
74
 
73
75
  **Response:**
76
+
74
77
  \`\`\`json
75
78
  {
76
79
  "tools": [
@@ -93,6 +96,7 @@ Returns information about available tools and the current index status.
93
96
  Executes an MCP tool call.
94
97
 
95
98
  **Request Body:**
99
+
96
100
  \`\`\`json
97
101
  {
98
102
  "tool": "search_docs",
@@ -104,6 +108,7 @@ Executes an MCP tool call.
104
108
  \`\`\`
105
109
 
106
110
  **Response:**
111
+
107
112
  \`\`\`json
108
113
  {
109
114
  "content": [
@@ -127,10 +132,12 @@ Your MCP server exposes three tools for interacting with your documentation:
127
132
  Search through the documentation content using semantic search. Returns relevant chunks of documentation based on the query using vector embeddings and cosine similarity.
128
133
 
129
134
  **Parameters:**
135
+
130
136
  - \`query\` (required): The search query to find relevant documentation
131
137
  - \`limit\` (optional): Maximum number of results to return (default: 6)
132
138
 
133
139
  **Example:**
140
+
134
141
  \`\`\`json
135
142
  {
136
143
  "tool": "search_docs",
@@ -146,9 +153,11 @@ Search through the documentation content using semantic search. Returns relevant
146
153
  Get the full content of a specific documentation page by its path.
147
154
 
148
155
  **Parameters:**
156
+
149
157
  - \`path\` (required): The file path to the documentation page (e.g., \`app/getting-started/page.tsx\`)
150
158
 
151
159
  **Example:**
160
+
152
161
  \`\`\`json
153
162
  {
154
163
  "tool": "get_doc",
@@ -163,9 +172,11 @@ Get the full content of a specific documentation page by its path.
163
172
  List all available documentation pages, optionally filtered by directory.
164
173
 
165
174
  **Parameters:**
175
+
166
176
  - \`directory\` (optional): Optional directory to filter results (e.g., \`components\`)
167
177
 
168
178
  **Example:**
179
+
169
180
  \`\`\`json
170
181
  {
171
182
  "tool": "list_docs",
@@ -293,10 +304,10 @@ These are some of the ways you can help your users connect to your MCP server:
293
304
 
294
305
  To use the MCP server, you need to have the AI Assistant configured. The MCP server uses the same LLM configuration for generating embeddings.
295
306
 
296
- | Variable | Required | Description |
297
- |---|---|---|
298
- | \`LLM_PROVIDER\` | Yes | Your LLM provider (\`openai\`, \`anthropic\`, or \`google\`) |
299
- | \`DOCS_API_KEY\` | No | When set, requires Bearer token authentication on \`/api/mcp\` |
307
+ | Variable | Required | Description |
308
+ | -------------- | -------- | ------------------------------------------------------------ |
309
+ | \`LLM_PROVIDER\` | Yes | Your LLM provider (\`openai\`, \`anthropic\`, or \`google\`) |
310
+ | \`DOCS_API_KEY\` | No | When set, requires Bearer token authentication on \`/api/mcp\` |
300
311
 
301
312
  <Callout type="warning">
302
313
  The MCP server requires an LLM provider to be configured for generating embeddings. Make sure you have set up your AI Assistant with a valid API key before using the MCP server.
@@ -313,6 +324,7 @@ Your MCP server searches content extracted from your page files. The server auto
313
324
  The server extracts content from \`const content =\` declarations in your page files. Make sure your documentation pages export a \`content\` constant with your markdown or MDX content.
314
325
 
315
326
  **Example:**
327
+
316
328
  \`\`\`tsx
317
329
  export const content = \`
318
330
  # Getting Started
@@ -324,6 +336,7 @@ Welcome to the documentation...
324
336
  ### Excluded directories
325
337
 
326
338
  The following directories are automatically excluded from indexing:
339
+
327
340
  - \`node_modules\`
328
341
  - \`.next\`
329
342
  - \`.git\`
@@ -334,6 +347,7 @@ The following directories are automatically excluded from indexing:
334
347
  ### Index not building
335
348
 
336
349
  If the index is not building, check:
350
+
337
351
  - Your LLM provider is configured correctly in your \`.env\` file
338
352
  - You have a valid API key set
339
353
  - Your documentation pages export a \`content\` constant
@@ -341,6 +355,7 @@ If the index is not building, check:
341
355
  ### No search results
342
356
 
343
357
  If searches return no results:
358
+
344
359
  - Verify that your documentation pages are in the \`app/\` directory
345
360
  - Check that your pages export a \`content\` constant
346
361
  - Ensure the index has been built (check the \`index.ready\` status via GET \`/api/mcp\`)
@@ -348,6 +363,7 @@ If searches return no results:
348
363
  ### Slow search performance
349
364
 
350
365
  The first search may be slower as it builds the index. Subsequent searches are fast as they use the in-memory index. If performance is consistently slow:
366
+
351
367
  - Check your embedding API response times
352
368
  - Consider reducing the number of documentation pages
353
369
  - Verify your server has sufficient memory
@@ -382,7 +398,7 @@ In Cloudflare dashboard:
382
398
 
383
399
  ## Best practices
384
400
 
385
- * **Keep content up-to-date**: Restart your server after updating documentation to rebuild the index with fresh content.
386
- * **Use descriptive queries**: More specific queries yield better semantic search results.
387
- * **Monitor index status**: Use the GET endpoint to check if your index is ready before performing searches.
388
- * **Optimize content structure**: Well-structured markdown with clear headings improves search relevance.`;
401
+ - **Keep content up-to-date**: Restart your server after updating documentation to rebuild the index with fresh content.
402
+ - **Use descriptive queries**: More specific queries yield better semantic search results.
403
+ - **Monitor index status**: Use the GET endpoint to check if your index is ready before performing searches.
404
+ - **Optimize content structure**: Well-structured markdown with clear headings improves search relevance.`;
@@ -1 +1 @@
1
- export declare const navigationMdxTemplate = "---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n# Navigation\nDoccupine builds your sidebar automatically from your MDX pages. By default, it reads the page frontmatter and groups pages into categories in the order you define. For larger docs, you can take full control with a `navigation.json` file.\n\n## Automatic navigation (default)\nWhen no custom navigation is provided, Doccupine generates a structure based on each page's frontmatter.\n\n### Frontmatter fields\n- **category**: The category name that groups the page in the sidebar.\n- **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.\n- **order**: The position of the page within its category. Lower numbers appear first.\n\n### Example frontmatter\n\n```text\n---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2025-01-15\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n```\n\nThis approach is great for small sets of documents. For larger projects, setting these fields on every page can become repetitive.\n\n## Custom navigation with navigation.json\nTo centrally define the entire sidebar, create a `navigation.json` at your project root (the same folder where you execute `npx doccupine`). When present, it takes priority over page frontmatter and fully controls the navigation structure.\n\n### Array format\nThe simplest format is an array of categories. When using [sections](/sections), this applies to the root section only.\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n },\n {\n \"label\": \"Components\",\n \"links\": [\n { \"slug\": \"components\", \"title\": \"Components\" },\n { \"slug\": \"headers-and-text\", \"title\": \"Headers and Text\" },\n { \"slug\": \"lists-and-tables\", \"title\": \"Lists and tables\" },\n { \"slug\": \"code\", \"title\": \"Code\" },\n { \"slug\": \"accordion\", \"title\": \"Accordion\" },\n { \"slug\": \"tabs\", \"title\": \"Tabs\" },\n { \"slug\": \"cards\", \"title\": \"Cards\" },\n { \"slug\": \"buttons\", \"title\": \"Buttons\" },\n { \"slug\": \"callouts\", \"title\": \"Callouts\" },\n { \"slug\": \"image-and-embeds\", \"title\": \"Images and embeds\" },\n { \"slug\": \"icons\", \"title\": \"Icons\" },\n { \"slug\": \"fields\", \"title\": \"Fields\" },\n { \"slug\": \"update\", \"title\": \"Update\" },\n { \"slug\": \"columns\", \"title\": \"Columns\" },\n { \"slug\": \"steps\", \"title\": \"Steps\" },\n { \"slug\": \"color-swatches\", \"title\": \"Color Swatches\" }\n ]\n },\n {\n \"label\": \"Configuration\",\n \"links\": [\n { \"slug\": \"globals\", \"title\": \"Globals\" },\n { \"slug\": \"navigation\", \"title\": \"Navigation\" },\n { \"slug\": \"sections\", \"title\": \"Sections\" },\n { \"slug\": \"footer-links\", \"title\": \"Footer Links\" },\n { \"slug\": \"theme\", \"title\": \"Theme\" },\n { \"slug\": \"media-and-assets\", \"title\": \"Media and assets\" },\n { \"slug\": \"fonts\", \"title\": \"Fonts\" },\n { \"slug\": \"ai-assistant\", \"title\": \"AI Assistant\" },\n { \"slug\": \"model-context-protocol\", \"title\": \"Model Context Protocol\" },\n { \"slug\": \"analytics\", \"title\": \"Analytics\" },\n { \"slug\": \"deployment-and-hosting\", \"title\": \"Deployment & Hosting\" }\n ]\n }\n]\n```\n\n### Object format (per-section)\nWhen using [sections](/sections), you can define navigation for each section by using an object keyed by section slug. Sections without a key fall back to auto-generated navigation from frontmatter.\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Getting Started\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n }\n ],\n \"platform\": [\n {\n \"label\": \"Overview\",\n \"links\": [\n { \"slug\": \"platform/auth\", \"title\": \"Authentication\" },\n { \"slug\": \"platform/users\", \"title\": \"Users\" }\n ]\n }\n ]\n}\n```\n\nThe key `\"\"` controls the root section. Other keys match section slugs defined in `sections.json` or derived from frontmatter. See [Sections](/sections) for details on configuring sections.\n\n### Fields\n- **label**: The section header shown in the sidebar.\n- **links**: An array of page entries for that section.\n - **slug**: The MDX file slug (filename without extension). Use an empty string `\"\"` for `index.mdx`.\n - **title**: The display title in the navigation. This can differ from the page's `title` frontmatter.\n\n## Precedence and behavior\n\n<Callout type=\"note\">\n `navigation.json` takes priority over frontmatter. If present, it fully controls the sidebar structure for the sections it covers.\n</Callout>\n\n- Without `navigation.json`, the sidebar is built from page frontmatter: `category` -> grouped; `categoryOrder` -> category position; `order` -> page position.\n- When using the object format, sections not listed in `navigation.json` fall back to frontmatter-based navigation.\n- Pages without a `category` appear at the top level.\n\n## Tips\n- **Start simple**: Use frontmatter for small docs. Switch to `navigation.json` as the structure grows.\n- **Keep slugs consistent**: `slug` must match the MDX filename (e.g., `text.mdx` -> `text`).\n- **Control titles**: Use `title` in `navigation.json` to customize sidebar labels without changing page frontmatter.\n- **Per-section navigation**: Use the object format to define different sidebars for each section. Mix and match - define some sections explicitly and let others auto-generate.";
1
+ export declare const navigationMdxTemplate = "---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n\n# Navigation\n\nDoccupine builds your sidebar automatically from your MDX pages. By default, it reads the page frontmatter and groups pages into categories in the order you define. For larger docs, you can take full control with a `navigation.json` file.\n\n## Automatic navigation (default)\n\nWhen no custom navigation is provided, Doccupine generates a structure based on each page's frontmatter.\n\n### Frontmatter fields\n\n- **category**: The category name that groups the page in the sidebar.\n- **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.\n- **order**: The position of the page within its category. Lower numbers appear first.\n\n### Example frontmatter\n\n```text\n---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2025-01-15\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n```\n\nThis approach is great for small sets of documents. For larger projects, setting these fields on every page can become repetitive.\n\n## Custom navigation with navigation.json\n\nTo centrally define the entire sidebar, create a `navigation.json` at your project root (the same folder where you execute `npx doccupine`). When present, it takes priority over page frontmatter and fully controls the navigation structure.\n\n### Array format\n\nThe simplest format is an array of categories. When using [sections](/sections), this applies to the root section only.\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n },\n {\n \"label\": \"Components\",\n \"links\": [\n { \"slug\": \"components\", \"title\": \"Components\" },\n { \"slug\": \"headers-and-text\", \"title\": \"Headers and Text\" },\n { \"slug\": \"lists-and-tables\", \"title\": \"Lists and tables\" },\n { \"slug\": \"code\", \"title\": \"Code\" },\n { \"slug\": \"accordion\", \"title\": \"Accordion\" },\n { \"slug\": \"tabs\", \"title\": \"Tabs\" },\n { \"slug\": \"cards\", \"title\": \"Cards\" },\n { \"slug\": \"buttons\", \"title\": \"Buttons\" },\n { \"slug\": \"callouts\", \"title\": \"Callouts\" },\n { \"slug\": \"image-and-embeds\", \"title\": \"Images and embeds\" },\n { \"slug\": \"icons\", \"title\": \"Icons\" },\n { \"slug\": \"fields\", \"title\": \"Fields\" },\n { \"slug\": \"update\", \"title\": \"Update\" },\n { \"slug\": \"columns\", \"title\": \"Columns\" },\n { \"slug\": \"steps\", \"title\": \"Steps\" },\n { \"slug\": \"color-swatches\", \"title\": \"Color Swatches\" }\n ]\n },\n {\n \"label\": \"Configuration\",\n \"links\": [\n { \"slug\": \"globals\", \"title\": \"Globals\" },\n { \"slug\": \"navigation\", \"title\": \"Navigation\" },\n { \"slug\": \"sections\", \"title\": \"Sections\" },\n { \"slug\": \"footer-links\", \"title\": \"Footer Links\" },\n { \"slug\": \"theme\", \"title\": \"Theme\" },\n { \"slug\": \"media-and-assets\", \"title\": \"Media and assets\" },\n { \"slug\": \"fonts\", \"title\": \"Fonts\" },\n { \"slug\": \"ai-assistant\", \"title\": \"AI Assistant\" },\n { \"slug\": \"model-context-protocol\", \"title\": \"Model Context Protocol\" },\n { \"slug\": \"analytics\", \"title\": \"Analytics\" },\n { \"slug\": \"deployment-and-hosting\", \"title\": \"Deployment & Hosting\" }\n ]\n }\n]\n```\n\n### Object format (per-section)\n\nWhen using [sections](/sections), you can define navigation for each section by using an object keyed by section slug. Sections without a key fall back to auto-generated navigation from frontmatter.\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Getting Started\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n }\n ],\n \"platform\": [\n {\n \"label\": \"Overview\",\n \"links\": [\n { \"slug\": \"platform/auth\", \"title\": \"Authentication\" },\n { \"slug\": \"platform/users\", \"title\": \"Users\" }\n ]\n }\n ]\n}\n```\n\nThe key `\"\"` controls the root section. Other keys match section slugs defined in `sections.json` or derived from frontmatter. See [Sections](/sections) for details on configuring sections.\n\n### Fields\n\n- **label**: The section header shown in the sidebar.\n- **links**: An array of page entries for that section.\n - **slug**: The MDX file slug (filename without extension). Use an empty string `\"\"` for `index.mdx`.\n - **title**: The display title in the navigation. This can differ from the page's `title` frontmatter.\n\n## Precedence and behavior\n\n<Callout type=\"note\">\n `navigation.json` takes priority over frontmatter. If present, it fully controls the sidebar structure for the sections it covers.\n</Callout>\n\n- Without `navigation.json`, the sidebar is built from page frontmatter: `category` -> grouped; `categoryOrder` -> category position; `order` -> page position.\n- When using the object format, sections not listed in `navigation.json` fall back to frontmatter-based navigation.\n- Pages without a `category` appear at the top level.\n\n## Tips\n\n- **Start simple**: Use frontmatter for small docs. Switch to `navigation.json` as the structure grows.\n- **Keep slugs consistent**: `slug` must match the MDX filename (e.g., `text.mdx` -> `text`).\n- **Control titles**: Use `title` in `navigation.json` to customize sidebar labels without changing page frontmatter.\n- **Per-section navigation**: Use the object format to define different sidebars for each section. Mix and match - define some sections explicitly and let others auto-generate.";
@@ -6,13 +6,17 @@ category: "Configuration"
6
6
  categoryOrder: 3
7
7
  order: 2
8
8
  ---
9
+
9
10
  # Navigation
11
+
10
12
  Doccupine builds your sidebar automatically from your MDX pages. By default, it reads the page frontmatter and groups pages into categories in the order you define. For larger docs, you can take full control with a \`navigation.json\` file.
11
13
 
12
14
  ## Automatic navigation (default)
15
+
13
16
  When no custom navigation is provided, Doccupine generates a structure based on each page's frontmatter.
14
17
 
15
18
  ### Frontmatter fields
19
+
16
20
  - **category**: The category name that groups the page in the sidebar.
17
21
  - **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.
18
22
  - **order**: The position of the page within its category. Lower numbers appear first.
@@ -33,9 +37,11 @@ order: 2
33
37
  This approach is great for small sets of documents. For larger projects, setting these fields on every page can become repetitive.
34
38
 
35
39
  ## Custom navigation with navigation.json
40
+
36
41
  To centrally define the entire sidebar, create a \`navigation.json\` at your project root (the same folder where you execute \`npx doccupine\`). When present, it takes priority over page frontmatter and fully controls the navigation structure.
37
42
 
38
43
  ### Array format
44
+
39
45
  The simplest format is an array of categories. When using [sections](/sections), this applies to the root section only.
40
46
 
41
47
  \`\`\`json
@@ -88,6 +94,7 @@ The simplest format is an array of categories. When using [sections](/sections),
88
94
  \`\`\`
89
95
 
90
96
  ### Object format (per-section)
97
+
91
98
  When using [sections](/sections), you can define navigation for each section by using an object keyed by section slug. Sections without a key fall back to auto-generated navigation from frontmatter.
92
99
 
93
100
  \`\`\`json
@@ -116,6 +123,7 @@ When using [sections](/sections), you can define navigation for each section by
116
123
  The key \`""\` controls the root section. Other keys match section slugs defined in \`sections.json\` or derived from frontmatter. See [Sections](/sections) for details on configuring sections.
117
124
 
118
125
  ### Fields
126
+
119
127
  - **label**: The section header shown in the sidebar.
120
128
  - **links**: An array of page entries for that section.
121
129
  - **slug**: The MDX file slug (filename without extension). Use an empty string \`""\` for \`index.mdx\`.
@@ -132,6 +140,7 @@ The key \`""\` controls the root section. Other keys match section slugs defined
132
140
  - Pages without a \`category\` appear at the top level.
133
141
 
134
142
  ## Tips
143
+
135
144
  - **Start simple**: Use frontmatter for small docs. Switch to \`navigation.json\` as the structure grows.
136
145
  - **Keep slugs consistent**: \`slug\` must match the MDX filename (e.g., \`text.mdx\` -> \`text\`).
137
146
  - **Control titles**: Use \`title\` in \`navigation.json\` to customize sidebar labels without changing page frontmatter.
@@ -1 +1 @@
1
- export declare const platformAiAssistantMdxTemplate = "---\ntitle: \"AI Assistant\"\ndescription: \"Configure the built-in AI assistant that ships with every Doccupine documentation site.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 6\nsection: \"Platform\"\n---\n# AI Assistant\nEvery Doccupine site ships with a built-in AI assistant that helps visitors find answers across your documentation. The AI settings page lets you choose how it's powered.\n\n## Modes\n\n### Platform (default)\nUses Doccupine's built-in integration. Zero configuration needed - the AI assistant works out of the box with no API keys or setup.\n\nEach plan includes a monthly AI usage budget:\n\n| Plan | Monthly Budget |\n| ---------- | -------------- |\n| Trial | $2 |\n| Pro | $20 |\n| Enterprise | $50 |\n\nThe AI settings page shows a usage dashboard with your current spending and remaining budget. Usage resets automatically with your billing cycle.\n\n#### AI credit top-ups\n\nIf you run out of AI credits before your billing cycle resets, you can purchase a one-time top-up to increase your monthly limit. Available tiers:\n\n- **$5**\n- **$10**\n- **$20**\n\nTop-ups are added to your current cycle's budget immediately after purchase and reset when your billing cycle renews. You can purchase multiple top-ups in the same cycle.\n\n### Custom\nBring your own API key for full control over the AI model. Supported providers:\n\n- **OpenAI**\n- **Anthropic**\n- **Google**\n\nIn Custom mode, you can also configure:\n- **Embedding model** - the model used to index your documentation content\n- **Temperature** - controls response creativity (0.0 for focused answers, up to 1.0 for more varied responses)\n\nFor a complete list of available models, refer to the official documentation of your chosen provider.\n\n### Off\nCompletely disables the AI assistant on your site.\n\n<Callout type=\"warning\">\n AI settings are stored as environment variables on your deployment, not in a JSON file. After saving, a redeploy is triggered automatically to apply the changes.\n</Callout>\n\n## MCP server authentication\nEvery Doccupine site exposes an MCP (Model Context Protocol) endpoint at `/api/mcp`. This lets external AI tools query your documentation programmatically.\n\nYou can set an optional **API key** to restrict access to the MCP endpoint. When set, requests must include the key in their authorization header.\n\n<Callout type=\"note\">\n For more details on how the MCP endpoint works and how to connect it to AI tools, see the [Model Context Protocol documentation](/model-context-protocol).\n</Callout>";
1
+ export declare const platformAiAssistantMdxTemplate = "---\ntitle: \"AI Assistant\"\ndescription: \"Configure the built-in AI assistant that ships with every Doccupine documentation site.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 6\nsection: \"Platform\"\n---\n\n# AI Assistant\n\nEvery Doccupine site ships with a built-in AI assistant that helps visitors find answers across your documentation. The AI settings page lets you choose how it's powered.\n\n## Modes\n\n### Platform (default)\n\nUses Doccupine's built-in integration. Zero configuration needed - the AI assistant works out of the box with no API keys or setup.\n\nEach plan includes a monthly AI usage budget:\n\n| Plan | Monthly Budget |\n| ---------- | -------------- |\n| Trial | $2 |\n| Pro | $20 |\n| Enterprise | $50 |\n\nThe AI settings page shows a usage dashboard with your current spending and remaining budget. Usage resets automatically with your billing cycle.\n\n#### AI credit top-ups\n\nIf you run out of AI credits before your billing cycle resets, you can purchase a one-time top-up to increase your monthly limit. Available tiers:\n\n- **$5**\n- **$10**\n- **$20**\n\nTop-ups are added to your current cycle's budget immediately after purchase and reset when your billing cycle renews. You can purchase multiple top-ups in the same cycle.\n\n### Custom\n\nBring your own API key for full control over the AI model. Supported providers:\n\n- **OpenAI**\n- **Anthropic**\n- **Google**\n\nIn Custom mode, you can also configure:\n\n- **Embedding model** - the model used to index your documentation content\n- **Temperature** - controls response creativity (0.0 for focused answers, up to 1.0 for more varied responses)\n\nFor a complete list of available models, refer to the official documentation of your chosen provider.\n\n### Off\n\nCompletely disables the AI assistant on your site.\n\n<Callout type=\"warning\">\n AI settings are stored as environment variables on your deployment, not in a JSON file. After saving, a redeploy is triggered automatically to apply the changes.\n</Callout>\n\n## MCP server authentication\n\nEvery Doccupine site exposes an MCP (Model Context Protocol) endpoint at `/api/mcp`. This lets external AI tools query your documentation programmatically.\n\nYou can set an optional **API key** to restrict access to the MCP endpoint. When set, requests must include the key in their authorization header.\n\n<Callout type=\"note\">\n For more details on how the MCP endpoint works and how to connect it to AI tools, see the [Model Context Protocol documentation](/model-context-protocol).\n</Callout>";
@@ -7,12 +7,15 @@ categoryOrder: 2
7
7
  order: 6
8
8
  section: "Platform"
9
9
  ---
10
+
10
11
  # AI Assistant
12
+
11
13
  Every Doccupine site ships with a built-in AI assistant that helps visitors find answers across your documentation. The AI settings page lets you choose how it's powered.
12
14
 
13
15
  ## Modes
14
16
 
15
17
  ### Platform (default)
18
+
16
19
  Uses Doccupine's built-in integration. Zero configuration needed - the AI assistant works out of the box with no API keys or setup.
17
20
 
18
21
  Each plan includes a monthly AI usage budget:
@@ -36,6 +39,7 @@ If you run out of AI credits before your billing cycle resets, you can purchase
36
39
  Top-ups are added to your current cycle's budget immediately after purchase and reset when your billing cycle renews. You can purchase multiple top-ups in the same cycle.
37
40
 
38
41
  ### Custom
42
+
39
43
  Bring your own API key for full control over the AI model. Supported providers:
40
44
 
41
45
  - **OpenAI**
@@ -43,12 +47,14 @@ Bring your own API key for full control over the AI model. Supported providers:
43
47
  - **Google**
44
48
 
45
49
  In Custom mode, you can also configure:
50
+
46
51
  - **Embedding model** - the model used to index your documentation content
47
52
  - **Temperature** - controls response creativity (0.0 for focused answers, up to 1.0 for more varied responses)
48
53
 
49
54
  For a complete list of available models, refer to the official documentation of your chosen provider.
50
55
 
51
56
  ### Off
57
+
52
58
  Completely disables the AI assistant on your site.
53
59
 
54
60
  <Callout type="warning">
@@ -56,6 +62,7 @@ Completely disables the AI assistant on your site.
56
62
  </Callout>
57
63
 
58
64
  ## MCP server authentication
65
+
59
66
  Every Doccupine site exposes an MCP (Model Context Protocol) endpoint at \`/api/mcp\`. This lets external AI tools query your documentation programmatically.
60
67
 
61
68
  You can set an optional **API key** to restrict access to the MCP endpoint. When set, requests must include the key in their authorization header.
@@ -1 +1 @@
1
- export declare const platformAnalyticsMdxTemplate = "---\ntitle: \"Analytics\"\ndescription: \"Enable PostHog analytics to track page views on your documentation site.\"\ndate: \"2026-02-24\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 3\nsection: \"Platform\"\n---\n# Analytics\nThe Analytics settings page lets you add PostHog analytics to your documentation site. Page views are tracked client-side and proxied through your own domain for privacy - no data is sent directly to PostHog.\n\n## Enabling analytics\nUse the **Enable Analytics** toggle to turn tracking on or off. When disabled, no tracking code is added to your site.\n\n## Configuration\n\n### PostHog Project API Key\nYour project API key from PostHog (starts with `phc_`). This is a public identifier and is safe to commit to your repository.\n\nTo find your key:\n1. Log in to [PostHog](https://posthog.com).\n2. Open your project settings.\n3. Copy the **Project API Key**.\n\n### Region\nSelect the PostHog cloud region that matches your project:\n\n- **US Cloud** - `us.i.posthog.com`\n- **EU Cloud** - `eu.i.posthog.com`\n\n## How it works\nAnalytics settings are stored in `analytics.json` at the root of your repository. Here's an example:\n\n```json\n{\n \"provider\": \"posthog\",\n \"posthog\": {\n \"key\": \"phc_your_project_api_key\",\n \"host\": \"https://us.i.posthog.com\"\n }\n}\n```\n\nWhen enabled, Doccupine routes all analytics traffic through your documentation domain using Next.js rewrites. Instead of sending data directly to PostHog (which ad blockers may intercept), requests go through `/ingest` on your own domain and are proxied to PostHog.\n\n<Callout type=\"note\">\n Changes to analytics settings are staged as pending changes. Click **Publish** to commit them to your repository and trigger a deploy.\n</Callout>\n\nSee the [Analytics](/analytics) page for the full configuration reference and additional details on the privacy proxy.";
1
+ export declare const platformAnalyticsMdxTemplate = "---\ntitle: \"Analytics\"\ndescription: \"Enable PostHog analytics to track page views on your documentation site.\"\ndate: \"2026-02-24\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 3\nsection: \"Platform\"\n---\n\n# Analytics\n\nThe Analytics settings page lets you add PostHog analytics to your documentation site. Page views are tracked client-side and proxied through your own domain for privacy - no data is sent directly to PostHog.\n\n## Enabling analytics\n\nUse the **Enable Analytics** toggle to turn tracking on or off. When disabled, no tracking code is added to your site.\n\n## Configuration\n\n### PostHog Project API Key\n\nYour project API key from PostHog (starts with `phc_`). This is a public identifier and is safe to commit to your repository.\n\nTo find your key:\n\n1. Log in to [PostHog](https://posthog.com).\n2. Open your project settings.\n3. Copy the **Project API Key**.\n\n### Region\n\nSelect the PostHog cloud region that matches your project:\n\n- **US Cloud** - `us.i.posthog.com`\n- **EU Cloud** - `eu.i.posthog.com`\n\n## How it works\n\nAnalytics settings are stored in `analytics.json` at the root of your repository. Here's an example:\n\n```json\n{\n \"provider\": \"posthog\",\n \"posthog\": {\n \"key\": \"phc_your_project_api_key\",\n \"host\": \"https://us.i.posthog.com\"\n }\n}\n```\n\nWhen enabled, Doccupine routes all analytics traffic through your documentation domain using Next.js rewrites. Instead of sending data directly to PostHog (which ad blockers may intercept), requests go through `/ingest` on your own domain and are proxied to PostHog.\n\n<Callout type=\"note\">\n Changes to analytics settings are staged as pending changes. Click **Publish** to commit them to your repository and trigger a deploy.\n</Callout>\n\nSee the [Analytics](/analytics) page for the full configuration reference and additional details on the privacy proxy.";
@@ -7,29 +7,36 @@ categoryOrder: 2
7
7
  order: 3
8
8
  section: "Platform"
9
9
  ---
10
+
10
11
  # Analytics
12
+
11
13
  The Analytics settings page lets you add PostHog analytics to your documentation site. Page views are tracked client-side and proxied through your own domain for privacy - no data is sent directly to PostHog.
12
14
 
13
15
  ## Enabling analytics
16
+
14
17
  Use the **Enable Analytics** toggle to turn tracking on or off. When disabled, no tracking code is added to your site.
15
18
 
16
19
  ## Configuration
17
20
 
18
21
  ### PostHog Project API Key
22
+
19
23
  Your project API key from PostHog (starts with \`phc_\`). This is a public identifier and is safe to commit to your repository.
20
24
 
21
25
  To find your key:
26
+
22
27
  1. Log in to [PostHog](https://posthog.com).
23
28
  2. Open your project settings.
24
29
  3. Copy the **Project API Key**.
25
30
 
26
31
  ### Region
32
+
27
33
  Select the PostHog cloud region that matches your project:
28
34
 
29
35
  - **US Cloud** - \`us.i.posthog.com\`
30
36
  - **EU Cloud** - \`eu.i.posthog.com\`
31
37
 
32
38
  ## How it works
39
+
33
40
  Analytics settings are stored in \`analytics.json\` at the root of your repository. Here's an example:
34
41
 
35
42
  \`\`\`json
@@ -1 +1 @@
1
- export declare const platformBillingMdxTemplate = "---\ntitle: \"Billing\"\ndescription: \"Manage your subscription, upgrade plans, and access the billing portal.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 4\norder: 1\nsection: \"Platform\"\n---\n# Billing\nDoccupine offers a free trial and two paid plans. The Billing settings page lets you manage your subscription and access the Stripe billing portal.\n\n## Free trial\nEvery new account starts with a **30-day free trial** - no credit card required. During the trial, you have full access to all platform features.\n\n<Callout type=\"note\">\n When your trial expires, you'll need to subscribe to a paid plan to continue using your projects. Your data is preserved - nothing is deleted when the trial ends.\n</Callout>\n\n## Plans\n\n### Pro - \\$200/month\n- 1 project\n- Up to 5 team members\n- All platform features\n\n### Enterprise - \\$500/month\n- 6 projects\n- Unlimited team members\n- All platform features\n\n## Managing your subscription\nClick **Manage Billing** on the Billing settings page to open the Stripe billing portal. From there you can:\n\n- Update your payment method\n- View invoices and payment history\n- Change your plan\n- Cancel your subscription\n\n## Cancellation\nIf you cancel your subscription, your projects enter a grace period. They are not deleted immediately, giving you time to re-subscribe if you change your mind.\n\n## Who can access billing\nBilling is accessible to the project **owner** and any team members with the **Billing** role.";
1
+ export declare const platformBillingMdxTemplate = "---\ntitle: \"Billing\"\ndescription: \"Manage your subscription, upgrade plans, and access the billing portal.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 4\norder: 1\nsection: \"Platform\"\n---\n\n# Billing\n\nDoccupine offers a free trial and two paid plans. The Billing settings page lets you manage your subscription and access the Stripe billing portal.\n\n## Free trial\n\nEvery new account starts with a **30-day free trial** - no credit card required. During the trial, you have full access to all platform features.\n\n<Callout type=\"note\">\n When your trial expires, you'll need to subscribe to a paid plan to continue using your projects. Your data is preserved - nothing is deleted when the trial ends.\n</Callout>\n\n## Plans\n\n### Pro - \\$200/month\n\n- 1 project\n- Up to 5 team members\n- All platform features\n\n### Enterprise - \\$500/month\n\n- 6 projects\n- Unlimited team members\n- All platform features\n\n## Managing your subscription\n\nClick **Manage Billing** on the Billing settings page to open the Stripe billing portal. From there you can:\n\n- Update your payment method\n- View invoices and payment history\n- Change your plan\n- Cancel your subscription\n\n## Cancellation\n\nIf you cancel your subscription, your projects enter a grace period. They are not deleted immediately, giving you time to re-subscribe if you change your mind.\n\n## Who can access billing\n\nBilling is accessible to the project **owner** and any team members with the **Billing** role.";
@@ -7,10 +7,13 @@ categoryOrder: 4
7
7
  order: 1
8
8
  section: "Platform"
9
9
  ---
10
+
10
11
  # Billing
12
+
11
13
  Doccupine offers a free trial and two paid plans. The Billing settings page lets you manage your subscription and access the Stripe billing portal.
12
14
 
13
15
  ## Free trial
16
+
14
17
  Every new account starts with a **30-day free trial** - no credit card required. During the trial, you have full access to all platform features.
15
18
 
16
19
  <Callout type="note">
@@ -20,16 +23,19 @@ Every new account starts with a **30-day free trial** - no credit card required.
20
23
  ## Plans
21
24
 
22
25
  ### Pro - \\$200/month
26
+
23
27
  - 1 project
24
28
  - Up to 5 team members
25
29
  - All platform features
26
30
 
27
31
  ### Enterprise - \\$500/month
32
+
28
33
  - 6 projects
29
34
  - Unlimited team members
30
35
  - All platform features
31
36
 
32
37
  ## Managing your subscription
38
+
33
39
  Click **Manage Billing** on the Billing settings page to open the Stripe billing portal. From there you can:
34
40
 
35
41
  - Update your payment method
@@ -38,7 +44,9 @@ Click **Manage Billing** on the Billing settings page to open the Stripe billing
38
44
  - Cancel your subscription
39
45
 
40
46
  ## Cancellation
47
+
41
48
  If you cancel your subscription, your projects enter a grace period. They are not deleted immediately, giving you time to re-subscribe if you change your mind.
42
49
 
43
50
  ## Who can access billing
51
+
44
52
  Billing is accessible to the project **owner** and any team members with the **Billing** role.`;