Skip to content

Commit a0de177

Browse files
SebastianKuehnausujoykdrolfsmeds
authored
Mcp intro (#4711)
* Add configuration guides for Vaadin MCP server integration with popular AI tools: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Junie, Windsurf, and others. * Add configuration guides for Vaadin MCP server integration with popular AI tools: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Junie, Windsurf, and others. * Add JetBrains IDE support for GitHub Copilot with Vaadin MCP server * fix: add documentation for using chartoptions to set language translations (#4691) * fix: add documentation for using chartoptions to set language translations for charts * fix: update language according to suggestion Co-authored-by: Rolf Smeds <[email protected]> * fix: update language according to suggestion Co-authored-by: Rolf Smeds <[email protected]> --------- Co-authored-by: Rolf Smeds <[email protected]> * Add configuration guides for Vaadin MCP server integration with popular AI tools: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Junie, Windsurf, and others. * Add JetBrains IDE support for GitHub Copilot with Vaadin MCP server * Expand AI vocabulary and refine MCP documentation. * Add "Streamable" to accept list and fix broken formatted links in MCP documentation * Update hyperlink in Vaadin documentation reference * Simplify wording, fix capitalization, and standardize phrasing across MCP-related documentation. * Refine phrasing in MCP tool guides for clarity and consistency; add SSE abbreviation. --------- Co-authored-by: sujoykd <[email protected]> Co-authored-by: Rolf Smeds <[email protected]>
1 parent 693a990 commit a0de177

File tree

14 files changed

+834
-860
lines changed

14 files changed

+834
-860
lines changed

.github/styles/Vaadin/Abbr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ exceptions:
6666
- JVM
6767
- JWT
6868
- LLM
69+
- MCP
6970
- MDN
7071
- MFA
7172
- MIME
@@ -93,13 +94,15 @@ exceptions:
9394
- SPA
9495
- SPI
9596
- SQL
97+
- SSE
9698
- SSH
9799
- SSL
98100
- SSO
99101
- SVG
100102
- TCP
101103
- TEST
102104
- TLS
105+
- TOML
103106
- TSX
104107
- TXT
105108
- REST

.github/styles/config/vocabularies/Docs/accept.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[aA]ccessors?
22
[aA]ddon
33
[aA]ffordance
4+
[aA]gentic
45
allowlist
6+
Anthropic
57
[aA]ntialias
68
[aA]ppender
79
[aA]utosave
@@ -25,6 +27,7 @@ bun
2527
[cC]acheable
2628
[cC]hatbot
2729
classpath
30+
Codeium
2831
[cC]onfig(|uration|ure|urer|urator|map)
2932
[cC]onformant
3033
[cC]ontainer-less
@@ -101,6 +104,7 @@ JServ
101104
jsoup
102105
jQuery
103106
JSpecify
107+
Junie
104108
JUnit
105109
Karaf
106110
Keycloak
@@ -188,6 +192,7 @@ Spring Initializr
188192
[sS]ubcomponents?
189193
[sS]uperset
190194
[sS]upertype
195+
[sS]treamable
191196
[sS]tylable
192197
[tT]ablespace(s)?
193198
Telepresence
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: MCP Server
3+
page-title: Model Context Protocol Server for Vaadin
4+
description: Learn how to integrate AI assistants with Vaadin documentation using the Model Context Protocol.
5+
meta-description: Search Vaadin documentation, get the full documentation, and get version information. Designed for AI agents.
6+
order: 70
7+
---
8+
= Model Context Protocol (MCP)
9+
10+
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely integrate with external data sources and tools. Vaadin provides an MCP server that gives AI assistants direct access to comprehensive Vaadin documentation.
11+
12+
== What Is MCP?
13+
14+
Model Context Protocol allows AI development tools like Claude Code, Cursor, GitHub Copilot, and others to access structured information from external sources. This enables AI assistants to provide accurate, context-aware responses based on current Vaadin documentation.
15+
16+
The Vaadin MCP server provides:
17+
18+
* Semantic search across Vaadin documentation
19+
* Full document retrieval for complete context
20+
* Component version information and API references
21+
* Component-specific API documentation (Java, React, Web Components)
22+
* Component styling and theming information
23+
* Support for both Java and React applications
24+
* Current Vaadin version information
25+
* Vaadin development primer with best practices
26+
27+
== Getting Started
28+
29+
To use the Vaadin MCP server with your AI development tool, follow these steps:
30+
31+
. Choose your AI development tool from the <<{articles}/building-apps/mcp/supported-tools/# ,supported tools list>>
32+
. Follow the configuration instructions for your specific tool
33+
. Restart your tool to load the MCP server
34+
. Start asking questions about Vaadin development
35+
36+
The MCP server automatically provides your AI assistant with access to up-to-date Vaadin documentation.
37+
38+
== Supported Tools
39+
40+
The Vaadin MCP server is compatible with various AI development tools. Each tool has different configuration requirements and transport support.
41+
42+
See the <<{articles}/building-apps/mcp/supported-tools/# ,MCP Setup Guide>> for detailed configuration instructions for:
43+
44+
* <<supported-tools/claude-code# ,Claude Code>>
45+
* <<supported-tools/cursor# ,Cursor>>
46+
* <<supported-tools/windsurf# ,Windsurf>>
47+
* <<supported-tools/junie# ,Junie (JetBrains)>>
48+
* <<supported-tools/github-copilot# ,GitHub Copilot (VS Code & JetBrains IDEs)>>
49+
* <<supported-tools/codex# ,Codex (OpenAI)>>
50+
* <<supported-tools/gemini-cli# ,Gemini CLI (Google)>>
51+
* <<supported-tools/other-tools# ,Other MCP-compatible clients>>
52+
53+
== Transport Types
54+
55+
[IMPORTANT]
56+
====
57+
The Vaadin MCP server uses *HTTP transport (streamable-http)*. This is natively supported by Claude Code, Cursor, Windsurf, GitHub Copilot (VS Code and JetBrains IDEs), Codex, and Gemini CLI.
58+
59+
For stdio-only tools like Junie, you can use https://github.com/pyroprompts/mcp-stdio-to-streamable-http-adapter[@pyroprompts/mcp-stdio-to-streamable-http-adapter] as a bridge between the two transport types.
60+
====
61+
62+
== Resources
63+
64+
=== GitHub Repository
65+
66+
View source code, report issues, and contribute to the project.
67+
68+
https://github.com/vaadin/vaadin-mcp
69+
70+
=== Model Context Protocol
71+
72+
Learn more about the Model Context Protocol standard.
73+
74+
https://modelcontextprotocol.io
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Claude Code
3+
page-title: Configure Claude Code to Use Vaadin MCP Server
4+
description: Learn how to configure Claude Code to access Vaadin documentation through the Model Context Protocol server
5+
meta-description: Setup instructions for connecting Claude Code to the Vaadin MCP server. Enable your AI assistant with comprehensive Vaadin documentation access.
6+
order: 10
7+
---
8+
9+
10+
= Claude Code
11+
12+
Claude Code is Anthropic's official CLI tool for agentic coding. It provides native support for HTTP-based MCP servers, making it straightforward to connect to the Vaadin MCP server.
13+
14+
*Requirements:* Claude Code 0.4.0 or later
15+
16+
== Configuration
17+
18+
Add the following to your `~/.config/claude/claude_desktop_config.json`:
19+
20+
[source,json]
21+
----
22+
{
23+
"mcpServers": {
24+
"vaadin": {
25+
"url": "https://mcp.vaadin.com/docs"
26+
}
27+
}
28+
}
29+
----
30+
31+
After configuration, restart Claude Code to load the MCP server.
32+
33+
[TIP]
34+
====
35+
You can add multiple MCP servers to the configuration file. Each server should have a unique name in the `mcpServers` object.
36+
====
37+
38+
== Verify the Setup
39+
40+
After restarting Claude Code:
41+
42+
. Start a new conversation
43+
. Ask a question about Vaadin development (e.g., "How to create a Button in Vaadin?")
44+
. Claude Code automatically uses the Vaadin MCP server to fetch relevant documentation
45+
46+
You can verify that the MCP server is connected by checking the status indicators in Claude Code's interface.
47+
48+
== Resources
49+
50+
* https://docs.claude.ai/docs/build-with-claude/claude-code[Claude Code Documentation]
51+
* https://github.com/vaadin/vaadin-mcp[Vaadin MCP Server Repository]
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: Codex
3+
page-title: Configure OpenAI Codex to Use Vaadin MCP Server
4+
description: Learn how to configure OpenAI Codex to access Vaadin documentation through the Model Context Protocol server
5+
meta-description: Setup instructions for connecting OpenAI Codex to the Vaadin MCP server. Enable AI code generation with Vaadin documentation access.
6+
order: 60
7+
---
8+
9+
10+
= Codex
11+
12+
OpenAI Codex provides native support for HTTP-based MCP servers, making it straightforward to integrate with the Vaadin MCP server for enhanced code generation capabilities.
13+
14+
*Requirements:* Codex CLI version 0.43 or later
15+
16+
== Configuration
17+
18+
Add the following to `~/.codex/config.toml`:
19+
20+
[source,toml]
21+
----
22+
[mcp_servers.vaadin]
23+
url = "https://mcp.vaadin.com/docs"
24+
----
25+
26+
After configuration, restart Codex to load the new MCP server.
27+
28+
[NOTE]
29+
====
30+
If you see "missing field command" errors, upgrade Codex with:
31+
[source,bash]
32+
----
33+
npm install -g @openai/codex@latest
34+
----
35+
====
36+
37+
== Configuration File Format
38+
39+
The Codex configuration uses TOML format:
40+
41+
* Each MCP server is defined under `[mcp_servers.name]`
42+
* The `url` field points to the HTTP endpoint
43+
* Multiple servers can be configured by adding additional sections
44+
45+
Example with multiple servers:
46+
47+
[source,toml]
48+
----
49+
[mcp_servers.vaadin]
50+
url = "https://mcp.vaadin.com/docs"
51+
52+
[mcp_servers.other_server]
53+
url = "https://example.com/mcp"
54+
----
55+
56+
== Verify the Setup
57+
58+
After restarting Codex:
59+
60+
. Start a new coding session
61+
. Ask Codex about Vaadin development (e.g., "Generate a Vaadin login form")
62+
. Codex queries the Vaadin MCP server to access relevant documentation
63+
. Generated code is based on current Vaadin best practices
64+
65+
You can verify active MCP servers by running:
66+
67+
[source,bash]
68+
----
69+
codex config list
70+
----
71+
72+
== Resources
73+
74+
* https://developers.openai.com/codex/mcp/[Codex MCP Documentation]
75+
* https://github.com/openai/codex[Codex GitHub Repository]
76+
* https://github.com/vaadin/vaadin-mcp[Vaadin MCP Server Repository]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Cursor
3+
page-title: Configure Cursor to Use Vaadin MCP Server
4+
description: Learn how to configure Cursor editor to access Vaadin documentation through the Model Context Protocol server
5+
meta-description: Setup instructions for connecting Cursor to the Vaadin MCP server. Enable AI-powered coding with comprehensive Vaadin documentation access.
6+
order: 20
7+
---
8+
9+
10+
= Cursor
11+
12+
Cursor is an AI-powered code editor with native HTTP MCP support, making it easy to integrate with the Vaadin MCP server for enhanced documentation access.
13+
14+
== Configuration
15+
16+
. Open Cursor Settings
17+
. Navigate to *Features* → *Beta* → *Model Context Protocol*
18+
. Enable MCP support
19+
. Add the server configuration to `~/.cursor/mcp.json`:
20+
21+
[source,json]
22+
----
23+
{
24+
"mcpServers": {
25+
"vaadin": {
26+
"url": "https://mcp.vaadin.com/docs"
27+
}
28+
}
29+
}
30+
----
31+
32+
After adding the configuration, restart Cursor to load the MCP server.
33+
34+
[NOTE]
35+
====
36+
The MCP configuration file location may vary depending on your operating system:
37+
38+
* *macOS:* `~/.cursor/mcp.json`
39+
* *Linux:* `~/.cursor/mcp.json`
40+
* *Windows:* `%USERPROFILE%\.cursor\mcp.json`
41+
====
42+
43+
== Verify the Setup
44+
45+
After restarting Cursor:
46+
47+
. Open the AI chat panel
48+
. Ask a question about Vaadin development (e.g., "Show how to create a form in Vaadin")
49+
. Cursor automatically queries the Vaadin MCP server for relevant documentation
50+
51+
== Resources
52+
53+
* https://docs.cursor.com/context/model-context-protocol[Cursor MCP Documentation]
54+
* https://github.com/vaadin/vaadin-mcp[Vaadin MCP Server Repository]
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Gemini CLI
3+
page-title: Configure Google Gemini CLI to Use Vaadin MCP Server
4+
description: Learn how to configure Google Gemini CLI to access Vaadin documentation through the Model Context Protocol server
5+
meta-description: Setup instructions for connecting Google Gemini CLI to the Vaadin MCP server. Enable Gemini AI with comprehensive Vaadin documentation access.
6+
order: 70
7+
---
8+
9+
10+
= Gemini CLI
11+
12+
Google Gemini CLI provides native HTTP MCP support, allowing direct integration with the Vaadin MCP server for enhanced AI-assisted development.
13+
14+
== Configuration
15+
16+
Add the following to `~/.gemini/settings.json`:
17+
18+
[source,json]
19+
----
20+
{
21+
"mcpServers": {
22+
"vaadin": {
23+
"httpUrl": "https://mcp.vaadin.com/docs"
24+
}
25+
}
26+
}
27+
----
28+
29+
After configuration, restart Gemini CLI to load the MCP server.
30+
31+
[NOTE]
32+
====
33+
Gemini CLI automatically invokes Vaadin tools when you ask questions about Vaadin development (e.g., "What is a TestBench UI unit test?").
34+
====
35+
36+
== Configuration File Location
37+
38+
The configuration file location varies by operating system:
39+
40+
* *macOS:* `~/.gemini/settings.json`
41+
* *Linux:* `~/.gemini/settings.json`
42+
* *Windows:* `%USERPROFILE%\.gemini\settings.json`
43+
44+
If the directory doesn't exist, create it before adding the configuration file.
45+
46+
== Automatic Tool Invocation
47+
48+
Gemini CLI features intelligent tool selection:
49+
50+
* When you ask Vaadin-related questions, it automatically queries the Vaadin MCP server
51+
* No manual tool invocation required
52+
* The assistant determines when documentation lookup would be helpful
53+
* Responses are grounded in current Vaadin documentation
54+
55+
== Verify the Setup
56+
57+
After restarting Gemini CLI:
58+
59+
. Start a new conversation
60+
. Ask a Vaadin-specific question (e.g., "How to implement data binding in Vaadin?")
61+
. Observe the tool invocation in the response
62+
. Gemini fetches relevant documentation from the Vaadin MCP server
63+
64+
You can also explicitly request documentation by asking "What does the Vaadin documentation say about...?"
65+
66+
== Resources
67+
68+
* https://github.com/google-gemini/gemini-cli[Gemini CLI GitHub Repository]
69+
* https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md[Gemini CLI MCP Documentation]
70+
* https://github.com/vaadin/vaadin-mcp[Vaadin MCP Server Repository]

0 commit comments

Comments
 (0)