-
Notifications
You must be signed in to change notification settings - Fork 144
docs(AI): Adds PatternFly MCP documentation. #4857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| ``` { | ||
| "mcpServers": { | ||
| "patternfly-docs": { | ||
| "command": "npx", | ||
| "args": [ | ||
| "-y", | ||
| "@patternfly/patternfly-mcp" | ||
| ], | ||
| "description": "PatternFly React development rules and documentation" | ||
| } | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the very opening { got cut off and the indentation got a little thrown off following that:
| ``` { | |
| "mcpServers": { | |
| "patternfly-docs": { | |
| "command": "npx", | |
| "args": [ | |
| "-y", | |
| "@patternfly/patternfly-mcp" | |
| ], | |
| "description": "PatternFly React development rules and documentation" | |
| } | |
| } | |
| } | |
| ``` | |
| ``` | |
| { | |
| "mcpServers": { | |
| "patternfly-docs": { | |
| "command": "npx", | |
| "args": [ | |
| "-y", | |
| "@patternfly/patternfly-mcp" | |
| ], | |
| "description": "PatternFly React development rules and documentation" | |
| } | |
| } | |
| } | |
| ``` |
| For full technical documentation, setup instructions, and to contribute, visit our [PatternFly MCP GitHub Repository](https://github.com/patternfly/patternfly-mcp). | ||
|
|
||
| ## What is the PatternFly MCP? | ||
| The **PatternFly MCP** is a new tool designed to integrate our design guidelines, component documentation, and accessibility best practices directly into your AI-powered development environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing "new" in our docs immediately makes me think we're building in tech debt as this becomes dated.
| The **PatternFly MCP** is a new tool designed to integrate our design guidelines, component documentation, and accessibility best practices directly into your AI-powered development environment. | |
| The **PatternFly MCP** is a tool designed to integrate our design guidelines, component documentation, and accessibility best practices directly into your AI-powered development environment. |
| - **Response:** Yes, the PatternFly MCP is running successfully. There are 2 available tools for you to use: `mcp_patternfly-docs_usePatternFlyDocs` and `mcp_patternfly-docs_fetchDocs`. | ||
|
|
||
| ### Fetching specific documentation | ||
| - **Prompt:** "Yes, fetch docs for card" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was copy/pasted as a direct follow-up to the output from the "verifying installation" prompt above, but we've reframed these here as unrelated sample prompts so I'd suggest rewording this as an independent prompt:
| - **Prompt:** "Yes, fetch docs for card" | |
| - **Prompt:** "Fetch docs for PatternFly card" |
| - **Response:** “Here’s the current PatternFly card documentation, including the general design guidelines and key accessibility requirements: [documentation summary]“ | ||
|
|
||
| ### Get design guidance | ||
| - **Prompt:** "Which components should I use if we want a user to be able to select several different cards from a gallery view?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User feedback indicated that the PF MCP isn't always used (the AI tool has to make that decision) so tweaking the prompt from those results to explicitly call out PatternFly could lead to more consistent results:
| - **Prompt:** "Which components should I use if we want a user to be able to select several different cards from a gallery view?" | |
| - **Prompt:** "Which PatternFly components should I use if we want a user to be able to select several different cards from a gallery view?" |
evwilkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few small tweaks to help adopt this from our testing overview to our official docs.
One thing potentially missing here is that we're focusing on direct communication with the MCP in all examples - asking it a question and getting an answer to that question. I'd suspect the more common use case is having this work in the background as an always-on reference that's incorporated into existing workflows. For example, a designer vibe coding a design or interactive POC, or developer building/enhancing a product codebase, that automatically pulls in the correct components, props, accessibility considerations, etc. without them needing to specifically ask what that is but just for the agent to be aware of & use that information.
I originally tried to hint at this with the below statement, but not sure how to more clearly indicate the power of the MCP as the magic behind the curtain rather than just a chatbot-style interaction
Here are a few sample prompts to get you started, but the MCP tools are available for reference by your AI agent across all applicable use cases (code generation, design review, etc.):
|
|
||
| ``` { | ||
| "mcpServers": { | ||
| "patternfly-docs": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a minor thing, can't tell if its on purpose and technically everything functions, but we flip between naming the server setup patternfly-docs for Cursor vs patternfly-mcp for Claude... we may want to be consistent... this would cause a few more updates throughout the pr if we flip to just patternfly-mcpvs flipping to patternfly-docs for everything
(the pf-mcp readme references patternfly-docs but dependent on the direction we take here we can always make sure that aligns after-the-fact)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evwilkin do we want to go with one or the other? or still deciding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edonehoo @cdcabrera I vote we stick with patternfly-mcp to match the name of the repo and the NPM package shipped that's referenced in the code just below these lines @patternfly/patternfly-mcp.
I think the consistency in name could remove one possible source of confusion 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good! I just updated it in my last commit, but lmk if anything looks off
|
I couldn't get the mcp set up in cursor myself until I added |
@nicolethoen it looks like I was hitting an error with @latest due to a caching issue, clearing my npm cache and trying again with @latest worked just fine 👍 |
|
This should be rebased given the nav redesign - and this page should go under |
|
@evwilkin @nicolethoen I added |
Closes #4844
This PR adds a new page to patternfly.org in the PatternFly AI section explaining & overviewing the PatternFly MCP.
Preview: https://pf-org--pr-4857-site.surge.sh/patternfly-ai/patternfly-mcp