@assistant-ui/mcp-docs-server 0.1.18 → 0.1.20

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 (148) hide show
  1. package/.docs/organized/code-examples/with-ag-ui.md +69 -1336
  2. package/.docs/organized/code-examples/with-ai-sdk-v6.md +429 -0
  3. package/.docs/organized/code-examples/with-assistant-transport.md +41 -1454
  4. package/.docs/organized/code-examples/with-cloud.md +73 -1442
  5. package/.docs/organized/code-examples/with-custom-thread-list.md +95 -1424
  6. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +674 -0
  7. package/.docs/organized/code-examples/with-external-store.md +68 -1334
  8. package/.docs/organized/code-examples/with-ffmpeg.md +73 -1341
  9. package/.docs/organized/code-examples/with-langgraph.md +52 -1545
  10. package/.docs/organized/code-examples/with-parent-id-grouping.md +58 -1364
  11. package/.docs/organized/code-examples/with-react-hook-form.md +73 -1726
  12. package/.docs/organized/code-examples/with-react-router.md +915 -0
  13. package/.docs/organized/code-examples/with-store.md +31 -31
  14. package/.docs/organized/code-examples/with-tanstack.md +78 -862
  15. package/.docs/raw/blog/2025-01-31-changelog/index.mdx +0 -2
  16. package/.docs/raw/docs/{architecture.mdx → (docs)/architecture.mdx} +3 -2
  17. package/.docs/raw/docs/{cli.mdx → (docs)/cli.mdx} +66 -18
  18. package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-readable.mdx +1 -0
  19. package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-tool-ui.mdx +2 -1
  20. package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-tool.mdx +2 -1
  21. package/.docs/raw/docs/{copilots → (docs)/copilots}/model-context.mdx +5 -4
  22. package/.docs/raw/docs/{copilots → (docs)/copilots}/motivation.mdx +4 -3
  23. package/.docs/raw/docs/{copilots → (docs)/copilots}/use-assistant-instructions.mdx +1 -0
  24. package/.docs/raw/docs/{devtools.mdx → (docs)/devtools.mdx} +4 -4
  25. package/.docs/raw/docs/{guides/Attachments.mdx → (docs)/guides/attachments.mdx} +6 -7
  26. package/.docs/raw/docs/{guides/Branching.mdx → (docs)/guides/branching.mdx} +2 -1
  27. package/.docs/raw/docs/{guides → (docs)/guides}/context-api.mdx +118 -117
  28. package/.docs/raw/docs/(docs)/guides/dictation.mdx +370 -0
  29. package/.docs/raw/docs/{guides/Editing.mdx → (docs)/guides/editing.mdx} +1 -0
  30. package/.docs/raw/docs/{guides/Latex.mdx → (docs)/guides/latex.mdx} +1 -2
  31. package/.docs/raw/docs/{guides/Speech.mdx → (docs)/guides/speech.mdx} +9 -10
  32. package/.docs/raw/docs/(docs)/guides/suggestions.mdx +296 -0
  33. package/.docs/raw/docs/{guides/ToolUI.mdx → (docs)/guides/tool-ui.mdx} +15 -14
  34. package/.docs/raw/docs/(docs)/guides/tools.mdx +564 -0
  35. package/.docs/raw/docs/(docs)/index.mdx +74 -0
  36. package/.docs/raw/docs/{getting-started.mdx → (docs)/installation.mdx} +18 -23
  37. package/.docs/raw/docs/(docs)/llm.mdx +209 -0
  38. package/.docs/raw/docs/{api-reference/context-providers/AssistantRuntimeProvider.mdx → (reference)/api-reference/context-providers/assistant-runtime-provider.mdx} +2 -1
  39. package/.docs/raw/docs/{api-reference/context-providers/TextMessagePartProvider.mdx → (reference)/api-reference/context-providers/text-message-part-provider.mdx} +2 -1
  40. package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/react-data-stream.mdx +50 -3
  41. package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/react-hook-form.mdx +2 -1
  42. package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/vercel-ai-sdk.mdx +2 -2
  43. package/.docs/raw/docs/{api-reference → (reference)/api-reference}/overview.mdx +10 -4
  44. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +327 -0
  45. package/.docs/raw/docs/{api-reference/primitives/ActionBar.mdx → (reference)/api-reference/primitives/action-bar.mdx} +7 -5
  46. package/.docs/raw/docs/{api-reference/primitives/AssistantIf.mdx → (reference)/api-reference/primitives/assistant-if.mdx} +51 -51
  47. package/.docs/raw/docs/{api-reference/primitives/AssistantModal.mdx → (reference)/api-reference/primitives/assistant-modal.mdx} +3 -1
  48. package/.docs/raw/docs/{api-reference/primitives/Attachment.mdx → (reference)/api-reference/primitives/attachment.mdx} +3 -2
  49. package/.docs/raw/docs/{api-reference/primitives/BranchPicker.mdx → (reference)/api-reference/primitives/branch-picker.mdx} +2 -1
  50. package/.docs/raw/docs/{api-reference/primitives/Composer.mdx → (reference)/api-reference/primitives/composer.mdx} +101 -2
  51. package/.docs/raw/docs/{api-reference → (reference)/api-reference}/primitives/composition.mdx +1 -0
  52. package/.docs/raw/docs/{api-reference/primitives/Error.mdx → (reference)/api-reference/primitives/error.mdx} +2 -1
  53. package/.docs/raw/docs/{api-reference/primitives/MessagePart.mdx → (reference)/api-reference/primitives/message-part.mdx} +2 -2
  54. package/.docs/raw/docs/{api-reference/primitives/Message.mdx → (reference)/api-reference/primitives/message.mdx} +2 -1
  55. package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +153 -0
  56. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +221 -0
  57. package/.docs/raw/docs/{api-reference/primitives/ThreadListItem.mdx → (reference)/api-reference/primitives/thread-list-item.mdx} +2 -1
  58. package/.docs/raw/docs/{api-reference/primitives/ThreadList.mdx → (reference)/api-reference/primitives/thread-list.mdx} +2 -1
  59. package/.docs/raw/docs/{api-reference/primitives/Thread.mdx → (reference)/api-reference/primitives/thread.mdx} +30 -40
  60. package/.docs/raw/docs/{api-reference/runtimes/AssistantRuntime.mdx → (reference)/api-reference/runtimes/assistant-runtime.mdx} +2 -1
  61. package/.docs/raw/docs/{api-reference/runtimes/AttachmentRuntime.mdx → (reference)/api-reference/runtimes/attachment-runtime.mdx} +3 -2
  62. package/.docs/raw/docs/{api-reference/runtimes/ComposerRuntime.mdx → (reference)/api-reference/runtimes/composer-runtime.mdx} +2 -1
  63. package/.docs/raw/docs/{api-reference/runtimes/MessagePartRuntime.mdx → (reference)/api-reference/runtimes/message-part-runtime.mdx} +3 -2
  64. package/.docs/raw/docs/{api-reference/runtimes/MessageRuntime.mdx → (reference)/api-reference/runtimes/message-runtime.mdx} +3 -2
  65. package/.docs/raw/docs/{api-reference/runtimes/ThreadListItemRuntime.mdx → (reference)/api-reference/runtimes/thread-list-item-runtime.mdx} +2 -1
  66. package/.docs/raw/docs/{api-reference/runtimes/ThreadListRuntime.mdx → (reference)/api-reference/runtimes/thread-list-runtime.mdx} +2 -1
  67. package/.docs/raw/docs/{api-reference/runtimes/ThreadRuntime.mdx → (reference)/api-reference/runtimes/thread-runtime.mdx} +3 -5
  68. package/.docs/raw/docs/{legacy/styled/AssistantModal.mdx → (reference)/legacy/styled/assistant-modal.mdx} +2 -3
  69. package/.docs/raw/docs/{legacy/styled/Decomposition.mdx → (reference)/legacy/styled/decomposition.mdx} +6 -5
  70. package/.docs/raw/docs/{legacy/styled/Markdown.mdx → (reference)/legacy/styled/markdown.mdx} +2 -4
  71. package/.docs/raw/docs/{legacy/styled/Scrollbar.mdx → (reference)/legacy/styled/scrollbar.mdx} +2 -1
  72. package/.docs/raw/docs/{legacy/styled/ThreadWidth.mdx → (reference)/legacy/styled/thread-width.mdx} +1 -0
  73. package/.docs/raw/docs/{legacy/styled/Thread.mdx → (reference)/legacy/styled/thread.mdx} +2 -3
  74. package/.docs/raw/docs/{migrations → (reference)/migrations}/deprecation-policy.mdx +1 -0
  75. package/.docs/raw/docs/{migrations → (reference)/migrations}/react-langgraph-v0-7.mdx +1 -2
  76. package/.docs/raw/docs/{migrations → (reference)/migrations}/v0-11.mdx +1 -0
  77. package/.docs/raw/docs/(reference)/migrations/v0-12.mdx +300 -0
  78. package/.docs/raw/docs/{react-compatibility.mdx → (reference)/react-compatibility.mdx} +2 -3
  79. package/.docs/raw/docs/cloud/authorization.mdx +1 -0
  80. package/.docs/raw/docs/cloud/overview.mdx +1 -0
  81. package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +2 -3
  82. package/.docs/raw/docs/cloud/persistence/langgraph.mdx +5 -7
  83. package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +9 -8
  84. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +2 -3
  85. package/.docs/raw/docs/runtimes/assistant-transport.mdx +10 -9
  86. package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +7 -8
  87. package/.docs/raw/docs/runtimes/custom/external-store.mdx +6 -8
  88. package/.docs/raw/docs/runtimes/custom/local.mdx +55 -42
  89. package/.docs/raw/docs/runtimes/data-stream.mdx +67 -6
  90. package/.docs/raw/docs/runtimes/helicone.mdx +1 -0
  91. package/.docs/raw/docs/runtimes/langgraph/index.mdx +3 -3
  92. package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +1 -0
  93. package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +1 -0
  94. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +1 -0
  95. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -0
  96. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +2 -1
  97. package/.docs/raw/docs/runtimes/langserve.mdx +2 -2
  98. package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +4 -5
  99. package/.docs/raw/docs/runtimes/mastra/overview.mdx +1 -0
  100. package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +3 -4
  101. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +2 -4
  102. package/.docs/raw/docs/ui/accordion.mdx +261 -0
  103. package/.docs/raw/docs/ui/assistant-modal.mdx +163 -0
  104. package/.docs/raw/docs/ui/assistant-sidebar.mdx +90 -0
  105. package/.docs/raw/docs/ui/attachment.mdx +227 -0
  106. package/.docs/raw/docs/ui/badge.mdx +140 -0
  107. package/.docs/raw/docs/ui/file.mdx +153 -0
  108. package/.docs/raw/docs/ui/image.mdx +101 -0
  109. package/.docs/raw/docs/ui/{Markdown.mdx → markdown.mdx} +11 -6
  110. package/.docs/raw/docs/ui/{Mermaid.mdx → mermaid.mdx} +12 -5
  111. package/.docs/raw/docs/ui/model-selector.mdx +226 -0
  112. package/.docs/raw/docs/ui/{PartGrouping.mdx → part-grouping.mdx} +6 -8
  113. package/.docs/raw/docs/ui/reasoning.mdx +150 -0
  114. package/.docs/raw/docs/ui/{Scrollbar.mdx → scrollbar.mdx} +9 -1
  115. package/.docs/raw/docs/ui/select.mdx +247 -0
  116. package/.docs/raw/docs/ui/sources.mdx +89 -0
  117. package/.docs/raw/docs/ui/streamdown.mdx +348 -0
  118. package/.docs/raw/docs/ui/{SyntaxHighlighting.mdx → syntax-highlighting.mdx} +9 -5
  119. package/.docs/raw/docs/ui/tabs.mdx +261 -0
  120. package/.docs/raw/docs/ui/thread-list.mdx +275 -0
  121. package/.docs/raw/docs/ui/{Thread.mdx → thread.mdx} +61 -76
  122. package/.docs/raw/docs/ui/tool-fallback.mdx +112 -0
  123. package/.docs/raw/docs/ui/tool-group.mdx +214 -0
  124. package/README.md +3 -3
  125. package/dist/tools/docs.js +1 -1
  126. package/dist/tools/examples.js +1 -1
  127. package/dist/tools/examples.js.map +1 -1
  128. package/package.json +5 -5
  129. package/src/tools/docs.ts +1 -1
  130. package/src/tools/examples.ts +1 -1
  131. package/src/tools/tests/docs.test.ts +18 -16
  132. package/src/tools/tests/examples.test.ts +6 -6
  133. package/src/tools/tests/path-traversal.test.ts +3 -3
  134. package/src/utils/tests/security.test.ts +3 -3
  135. package/.docs/organized/code-examples/with-ai-sdk-v5.md +0 -1735
  136. package/.docs/raw/docs/about-assistantui.mdx +0 -53
  137. package/.docs/raw/docs/guides/Tools.mdx +0 -738
  138. package/.docs/raw/docs/index.mdx +0 -7
  139. package/.docs/raw/docs/mcp-docs-server.mdx +0 -322
  140. package/.docs/raw/docs/migrations/v0-12.mdx +0 -125
  141. package/.docs/raw/docs/ui/AssistantModal.mdx +0 -45
  142. package/.docs/raw/docs/ui/AssistantSidebar.mdx +0 -41
  143. package/.docs/raw/docs/ui/Attachment.mdx +0 -84
  144. package/.docs/raw/docs/ui/Reasoning.mdx +0 -152
  145. package/.docs/raw/docs/ui/ThreadList.mdx +0 -90
  146. package/.docs/raw/docs/ui/ToolFallback.mdx +0 -63
  147. package/.docs/raw/docs/ui/ToolGroup.mdx +0 -96
  148. /package/.docs/raw/docs/{copilots → (docs)/copilots}/assistant-frame.mdx +0 -0
@@ -1,16 +1,15 @@
1
1
  ---
2
- title: Getting Started
2
+ title: Installation
3
+ description: Get assistant-ui running in 5 minutes with npm and your first chat component.
3
4
  ---
4
5
 
5
- import { Step, Steps } from "fumadocs-ui/components/steps";
6
- import { Tab, Tabs } from "fumadocs-ui/components/tabs";
7
- import { Callout } from "fumadocs-ui/components/callout";
8
- import { Card, Cards } from "fumadocs-ui/components/card";
9
- import { InstallCommand } from "@/components/docs/install-command";
6
+ import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
10
7
 
11
- ## Start with a new project
8
+ ## Quick Start
12
9
 
13
- ![animated gif showing the steps to create a new project](../../../../.github/assets/assistant-ui-starter.gif)
10
+ The fastest way to get started with assistant-ui.
11
+
12
+ ![animated gif showing the steps to create a new project](../../../../../.github/assets/assistant-ui-starter.gif)
14
13
 
15
14
  <Steps>
16
15
  <Step>
@@ -20,11 +19,13 @@ import { InstallCommand } from "@/components/docs/install-command";
20
19
  **Create a new project:**
21
20
 
22
21
  ```sh
23
- # Create a new project with the default template
24
22
  npx assistant-ui@latest create
23
+ ```
24
+
25
+ Or choose a template:
25
26
 
26
- # Or choose one of the following templates:
27
- # Assistant Cloud for baked in persistence and thread management
27
+ ```sh
28
+ # Assistant Cloud - with persistence and thread management
28
29
  npx assistant-ui@latest create -t cloud
29
30
 
30
31
  # LangGraph
@@ -34,10 +35,9 @@ npx assistant-ui@latest create -t langgraph
34
35
  npx assistant-ui@latest create -t mcp
35
36
  ```
36
37
 
37
- **Add assistant-ui to an existing React project:**
38
+ **Add to an existing project:**
38
39
 
39
40
  ```sh
40
- # Add assistant-ui to an existing React project
41
41
  npx assistant-ui@latest init
42
42
  ```
43
43
 
@@ -46,13 +46,10 @@ npx assistant-ui@latest init
46
46
 
47
47
  ### Add API key
48
48
 
49
- Add a new `.env` file to your project with your OpenAI API key:
49
+ Create a `.env` file with your API key:
50
50
 
51
51
  ```
52
52
  OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
53
-
54
- # chat history -- sign up for free on https://cloud.assistant-ui.com
55
- # NEXT_PUBLIC_ASSISTANT_BASE_URL="https://..."
56
53
  ```
57
54
 
58
55
  </Step>
@@ -67,11 +64,9 @@ npm run dev
67
64
  </Step>
68
65
  </Steps>
69
66
 
70
- ## Manual installation
67
+ ## Manual Setup
71
68
 
72
- <Callout>
73
- We recommend `npx assistant-ui init` to setup existing projects.
74
- </Callout>
69
+ If you prefer not to use the CLI, you can install components manually.
75
70
 
76
71
  <Steps>
77
72
  <Step>
@@ -404,7 +399,7 @@ const MyApp = () => {
404
399
  ```
405
400
 
406
401
  ```tsx title="/app/page.tsx" tab="AssistantModal"
407
- // run `npx shadcn@latest add @assistant-ui/assistant-modal`
402
+ // run `npx shadcn@latest add https://r.assistant-ui.com/assistant-modal.json`
408
403
 
409
404
  import { AssistantRuntimeProvider } from "@assistant-ui/react";
410
405
  import { useChatRuntime, AssistantChatTransport } from "@assistant-ui/react-ai-sdk";
@@ -441,7 +436,7 @@ const MyApp = () => {
441
436
  <Card
442
437
  title="Generative UI"
443
438
  description="Create rich UI components for tool executions"
444
- href="/docs/guides/ToolUI"
439
+ href="/docs/guides/tool-ui"
445
440
  />
446
441
  <Card
447
442
  title="Add Persistence"
@@ -0,0 +1,209 @@
1
+ ---
2
+ title: "AI-Assisted Development"
3
+ description: Use AI tools to build with assistant-ui faster. AI-accessible documentation, Claude Code skills, and MCP integration.
4
+ ---
5
+
6
+ import { FileText } from "lucide-react";
7
+
8
+ Build faster with AI assistants that understand assistant-ui. This page covers all the ways to give your AI tools access to assistant-ui documentation and context.
9
+
10
+ ## AI Accessible Documentation
11
+
12
+ Our docs are designed to be easily accessible to AI assistants:
13
+
14
+ <Cards>
15
+ <Card icon={<FileText className="text-blue-300" />} title="/llms.txt" href="/llms.txt" external>
16
+ Structured index of all documentation pages. Point your AI here for a quick overview.
17
+ </Card>
18
+
19
+ <Card icon={<FileText className="text-green-300" />} title="/llms-full.txt" href="/llms-full.txt" external>
20
+ Complete documentation in a single file. Use this for full context.
21
+ </Card>
22
+
23
+ <Card icon={<FileText className="text-purple-300" />} title=".mdx suffix">
24
+ Add `.mdx` to any page's URL to get raw markdown content (e.g., `/docs/installation.mdx`).
25
+ </Card>
26
+ </Cards>
27
+
28
+ ### Context Files
29
+
30
+ Add assistant-ui context to your project's `CLAUDE.md` or `.cursorrules`:
31
+
32
+ ```md
33
+ ## assistant-ui
34
+
35
+ This project uses assistant-ui for chat interfaces.
36
+
37
+ Documentation: https://www.assistant-ui.com/llms-full.txt
38
+
39
+ Key patterns:
40
+ - Use AssistantRuntimeProvider at the app root
41
+ - Thread component for full chat interface
42
+ - AssistantModal for floating chat widget
43
+ - useChatRuntime hook with AI SDK transport
44
+ ```
45
+
46
+ ## Skills
47
+
48
+ Install assistant-ui skills for AI Tools:
49
+
50
+ ```sh
51
+ npx skills add assistant-ui/skills
52
+ ```
53
+
54
+ | Skill | Purpose |
55
+ |-------|---------|
56
+ | `/assistant-ui` | General architecture and overview guide |
57
+ | `/setup` | Project setup and configuration (AI SDK, LangGraph, custom backends) |
58
+ | `/primitives` | UI component primitives (Thread, Composer, Message, etc.) |
59
+ | `/runtime` | Runtime system and state management |
60
+ | `/tools` | Tool registration and tool UI |
61
+ | `/streaming` | Streaming protocol with assistant-stream |
62
+ | `/cloud` | Cloud persistence and authorization |
63
+ | `/thread-list` | Multi-thread management |
64
+ | `/update` | Update assistant-ui and AI SDK to latest versions |
65
+
66
+ Use by typing the command in Claude Code, e.g., `/assistant-ui` for the main guide or `/setup` when setting up a project.
67
+
68
+ ## MCP
69
+
70
+ `@assistant-ui/mcp-docs-server` provides direct access to assistant-ui documentation and examples in your IDE via the Model Context Protocol.
71
+
72
+ Once installed, your AI assistant will understand everything about assistant-ui - just ask naturally:
73
+
74
+ - "Add a chat interface with streaming support to my app"
75
+ - "How do I integrate assistant-ui with the Vercel AI SDK?"
76
+ - "My Thread component isn't updating, what could be wrong?"
77
+
78
+ ### Quick Install (CLI)
79
+
80
+ ```bash
81
+ npx assistant-ui mcp
82
+ ```
83
+
84
+ Or specify your IDE directly:
85
+
86
+ ```bash
87
+ npx assistant-ui mcp --cursor
88
+ npx assistant-ui mcp --windsurf
89
+ npx assistant-ui mcp --vscode
90
+ npx assistant-ui mcp --zed
91
+ npx assistant-ui mcp --claude-code
92
+ npx assistant-ui mcp --claude-desktop
93
+ ```
94
+
95
+ ### Manual Installation
96
+
97
+ <Tabs items={["Cursor", "Windsurf", "VSCode", "Zed", "Claude Code", "Claude Desktop"]}>
98
+ <Tab>
99
+ <a href="cursor://anysphere.cursor-deeplink/mcp/install?name=assistant-ui&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBhc3Npc3RhbnQtdWkvbWNwLWRvY3Mtc2VydmVyIl19">
100
+ <img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor" className="not-prose" />
101
+ </a>
102
+
103
+ Or add to `.cursor/mcp.json`:
104
+
105
+ ```json
106
+ {
107
+ "mcpServers": {
108
+ "assistant-ui": {
109
+ "command": "npx",
110
+ "args": ["-y", "@assistant-ui/mcp-docs-server"]
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ After adding, open Cursor Settings → MCP → find "assistant-ui" and click enable.
117
+ </Tab>
118
+ <Tab>
119
+ Add to `~/.codeium/windsurf/mcp_config.json`:
120
+
121
+ ```json
122
+ {
123
+ "mcpServers": {
124
+ "assistant-ui": {
125
+ "command": "npx",
126
+ "args": ["-y", "@assistant-ui/mcp-docs-server"]
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+ After adding, fully quit and re-open Windsurf.
133
+ </Tab>
134
+ <Tab>
135
+ Add to `.vscode/mcp.json` in your project:
136
+
137
+ ```json
138
+ {
139
+ "servers": {
140
+ "assistant-ui": {
141
+ "command": "npx",
142
+ "args": ["-y", "@assistant-ui/mcp-docs-server"],
143
+ "type": "stdio"
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ Enable MCP in Settings → search "MCP" → enable "Chat > MCP". Use GitHub Copilot Chat in Agent mode.
150
+ </Tab>
151
+ <Tab>
152
+ Add to your Zed settings file:
153
+ - macOS: `~/.zed/settings.json`
154
+ - Linux: `~/.config/zed/settings.json`
155
+ - Windows: `%APPDATA%\Zed\settings.json`
156
+
157
+ Or open via `Cmd/Ctrl + ,` → "Open JSON Settings"
158
+
159
+ ```json
160
+ {
161
+ "context_servers": {
162
+ "assistant-ui": {
163
+ "command": {
164
+ "path": "npx",
165
+ "args": ["-y", "@assistant-ui/mcp-docs-server"]
166
+ }
167
+ }
168
+ }
169
+ }
170
+ ```
171
+
172
+ The server starts automatically with the Assistant Panel.
173
+ </Tab>
174
+ <Tab>
175
+ ```bash
176
+ claude mcp add assistant-ui -- npx -y @assistant-ui/mcp-docs-server
177
+ ```
178
+
179
+ The server starts automatically once added.
180
+ </Tab>
181
+ <Tab>
182
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
183
+
184
+ ```json
185
+ {
186
+ "mcpServers": {
187
+ "assistant-ui": {
188
+ "command": "npx",
189
+ "args": ["-y", "@assistant-ui/mcp-docs-server"]
190
+ }
191
+ }
192
+ }
193
+ ```
194
+
195
+ Restart Claude Desktop after updating the configuration.
196
+ </Tab>
197
+ </Tabs>
198
+
199
+ ### Available Tools
200
+
201
+ | Tool | Description |
202
+ |------|-------------|
203
+ | `assistantUIDocs` | Access documentation: getting started, component APIs, runtime docs, integration guides |
204
+ | `assistantUIExamples` | Browse code examples: AI SDK, LangGraph, OpenAI Assistants, tool UI patterns |
205
+
206
+ ### Troubleshooting
207
+
208
+ - **Server not starting**: Ensure `npx` is installed and working. Check configuration file syntax.
209
+ - **Tool calls failing**: Restart the MCP server and/or your IDE. Update to latest IDE version.
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  title: <AssistantRuntimeProvider />
3
+ description: Root provider that connects your runtime to assistant-ui components.
3
4
  ---
4
5
 
5
- import { ParametersTable } from "@/components/docs";
6
+ import { ParametersTable } from "@/components/docs/tables/ParametersTable";
6
7
  import { AssistantRuntimeProvider } from "@/generated/typeDocs";
7
8
 
8
9
  The `AssistantRuntimeProvider` provides data and APIs used by assistant-ui components.
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  title: <TextMessagePartProvider />
3
+ description: Context provider for reusing text components outside of message content.
3
4
  ---
4
5
 
5
- import { ParametersTable } from "@/components/docs";
6
+ import { ParametersTable } from "@/components/docs/tables/ParametersTable";
6
7
  import { AssistantRuntimeProvider } from "@/generated/typeDocs";
7
8
 
8
9
  The `TextMessagePartProvider` provides data and APIs for `TextMessagePart` components.
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  title: "@assistant-ui/react-data-stream"
3
+ description: Hooks for connecting to data stream protocol endpoints and Assistant Cloud.
3
4
  ---
4
5
 
5
6
  Data Stream protocol integration for assistant-ui.
6
7
 
7
- import { ParametersTable } from "@/components/docs";
8
+ import { ParametersTable } from "@/components/docs/tables/ParametersTable";
8
9
 
9
10
  ## API Reference
10
11
 
@@ -156,7 +157,12 @@ const MyRuntimeProvider = ({ children }: { children: React.ReactNode }) => {
156
157
 
157
158
  ### `toLanguageModelMessages`
158
159
 
159
- Convert assistant-ui messages to language model format.
160
+ Convert assistant-ui messages to AI SDK's `LanguageModelV2Message` format.
161
+
162
+ <Callout type="info">
163
+ For custom integrations, consider using `toGenericMessages` from `assistant-stream` instead.
164
+ This function is specific to the AI SDK format.
165
+ </Callout>
160
166
 
161
167
  ```tsx
162
168
  import { toLanguageModelMessages } from "@assistant-ui/react-data-stream";
@@ -191,4 +197,45 @@ const languageModelMessages = toLanguageModelMessages(messages, {
191
197
  ],
192
198
  },
193
199
  ]}
194
- />
200
+ />
201
+
202
+ ---
203
+
204
+ ## Framework-Agnostic Utilities
205
+
206
+ For custom integrations that don't use the AI SDK, use these utilities from `assistant-stream`:
207
+
208
+ ### `toGenericMessages`
209
+
210
+ Convert thread messages to a framework-agnostic format.
211
+
212
+ ```tsx
213
+ import { toGenericMessages } from "assistant-stream";
214
+
215
+ const genericMessages = toGenericMessages(messages);
216
+ ```
217
+
218
+ Returns an array of `GenericMessage` which can be one of:
219
+ - `{ role: "system"; content: string }`
220
+ - `{ role: "user"; content: (GenericTextPart | GenericFilePart)[] }`
221
+ - `{ role: "assistant"; content: (GenericTextPart | GenericToolCallPart)[] }`
222
+ - `{ role: "tool"; content: GenericToolResultPart[] }`
223
+
224
+ ### `toToolsJSONSchema`
225
+
226
+ Convert tool definitions to JSON Schema format.
227
+
228
+ ```tsx
229
+ import { toToolsJSONSchema } from "assistant-stream";
230
+
231
+ const toolSchemas = toToolsJSONSchema(tools);
232
+ // Returns: Record<string, { description?: string; parameters: JSONSchema7 }>
233
+ ```
234
+
235
+ By default, filters out disabled tools and backend-only tools. Use the `filter` option to customize:
236
+
237
+ ```tsx
238
+ const allTools = toToolsJSONSchema(tools, {
239
+ filter: () => true, // Include all tools
240
+ });
241
+ ```
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  title: "@assistant-ui/react-hook-form"
3
+ description: React Hook Form integration for AI-assisted form filling.
3
4
  ---
4
5
 
5
6
  A React Hook Form integration for @assistant-ui.
6
7
 
7
- import { ParametersTable } from "@/components/docs";
8
+ import { ParametersTable } from "@/components/docs/tables/ParametersTable";
8
9
 
9
10
  ## API Reference
10
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: "@assistant-ui/react-ai-sdk"
3
+ description: Vercel AI SDK v5 integration with chat runtime hooks and transport utilities.
3
4
  ---
4
5
 
5
6
  Vercel AI SDK integration for assistant-ui.
6
7
 
7
- import { ParametersTable } from "@/components/docs";
8
- import { Callout } from "fumadocs-ui/components/callout";
8
+ import { ParametersTable } from "@/components/docs/tables/ParametersTable";
9
9
 
10
10
  <Callout type="info">
11
11
  This package provides integration with AI SDK v5. For AI SDK v4, see the [AI
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  title: Overview
3
+ description: API reference for primitives, runtime hooks, and context providers.
3
4
  ---
4
5
 
5
- import { Callout } from "fumadocs-ui/components/callout";
6
6
 
7
7
  import { Component, ContextLevel, RuntimeHooks } from "./context";
8
8
 
@@ -35,7 +35,13 @@ export const contextColors = {
35
35
 
36
36
  - [`useDataStreamRuntime`](#use-data-stream-runtime)
37
37
  - [`useCloudRuntime`](#use-cloud-runtime)
38
- - [`toLanguageModelMessages`](#to-language-model-messages)
38
+ - [`toLanguageModelMessages`](#to-language-model-messages) (AI SDK specific)
39
+
40
+ ### assistant-stream (Framework-Agnostic)
41
+
42
+ - [`toGenericMessages`](#to-generic-messages)
43
+ - [`toToolsJSONSchema`](#to-tools-json-schema)
44
+ - [`GenericMessage`](#generic-message)
39
45
 
40
46
  ### LangGraph
41
47
 
@@ -239,7 +245,7 @@ A conversation thread.
239
245
  tooltip="Displayed when the thread is empty"
240
246
  />
241
247
  <Component
242
- name="AssistantIf"
248
+ name="AuiIf"
243
249
  docsLink="#assistant-if"
244
250
  tooltip="Conditional rendering based on assistant state"
245
251
  />
@@ -383,7 +389,7 @@ Manages the state and actions for individual messages
383
389
  tooltip="Displays attachments in the message"
384
390
  />
385
391
  <Component
386
- name="AssistantIf"
392
+ name="AuiIf"
387
393
  docsLink="#assistant-if"
388
394
  tooltip="Conditional rendering based on assistant state"
389
395
  />