@assistant-ui/mcp-docs-server 0.1.1
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.
- package/.docs/organized/code-examples/local-ollama.md +1135 -0
- package/.docs/organized/code-examples/search-agent-for-e-commerce.md +1721 -0
- package/.docs/organized/code-examples/with-ai-sdk.md +1081 -0
- package/.docs/organized/code-examples/with-cloud.md +1164 -0
- package/.docs/organized/code-examples/with-external-store.md +1064 -0
- package/.docs/organized/code-examples/with-ffmpeg.md +1305 -0
- package/.docs/organized/code-examples/with-langgraph.md +1819 -0
- package/.docs/organized/code-examples/with-openai-assistants.md +1175 -0
- package/.docs/organized/code-examples/with-react-hook-form.md +1727 -0
- package/.docs/organized/code-examples/with-vercel-ai-rsc.md +1157 -0
- package/.docs/raw/blog/2024-07-29-hello/index.mdx +65 -0
- package/.docs/raw/blog/2024-09-11/index.mdx +10 -0
- package/.docs/raw/blog/2024-12-15/index.mdx +10 -0
- package/.docs/raw/blog/2025-01-31-changelog/index.mdx +129 -0
- package/.docs/raw/docs/about-assistantui.mdx +44 -0
- package/.docs/raw/docs/api-reference/context-providers/AssistantRuntimeProvider.mdx +30 -0
- package/.docs/raw/docs/api-reference/context-providers/TextContentPartProvider.mdx +26 -0
- package/.docs/raw/docs/api-reference/integrations/react-hook-form.mdx +103 -0
- package/.docs/raw/docs/api-reference/integrations/vercel-ai-sdk.mdx +145 -0
- package/.docs/raw/docs/api-reference/overview.mdx +583 -0
- package/.docs/raw/docs/api-reference/primitives/ActionBar.mdx +264 -0
- package/.docs/raw/docs/api-reference/primitives/AssistantModal.mdx +129 -0
- package/.docs/raw/docs/api-reference/primitives/Attachment.mdx +96 -0
- package/.docs/raw/docs/api-reference/primitives/BranchPicker.mdx +87 -0
- package/.docs/raw/docs/api-reference/primitives/Composer.mdx +204 -0
- package/.docs/raw/docs/api-reference/primitives/ContentPart.mdx +173 -0
- package/.docs/raw/docs/api-reference/primitives/Error.mdx +70 -0
- package/.docs/raw/docs/api-reference/primitives/Message.mdx +181 -0
- package/.docs/raw/docs/api-reference/primitives/Thread.mdx +197 -0
- package/.docs/raw/docs/api-reference/primitives/composition.mdx +21 -0
- package/.docs/raw/docs/api-reference/runtimes/AssistantRuntime.mdx +33 -0
- package/.docs/raw/docs/api-reference/runtimes/AttachmentRuntime.mdx +46 -0
- package/.docs/raw/docs/api-reference/runtimes/ComposerRuntime.mdx +69 -0
- package/.docs/raw/docs/api-reference/runtimes/ContentPartRuntime.mdx +22 -0
- package/.docs/raw/docs/api-reference/runtimes/MessageRuntime.mdx +49 -0
- package/.docs/raw/docs/api-reference/runtimes/ThreadListItemRuntime.mdx +32 -0
- package/.docs/raw/docs/api-reference/runtimes/ThreadListRuntime.mdx +31 -0
- package/.docs/raw/docs/api-reference/runtimes/ThreadRuntime.mdx +48 -0
- package/.docs/raw/docs/architecture.mdx +92 -0
- package/.docs/raw/docs/cloud/authorization.mdx +152 -0
- package/.docs/raw/docs/cloud/overview.mdx +55 -0
- package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +54 -0
- package/.docs/raw/docs/cloud/persistence/langgraph.mdx +123 -0
- package/.docs/raw/docs/concepts/architecture.mdx +19 -0
- package/.docs/raw/docs/concepts/runtime-layer.mdx +163 -0
- package/.docs/raw/docs/concepts/why.mdx +9 -0
- package/.docs/raw/docs/copilots/make-assistant-readable.mdx +71 -0
- package/.docs/raw/docs/copilots/make-assistant-tool-ui.mdx +76 -0
- package/.docs/raw/docs/copilots/make-assistant-tool.mdx +117 -0
- package/.docs/raw/docs/copilots/model-context.mdx +135 -0
- package/.docs/raw/docs/copilots/motivation.mdx +191 -0
- package/.docs/raw/docs/copilots/use-assistant-instructions.mdx +62 -0
- package/.docs/raw/docs/getting-started.mdx +1133 -0
- package/.docs/raw/docs/guides/Attachments.mdx +640 -0
- package/.docs/raw/docs/guides/Branching.mdx +59 -0
- package/.docs/raw/docs/guides/Editing.mdx +56 -0
- package/.docs/raw/docs/guides/Speech.mdx +43 -0
- package/.docs/raw/docs/guides/ToolUI.mdx +663 -0
- package/.docs/raw/docs/guides/Tools.mdx +496 -0
- package/.docs/raw/docs/index.mdx +7 -0
- package/.docs/raw/docs/legacy/styled/AssistantModal.mdx +85 -0
- package/.docs/raw/docs/legacy/styled/Decomposition.mdx +633 -0
- package/.docs/raw/docs/legacy/styled/Markdown.mdx +86 -0
- package/.docs/raw/docs/legacy/styled/Scrollbar.mdx +71 -0
- package/.docs/raw/docs/legacy/styled/Thread.mdx +84 -0
- package/.docs/raw/docs/legacy/styled/ThreadWidth.mdx +21 -0
- package/.docs/raw/docs/mcp-docs-server.mdx +324 -0
- package/.docs/raw/docs/migrations/deprecation-policy.mdx +41 -0
- package/.docs/raw/docs/migrations/v0-7.mdx +188 -0
- package/.docs/raw/docs/migrations/v0-8.mdx +160 -0
- package/.docs/raw/docs/migrations/v0-9.mdx +75 -0
- package/.docs/raw/docs/react-compatibility.mdx +208 -0
- package/.docs/raw/docs/runtimes/ai-sdk/rsc.mdx +226 -0
- package/.docs/raw/docs/runtimes/ai-sdk/use-assistant-hook.mdx +195 -0
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat-hook.mdx +138 -0
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +136 -0
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +1624 -0
- package/.docs/raw/docs/runtimes/custom/local.mdx +1185 -0
- package/.docs/raw/docs/runtimes/helicone.mdx +60 -0
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +320 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +11 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +28 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +120 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +336 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +385 -0
- package/.docs/raw/docs/runtimes/langserve.mdx +126 -0
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +218 -0
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +17 -0
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +196 -0
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +222 -0
- package/.docs/raw/docs/ui/AssistantModal.mdx +46 -0
- package/.docs/raw/docs/ui/AssistantSidebar.mdx +42 -0
- package/.docs/raw/docs/ui/Attachment.mdx +82 -0
- package/.docs/raw/docs/ui/Markdown.mdx +72 -0
- package/.docs/raw/docs/ui/Mermaid.mdx +79 -0
- package/.docs/raw/docs/ui/Scrollbar.mdx +59 -0
- package/.docs/raw/docs/ui/SyntaxHighlighting.mdx +253 -0
- package/.docs/raw/docs/ui/Thread.mdx +47 -0
- package/.docs/raw/docs/ui/ThreadList.mdx +49 -0
- package/.docs/raw/docs/ui/ToolFallback.mdx +64 -0
- package/.docs/raw/docs/ui/primitives/Thread.mdx +197 -0
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/dist/chunk-C7O7EFKU.js +38 -0
- package/dist/chunk-CZCDQ3YH.js +420 -0
- package/dist/index.js +1 -0
- package/dist/prepare-docs/prepare.js +199 -0
- package/dist/stdio.js +8 -0
- package/package.json +43 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ThreadList
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import { Steps, Step } from "fumadocs-ui/components/steps";
|
|
6
|
+
import { ThreadListSample } from "../../../components/samples/threadlist-sample";
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The ThreadList component lets the user switch between threads.
|
|
11
|
+
|
|
12
|
+
<ThreadListSample />
|
|
13
|
+
|
|
14
|
+
## Getting Started
|
|
15
|
+
|
|
16
|
+
<Steps>
|
|
17
|
+
<Step>
|
|
18
|
+
|
|
19
|
+
### Add `thread-list`
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx shadcn@latest add "https://r.assistant-ui.com/thread-list"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This adds a `/components/assistant-ui/thread-list.tsx` file to your project, which you can adjust as needed.
|
|
26
|
+
|
|
27
|
+
</Step>
|
|
28
|
+
<Step>
|
|
29
|
+
|
|
30
|
+
### Use in your application
|
|
31
|
+
|
|
32
|
+
```tsx title="/app/page.tsx" {1,5-6}
|
|
33
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
34
|
+
import { ThreadList } from "@/components/assistant-ui/thread-list";
|
|
35
|
+
|
|
36
|
+
export default function Home() {
|
|
37
|
+
return (
|
|
38
|
+
<div className="grid h-full grid-cols-[200px_1fr]">
|
|
39
|
+
<ThreadList />
|
|
40
|
+
<Thread />
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
</Step>
|
|
47
|
+
</Steps>
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ToolFallback
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import { Steps, Step } from "fumadocs-ui/components/steps";
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The ToolFallback component displays a default ToolUI for tools that do not have a dedicated ToolUI.
|
|
10
|
+
|
|
11
|
+
## Getting Started
|
|
12
|
+
|
|
13
|
+
<Steps>
|
|
14
|
+
<Step>
|
|
15
|
+
|
|
16
|
+
### Add `tool-fallback`
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npx shadcn@latest add "https://r.assistant-ui.com/tool-fallback"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This adds a `/components/assistant-ui/tool-fallback.tsx` file to your project, which you can adjust as needed.
|
|
23
|
+
|
|
24
|
+
</Step>
|
|
25
|
+
<Step>
|
|
26
|
+
|
|
27
|
+
### Use it in your application
|
|
28
|
+
|
|
29
|
+
Pass the `ToolFallback` component to the `MessagePrimitive.Content` component
|
|
30
|
+
|
|
31
|
+
```tsx twoslash title="/components/assistant-ui/thread.tsx" {1,11}
|
|
32
|
+
// @filename: /components/assistant-ui/tool-fallback.tsx
|
|
33
|
+
import { FC } from "react";
|
|
34
|
+
export const ToolFallback: FC = () => null;
|
|
35
|
+
|
|
36
|
+
// @filename: ./thread.tsx
|
|
37
|
+
import { FC } from "react";
|
|
38
|
+
import { MessagePrimitive } from "@assistant-ui/react";
|
|
39
|
+
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
|
40
|
+
|
|
41
|
+
const AssistantActionBar: FC = () => null;
|
|
42
|
+
const BranchPicker: FC<{ className?: string }> = () => null;
|
|
43
|
+
|
|
44
|
+
// ---cut---
|
|
45
|
+
import { ToolFallback } from "@/components/assistant-ui/tool-fallback";
|
|
46
|
+
|
|
47
|
+
const AssistantMessage: FC = () => {
|
|
48
|
+
return (
|
|
49
|
+
<MessagePrimitive.Root className="...">
|
|
50
|
+
<div className="...">
|
|
51
|
+
<MessagePrimitive.Content
|
|
52
|
+
components={{ tools: { Fallback: ToolFallback } }}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
<AssistantActionBar />
|
|
56
|
+
|
|
57
|
+
<BranchPicker className="..." />
|
|
58
|
+
</MessagePrimitive.Root>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</Step>
|
|
64
|
+
</Steps>
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Thread
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
A conversation between a user and an assistant.
|
|
6
|
+
|
|
7
|
+
import { ParametersTable } from "@/components/docs";
|
|
8
|
+
|
|
9
|
+
## Anatomy
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { ThreadPrimitive } from "@assistant-ui/react";
|
|
13
|
+
|
|
14
|
+
const Thread = () => (
|
|
15
|
+
<ThreadPrimitive.Root>
|
|
16
|
+
<ThreadPrimitive.Viewport>
|
|
17
|
+
<ThreadPrimitive.Empty>...</ThreadPrimitive.Empty>
|
|
18
|
+
<ThreadPrimitive.Messages components={...} />
|
|
19
|
+
</ThreadPrimitive.Viewport>
|
|
20
|
+
<Composer />
|
|
21
|
+
</ThreadPrimitive.Root>
|
|
22
|
+
);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API Reference
|
|
26
|
+
|
|
27
|
+
### Root
|
|
28
|
+
|
|
29
|
+
Contains all parts of the thread.
|
|
30
|
+
|
|
31
|
+
This primitive renders a `<div>` element unless `asChild` is set.
|
|
32
|
+
|
|
33
|
+
<ParametersTable
|
|
34
|
+
type="ThreadPrimitiveRootProps"
|
|
35
|
+
parameters={[
|
|
36
|
+
{
|
|
37
|
+
name: "asChild",
|
|
38
|
+
},
|
|
39
|
+
]}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
### Viewport
|
|
43
|
+
|
|
44
|
+
The scrollable area containing all messages. Anchors scroll to the bottom as new messages are added.
|
|
45
|
+
|
|
46
|
+
This primitive renders a `<div>` element unless `asChild` is set.
|
|
47
|
+
|
|
48
|
+
<ParametersTable
|
|
49
|
+
type="ThreadPrimitiveViewportProps"
|
|
50
|
+
parameters={[
|
|
51
|
+
{
|
|
52
|
+
name: "asChild",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "autoScroll",
|
|
56
|
+
type: "boolean",
|
|
57
|
+
default: "true",
|
|
58
|
+
description:
|
|
59
|
+
"Whether to automatically scroll to the bottom of the viewport when new messages are added while the viewport is was previously scrolled to the bottom.",
|
|
60
|
+
},
|
|
61
|
+
]}
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
### Messages
|
|
65
|
+
|
|
66
|
+
Renders all messages. This primitive renders a separate component for each message.
|
|
67
|
+
|
|
68
|
+
<ParametersTable
|
|
69
|
+
type="ThreadPrimitiveMessagesProps"
|
|
70
|
+
parameters={[
|
|
71
|
+
{
|
|
72
|
+
name: "components",
|
|
73
|
+
type: "MessageComponents",
|
|
74
|
+
description: "The component to render for each message.",
|
|
75
|
+
children: [
|
|
76
|
+
{
|
|
77
|
+
type: "MessageComponents",
|
|
78
|
+
parameters: [
|
|
79
|
+
{
|
|
80
|
+
name: "Message",
|
|
81
|
+
type: "ComponentType",
|
|
82
|
+
description: "The component to render for each message.",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "UserMessage",
|
|
86
|
+
type: "ComponentType",
|
|
87
|
+
description: "The component to render for user messages.",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "EditComposer",
|
|
91
|
+
type: "ComponentType",
|
|
92
|
+
description:
|
|
93
|
+
"The component to render for user messages that are being edited.",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "AssistantMessage",
|
|
97
|
+
type: "ComponentType",
|
|
98
|
+
description: "The component to render for assistant messages.",
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
]}
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
### Empty
|
|
108
|
+
|
|
109
|
+
Renders children only when there are no messages.
|
|
110
|
+
|
|
111
|
+
### ScrollToBottom
|
|
112
|
+
|
|
113
|
+
A button to scroll the viewport to the bottom. Disabled when the viewport is already at bottom.
|
|
114
|
+
|
|
115
|
+
This primitive renders a `<button>` element unless `asChild` is set.
|
|
116
|
+
|
|
117
|
+
<ParametersTable
|
|
118
|
+
type="ThreadPrimitiveScrollToBottomProps"
|
|
119
|
+
parameters={[
|
|
120
|
+
{
|
|
121
|
+
name: "asChild",
|
|
122
|
+
},
|
|
123
|
+
]}
|
|
124
|
+
/>
|
|
125
|
+
|
|
126
|
+
### `ThreadPrimitive.Suggestion`
|
|
127
|
+
|
|
128
|
+
Shows a suggestion to the user. When the user clicks on the suggestion, the composer's value is set to the suggestion's prompt.
|
|
129
|
+
|
|
130
|
+
This primitive renders a `<button>` element unless `asChild` is set.
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
import { ThreadPrimitive } from "@assistant-ui/react";
|
|
134
|
+
|
|
135
|
+
const Suggestion = () => {
|
|
136
|
+
return (
|
|
137
|
+
<ThreadPrimitive.Suggestion
|
|
138
|
+
prompt="I need help with product search"
|
|
139
|
+
method="replace"
|
|
140
|
+
autoSend
|
|
141
|
+
/>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
<ParametersTable
|
|
147
|
+
type="ThreadPrimitiveSuggestionProps"
|
|
148
|
+
parameters={[
|
|
149
|
+
{
|
|
150
|
+
name: "prompt",
|
|
151
|
+
type: "string",
|
|
152
|
+
description: "The suggestion's prompt.",
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: "method",
|
|
156
|
+
type: "'replace'",
|
|
157
|
+
description:
|
|
158
|
+
"How does the suggestion interact with the composer's existing value.",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "autoSend",
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description:
|
|
164
|
+
"Whether to automatically send the suggestion when the user clicks on it.",
|
|
165
|
+
default: "false",
|
|
166
|
+
},
|
|
167
|
+
]}
|
|
168
|
+
/>
|
|
169
|
+
|
|
170
|
+
### If
|
|
171
|
+
|
|
172
|
+
Renders children if a condition is met.
|
|
173
|
+
|
|
174
|
+
<ParametersTable
|
|
175
|
+
type="ThreadPrimitiveIfProps"
|
|
176
|
+
parameters={[
|
|
177
|
+
{
|
|
178
|
+
name: "empty",
|
|
179
|
+
type: "boolean | undefined",
|
|
180
|
+
description: "Render children if the thread is empty.",
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "running",
|
|
184
|
+
type: "boolean | undefined",
|
|
185
|
+
description: "Render children if the thread is running.",
|
|
186
|
+
},
|
|
187
|
+
]}
|
|
188
|
+
/>
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
<Thread.If empty>
|
|
192
|
+
{/* equivalent to <Thread.Empty> */}
|
|
193
|
+
</Thread.If>
|
|
194
|
+
<Thread.If empty={false}>
|
|
195
|
+
{/* rendered if thread is not empty */}
|
|
196
|
+
</Thread.If>
|
|
197
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 AgentbaseAI Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Assistant-UI MCP Docs Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server that provides AI assistants with direct access to assistant-ui's documentation and examples.
|
|
4
|
+
|
|
5
|
+
> **📖 Full Documentation**
|
|
6
|
+
> For detailed installation instructions, troubleshooting, and advanced usage, visit the [complete documentation](https://www.assistant-ui.com/docs/mcp-docs-server).
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
### Claude Code
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Add to current project
|
|
14
|
+
claude mcp add assistant-ui -- npx -y @assistant-ui/mcp-docs-server
|
|
15
|
+
|
|
16
|
+
# Or add globally for all projects
|
|
17
|
+
claude mcp add --scope user assistant-ui -- npx -y @assistant-ui/mcp-docs-server
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Claude Desktop
|
|
21
|
+
|
|
22
|
+
Add to your Claude Desktop configuration:
|
|
23
|
+
|
|
24
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
25
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"assistant-ui": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": ["-y", "@assistant-ui/mcp-docs-server"]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Cursor
|
|
39
|
+
|
|
40
|
+
Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"assistant-ui": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["-y", "@assistant-ui/mcp-docs-server"]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Windsurf
|
|
54
|
+
|
|
55
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"assistant-ui": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["-y", "@assistant-ui/mcp-docs-server"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### VSCode
|
|
69
|
+
|
|
70
|
+
Add to `~/.vscode/mcp.json` (Windows users: see [full docs](https://www.assistant-ui.com/docs/mcp-docs-server) for Windows-specific config):
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"servers": {
|
|
75
|
+
"assistant-ui": {
|
|
76
|
+
"command": "npx",
|
|
77
|
+
"args": ["-y", "@assistant-ui/mcp-docs-server"],
|
|
78
|
+
"type": "stdio"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Zed
|
|
85
|
+
|
|
86
|
+
Add to `settings.json` (open via `cmd+,` or `zed: open settings`):
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"context_servers": {
|
|
91
|
+
"assistant-ui": {
|
|
92
|
+
"command": {
|
|
93
|
+
"path": "npx",
|
|
94
|
+
"args": ["-y", "@assistant-ui/mcp-docs-server"],
|
|
95
|
+
"env": {}
|
|
96
|
+
},
|
|
97
|
+
"settings": {}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Tools
|
|
104
|
+
|
|
105
|
+
- **assistantUIDocs** - Retrieve documentation by path
|
|
106
|
+
- **assistantUIExamples** - Access complete example projects
|
|
107
|
+
|
|
108
|
+
## Managing the Server
|
|
109
|
+
|
|
110
|
+
### Claude Code
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# View configured servers
|
|
114
|
+
claude mcp list
|
|
115
|
+
|
|
116
|
+
# Get server details
|
|
117
|
+
claude mcp get assistant-ui
|
|
118
|
+
|
|
119
|
+
# Remove the server
|
|
120
|
+
claude mcp remove assistant-ui
|
|
121
|
+
|
|
122
|
+
# Restart the server
|
|
123
|
+
claude mcp restart assistant-ui
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { fileURLToPath } from 'url';
|
|
2
|
+
import { dirname, join } from 'path';
|
|
3
|
+
|
|
4
|
+
// src/constants.ts
|
|
5
|
+
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
var ROOT_DIR = join(__dirname, "../../../");
|
|
7
|
+
var PACKAGE_DIR = join(__dirname, "../");
|
|
8
|
+
var EXAMPLES_PATH = join(ROOT_DIR, "examples");
|
|
9
|
+
var DOCS_BASE = join(PACKAGE_DIR, ".docs");
|
|
10
|
+
var DOCS_PATH = join(DOCS_BASE, "raw/docs");
|
|
11
|
+
join(DOCS_BASE, "raw/blog");
|
|
12
|
+
var CODE_EXAMPLES_PATH = join(DOCS_BASE, "organized/code-examples");
|
|
13
|
+
var MDX_EXTENSION = ".mdx";
|
|
14
|
+
var MD_EXTENSION = ".md";
|
|
15
|
+
var MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
16
|
+
var IS_PREPARE_MODE = process.env.PREPARE === "true";
|
|
17
|
+
|
|
18
|
+
// src/utils/logger.ts
|
|
19
|
+
var logger = {
|
|
20
|
+
debug: (message, ...args) => {
|
|
21
|
+
if (process.env.DEBUG) {
|
|
22
|
+
console.debug(`[DEBUG] ${message}`, ...args);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
info: (message, ...args) => {
|
|
26
|
+
if (process.env.PREPARE === "true") {
|
|
27
|
+
console.log(`[INFO] ${message}`, ...args);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
error: (message, ...args) => {
|
|
31
|
+
console.error(`[ERROR] ${message}`, ...args);
|
|
32
|
+
},
|
|
33
|
+
warn: (message, ...args) => {
|
|
34
|
+
console.error(`[WARN] ${message}`, ...args);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { CODE_EXAMPLES_PATH, DOCS_PATH, EXAMPLES_PATH, IS_PREPARE_MODE, MAX_FILE_SIZE, MDX_EXTENSION, MD_EXTENSION, ROOT_DIR, logger };
|