Skip to content

Commit e58eb63

Browse files
authored
Merge pull request #256 from weaviate/docs-mcp-server
[New docs] Add Weaviate Docs MCP guide
2 parents 2e12634 + e8b3a0c commit e58eb63

File tree

6 files changed

+257
-24
lines changed

6 files changed

+257
-24
lines changed

_build_scripts/link-validator.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const domainsToIgnore = [
4747
'https://towardsdatascience.com/',
4848
'https://voyageai.com/',
4949
'https://weaviateagents.featurebase.app',
50+
'https://weaviate-docs.mcp.kapa.ai/',
5051
'https://youtu.be/',
5152
'https://www.youtube.com',
5253
'https://x.com',

docs/weaviate/best-practices/code-generation.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2-
title: AI-based Weaviate code generation
3-
sidebar_position: 50
2+
title: AI-assisted Weaviate code generation
3+
sidebar_label: Vibe coding - Best practices
44
description: "Tips and techniques for using generative AI models to write better Weaviate-related code."
55
image: og/docs/howto.jpg
66
# tags: ['best practices', 'how-to']
77
---
88

9-
# AI-based Weaviate code generation (vibe-coding)
10-
119
Generative AI models are becoming more capable at writing code. This practice is often referred to as "vibe-coding" or "AI-assisted coding". While this can speed up development, it is also subject to some pitfalls, such as hallucinations due to out-of-date, or missing information in the training data.
1210

1311
Here are some tips for writing Weaviate client library code with generative AI models and tooling, based on our anecdotal experience.
@@ -16,6 +14,10 @@ Here are some tips for writing Weaviate client library code with generative AI m
1614

1715
## Specific recommendations
1816

17+
### Weaviate Docs MCP Server
18+
19+
The **[Weaviate Docs MCP Server](../mcp/docs-mcp-server.mdx)** brings instant access to Weaviate's documentation directly into your AI development environment. Built on the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro), this server integrates seamlessly with tools like Claude Desktop and Cursor, allowing you to query Weaviate's documentation without leaving your IDE.
20+
1921
### High-performing models
2022

2123
As of July 2025, we've seen these models perform well for code generation. (Assessed by the correctness of generated [Python v4 client library](/weaviate/client-libraries/python/index.mdx) code.)
@@ -34,12 +36,12 @@ We found that performances of the above LLMs improved significantly when provide
3436

3537
As a starting point, we have curated a set of code examples below. Try copy and pasting this block of code into your prompt.
3638

37-
import CodeExamples from '!!raw-loader!/_includes/code/python/best-practices.python.ai.py';
39+
import CodeExamples from '!!raw-loader!/\_includes/code/python/best-practices.python.ai.py';
3840
import CodeBlock from '@theme/CodeBlock';
3941

4042
<div style={{height: '300px', overflow: 'auto'}}>
4143

42-
<CodeBlock language="python">{CodeExamples}</CodeBlock>
44+
<CodeBlock language="python">{CodeExamples}</CodeBlock>
4345

4446
</div>
4547
<br/>
@@ -105,6 +107,6 @@ If you have any questions or feedback, please let us know by opening an issue on
105107

106108
## Questions and feedback
107109

108-
import DocsFeedback from '/_includes/docs-feedback.mdx';
110+
import DocsFeedback from '/\_includes/docs-feedback.mdx';
109111

110112
<DocsFeedback/>

docs/weaviate/index.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,31 @@ return <CardsSection items={regularItems} className={styles.smallCards} />;
6464
<br />
6565
})()}
6666

67+
## AI-assisted coding
68+
69+
Check out our resources on AI-assisted coding (_Vibe coding_) with Weaviate:
70+
71+
export const vibeCodingCardsData = [
72+
{
73+
id: "new",
74+
title: "Weaviate Docs MCP Server",
75+
description: "Instant access to Weaviate's documentation directly in your AI development environment. ",
76+
link: "/weaviate/mcp/docs-mcp-server",
77+
icon: "fas fa-book",
78+
},
79+
{
80+
id: "academy",
81+
title: "Best practices for coding with AI",
82+
description: "Avoid hallucinations and improve your AI-assisted coding experience.",
83+
link: "/weaviate/best-practices/code-generation",
84+
icon: "fas fa-lightbulb",
85+
},
86+
];
87+
88+
<CardsSection items={vibeCodingCardsData} className={styles.smallCards} />
89+
90+
<br />
91+
6792
## What is Weaviate?
6893

6994
Weaviate is an **open-source vector database** designed to store and index both data objects and their vector embeddings. This architecture enables advanced semantic search capabilities by comparing the meaning encoded in vectors rather than relying solely on keyword matching. Key capabilities include:
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
title: Weaviate Docs MCP Server
3+
sidebar_label: Docs MCP Server
4+
# tags: ["mcp"]
5+
---
6+
7+
import Tabs from "@theme/Tabs";
8+
import TabItem from "@theme/TabItem";
9+
10+
The **Weaviate Docs MCP Server** brings instant access to Weaviate's documentation directly into your AI development environment. Built on the Model Context Protocol (MCP), this server integrates seamlessly with tools like Claude Desktop and Cursor, allowing you to query Weaviate's documentation without leaving your IDE.
11+
12+
The MCP server uses [kapa.ai](https://kapa.ai) (which in turn uses Weaviate under the hood) as its knowledge engine, which powers the search and retrieval of Weaviate documentation. The server offers:
13+
14+
- **Instant documentation access**: Search Weaviate docs without context switching.
15+
- **Multi-source knowledge base**: Queries across docs, tutorials, API references, GitHub issues and community content.
16+
- **Always up-to-date**: Automatically syncs with the latest Weaviate documentation.
17+
18+
## How to setup MCP Server
19+
20+
:::note MCP server URL
21+
22+
**URL**: **https://weaviate-docs.mcp.kapa.ai**
23+
24+
:::
25+
26+
Setup steps vary depending on which AI assistant you're using.
27+
28+
<Tabs groupId="platform">
29+
<TabItem value="cursor" label="Cursor">
30+
Add the following to your `.cursor/mcp.json` file:
31+
32+
```json
33+
{
34+
"mcpServers": {
35+
"weaviate-docs": {
36+
"type": "http",
37+
"url": "https://weaviate-docs.mcp.kapa.ai"
38+
}
39+
}
40+
}
41+
```
42+
43+
</TabItem>
44+
<TabItem value="vsc" label="VS Code">
45+
Prerequisites: VS Code 1.102+ with GitHub Copilot enabled.
46+
47+
Create an `mcp.json` file in your workspace `.vscode` folder:
48+
49+
```json
50+
{
51+
"servers": {
52+
"weaviate-docs": {
53+
"type": "http",
54+
"url": "https://weaviate-docs.mcp.kapa.ai"
55+
}
56+
}
57+
}
58+
```
59+
60+
</TabItem>
61+
<TabItem value="claude_code" label="Claude Code">
62+
Run the following command in your terminal:
63+
```bash
64+
claude mcp add --transport http weaviate-docs https://weaviate-docs.mcp.kapa.ai
65+
```
66+
Then run the `/mcp` command in Claude Code and follow the steps in your browser to authenticate.
67+
68+
For more information, see the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp).
69+
70+
</TabItem>
71+
<TabItem value="chatgpt_desktop" label="ChatGPT Desktop">
72+
ChatGPT Desktop supports MCP servers in developer mode:
73+
74+
1. Open ChatGPT Desktop.
75+
2. Go to **Settings** > **Apps** > **Advanced settings**.
76+
3. Enable **Developer mode**.
77+
4. Navigate to **Settings** > **Connectors**.
78+
5. Click **Create** and enter:
79+
80+
- **Name**: Weaviate Docs
81+
- **URL**: https://weaviate-docs.mcp.kapa.ai
82+
83+
For more information, see the [ChatGPT Desktop MCP documentation](https://platform.openai.com/docs/guides/developer-mode).
84+
85+
</TabItem>
86+
<TabItem value="claude_desktop" label="Claude Desktop">
87+
Claude Desktop supports MCP servers:
88+
89+
1. Open Claude Desktop.
90+
2. Go to **Settings** > **Connectors**.
91+
3. Click **Add custom connector** and enter:
92+
93+
- **Name**: Weaviate Docs
94+
- **URL**: https://weaviate-docs.mcp.kapa.ai
95+
96+
4. Click on **Connect** and follow the steps in your browser to authenticate.
97+
98+
Restart Claude Desktop for changes to take effect.
99+
100+
For more details, see the [Claude Desktop documentation](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp).
101+
102+
</TabItem>
103+
<TabItem value="other" label="Other">
104+
MCP is an open protocol supported by many clients. Use the server URL https://weaviate-docs.mcp.kapa.ai and refer to your client's documentation for setup instructions.
105+
106+
Most clients accept the standard MCP JSON configuration format:
107+
108+
```json
109+
{
110+
"mcpServers": {
111+
"weaviate-docs": {
112+
"url": "https://weaviate-docs.mcp.kapa.ai"
113+
}
114+
}
115+
}
116+
```
117+
118+
</TabItem>
119+
</Tabs>
120+
121+
## Using the MCP Server
122+
123+
Once configured, you can ask context-aware questions about Weaviate from within your editor. For example:
124+
125+
```
126+
"How do I set up a hybrid search in Weaviate?"
127+
128+
"What are the best practices for schema design in Weaviate?"
129+
130+
"Search the Weaviate docs for information about BM25 algorithm"
131+
132+
"What's the difference between vector and keyword search in Weaviate?"
133+
```
134+
135+
## Troubleshooting
136+
137+
<details>
138+
<summary>Server not showing up</summary>
139+
140+
- Check that the file path is correct for your OS
141+
- Restart the app completely
142+
- Ensure the URL is entered correctly
143+
- Verify the config file syntax is valid JSON
144+
145+
</details>
146+
147+
<details>
148+
<summary>Connection errors</summary>
149+
150+
If you see connection errors:
151+
152+
1. Verify the server URL is accessible:
153+
154+
```bash
155+
curl https://weaviate-docs.mcp.kapa.ai
156+
```
157+
158+
2. Check your internet connection
159+
160+
3. Try the MCP Inspector to debug:
161+
```bash
162+
npx @modelcontextprotocol/inspector
163+
```
164+
165+
</details>
166+
167+
<details>
168+
<summary>No results returned</summary>
169+
170+
If queries return empty results:
171+
172+
- Check that your question is relevant to Weaviate documentation
173+
- Try rephrasing your query
174+
- Verify the MCP server is properly configured (test with curl)
175+
176+
</details>
177+
178+
<details>
179+
<summary>Rate limiting</summary>
180+
181+
The public Weaviate MCP server may have rate limits. If you experience issues:
182+
183+
- Wait a few minutes before trying again
184+
185+
</details>
186+
187+
## Further resources
188+
189+
- [Vibe coding - Best practices](../best-practices/code-generation.md)
190+
- [MCP documentation](https://modelcontextprotocol.io)
191+
- [kapa.ai documentation](https://docs.kapa.ai)
192+
193+
## Questions and feedback
194+
195+
import DocsFeedback from "/_includes/docs-feedback.mdx";
196+
197+
<DocsFeedback />

sidebars.js

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ const sidebars = {
4949
},
5050
],
5151
},
52-
{
53-
type: "link",
54-
label: "Concepts & architecture",
55-
href: "https://academy.weaviate.io/courses/wa050-py",
56-
customProps: {
57-
academyOnly: true,
58-
},
59-
},
6052
{
6153
type: "category",
6254
label: "Starter guides",
@@ -101,22 +93,35 @@ const sidebars = {
10193
type: "doc",
10294
id: "weaviate/best-practices/index",
10395
},
104-
items: []
96+
items: [],
10597
},
10698
{
10799
type: "category",
108-
label: "AI-based code generation",
100+
label: "AI-assisted (vibe) coding",
101+
collapsed: true,
109102
link: {
110103
type: "doc",
111104
id: "weaviate/best-practices/code-generation",
112105
},
113-
items: []
106+
items: ["weaviate/mcp/docs-mcp-server"],
107+
},
108+
{
109+
type: "html",
110+
value: "<hr class='sidebar-divider' />",
114111
},
115112
{
116113
type: "link",
117114
label: "Integration ecosystem",
118115
href: "https://weaviate.io/product/integrations",
119-
}
116+
},
117+
{
118+
type: "link",
119+
label: "Concepts & architecture",
120+
href: "https://academy.weaviate.io/courses/wa050-py",
121+
customProps: {
122+
academyOnly: true,
123+
},
124+
},
120125
],
121126
modelProvidersSidebar: [
122127
{
@@ -149,7 +154,7 @@ const sidebars = {
149154
},
150155
items: [
151156
"weaviate/model-providers/weaviate/embeddings",
152-
"weaviate/model-providers/weaviate/embeddings-multimodal"
157+
"weaviate/model-providers/weaviate/embeddings-multimodal",
153158
],
154159
},
155160
{
@@ -422,7 +427,9 @@ const sidebars = {
422427
type: "doc",
423428
id: "weaviate/model-providers/imagebind/index",
424429
},
425-
items: ["weaviate/model-providers/imagebind/embeddings-multimodal"],
430+
items: [
431+
"weaviate/model-providers/imagebind/embeddings-multimodal",
432+
],
426433
},
427434
{
428435
type: "category",
@@ -772,9 +779,7 @@ const sidebars = {
772779
type: "doc",
773780
id: "weaviate/client-libraries/java/index",
774781
},
775-
items: [
776-
"weaviate/client-libraries/java/java-v5",
777-
],
782+
items: ["weaviate/client-libraries/java/java-v5"],
778783
},
779784
{
780785
type: "doc",

src/theme/Root.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export default function Root({ children }) {
6464
"data-modal-footer",
6565
"Powered by Weaviate and kapa.ai"
6666
);
67+
script.setAttribute("data-mcp-enabled", "true");
68+
script.setAttribute("data-mcp-server-url", "weaviate.mcp.kapa.ai");
69+
script.setAttribute("data-mcp-button-text", "Use Docs MCP");
6770
script.async = true;
6871
document.body.appendChild(script);
6972
} else if (!shouldLoadWidget && existingScript) {

0 commit comments

Comments
 (0)