Skip to content

docs(AI): Adds PatternFly MCP documentation.#4857

Open
edonehoo wants to merge 13 commits intopatternfly:mainfrom
edonehoo:iss4844
Open

docs(AI): Adds PatternFly MCP documentation.#4857
edonehoo wants to merge 13 commits intopatternfly:mainfrom
edonehoo:iss4844

Conversation

@edonehoo
Copy link
Copy Markdown
Collaborator

@edonehoo edonehoo commented Nov 10, 2025

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

@patternfly-build
Copy link
Copy Markdown
Collaborator

patternfly-build commented Nov 10, 2025

Preview: https://pf-org--pr-4857-site.surge.sh

@edonehoo edonehoo requested a review from evwilkin November 10, 2025 19:15
Comment on lines +38 to +50
``` {
"mcpServers": {
"patternfly-docs": {
"command": "npx",
"args": [
"-y",
"@patternfly/patternfly-mcp"
],
"description": "PatternFly React development rules and documentation"
}
}
}
```
Copy link
Copy Markdown
Member

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:

Suggested change
``` {
"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.
Copy link
Copy Markdown
Member

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.

Suggested change
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"
Copy link
Copy Markdown
Member

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:

Suggested change
- **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?"
Copy link
Copy Markdown
Member

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:

Suggested change
- **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?"

Copy link
Copy Markdown
Member

@evwilkin evwilkin left a 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": {
Copy link
Copy Markdown
Member

@cdcabrera cdcabrera Nov 11, 2025

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)

Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
Member

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 👍

Copy link
Copy Markdown
Collaborator Author

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

@nicolethoen
Copy link
Copy Markdown
Collaborator

I couldn't get the mcp set up in cursor myself until I added @latest in the configuration args... has anyone else seen that? Should we provide that suggestion for some people? (if it's just me, then ignore this)

@evwilkin
Copy link
Copy Markdown
Member

I couldn't get the mcp set up in cursor myself until I added @latest in the configuration args... has anyone else seen that? Should we provide that suggestion for some people? (if it's just me, then ignore this)

@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 👍

@nicolethoen
Copy link
Copy Markdown
Collaborator

This should be rebased given the nav redesign - and this page should go under AI not PatternFly AI

@edonehoo
Copy link
Copy Markdown
Collaborator Author

edonehoo commented Nov 18, 2025

@evwilkin @nicolethoen I added @latest to the places where I thought it might belong, but lmk if I misinterpreted your comments and need to adjust!

@evwilkin
Copy link
Copy Markdown
Member

@edonehoo following up on this, the tools in the MCP are being finalized in the next week or two and at that point we should be good to update the wording here and move forward - thanks for the patience! 😄

Copy link
Copy Markdown
Member

@cdcabrera cdcabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edonehoo been a bit, some surgical updates

## What does the PatternFly MCP provide?
There are 2 main tools provided by the PatternFly MCP:
- `usePatternFlyDocs`: Used to answer high-level questions about components, design guidelines, and accessibility.
- `fetchDocs`: Used to retrieve the full documentation for a specific component via a URL provided by `usePatternFlyDocs`.
Copy link
Copy Markdown
Member

@cdcabrera cdcabrera Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tools and resources have evolved a bit, just need to update the names and descriptions

possible description

## What does the PatternFly MCP provide? 
The PatternFly MCP provides two primary tools and a set of rich resources:

possible tool descriptions

### Tools
- `searchPatternFlyDocs`: Search for PatternFly components and guidelines. It returns names and URLs that can be used for deep-diving into specific documentation.
- `usePatternFlyDocs`: The primary tool for retrieving content. It fetches full markdown documentation and automatically attaches machine-readable JSON schemas (props, types) for React components.

possible resource description adds (MCP resources help power the MCP tools, can think of them as indexes... we have more than what's below, just a short list)

### Resources
The server exposes an indexed library via the `patternfly://` URI scheme:
- `patternfly://context`: A high-level overview of PatternFly rules and server capabilities.
- `patternfly://schemas/{name}`: Direct access to component property specifications.
- `patternfly://docs/index`: A browsable index of all available documentation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edonehoo you may have overlooked this, i put 3 updates in the comment... the MCP tools have been renamed and restructured for different behavior

  • usePatternFlyDocs is now about retrieving content
  • fetchDocs doesn't exist
### Tools
- `searchPatternFlyDocs`: Search for PatternFly components and guidelines. It returns names and URLs that can be used for deep-diving into specific documentation.
- `usePatternFlyDocs`: The primary tool for retrieving content. It fetches full markdown documentation and automatically attaches machine-readable JSON schemas (props, types) for React components.

### Verifying installation
- **Prompt:** "Can you see the PF MCP running? If so, what are the tools?"
- **Expected AI behavior:** The assistant will confirm it sees the PatternFly MCP and list the available tools: mcp_patternfly-mcp_usePatternFlyDocs and mcp_patternfly-mcp_fetchDocs.
- **Response:** Yes, the PatternFly MCP is running successfully. There are 2 available tools for you to use: `mcp_patternfly-mcp_usePatternFlyDocs` and `mcp_patternfly-mcp_fetchDocs`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we should try to vouch for how the IDE/tooling prefixes the tools with the mcp_patternfly-mcp_, could just be Cursor/whatever, but I could also see that varying by MCP client. The actual tool names are shorter...

Possible alt

### Verifying installation
- **Prompt:** "Can you see the PatternFly MCP running? If so, what are the tools?"
- **Expected AI behavior:** The assistant will confirm it sees the PatternFly MCP and list the available tools: `searchPatternFlyDocs` and `usePatternFlyDocs`.
- **Response:** Yes, the PatternFly MCP is running successfully. There are 2 available tools: `searchPatternFlyDocs` and `usePatternFlyDocs`.

### Fetching specific documentation
- **Prompt:** "Fetch docs for a PatternFly card"
- **Expected AI behavior:** This will trigger the `fetchDocs` tool. The assistant will return a detailed, organized summary of the card component's documentation, including design guidelines (elements, usage, variations), accessibility guidelines (key requirements, React props), and more.
- **Response:** “Here’s the current PatternFly card documentation, including the general design guidelines and key accessibility requirements: [documentation summary]“
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So these days we now include "versions" in the output, also we allow a version filter to be applied through the MCP tools (in the future we'll be expanding that filtering). A default version gets applied typically "latest" or v6... these responses just need to be updated... may need to double check

### Fetching specific documentation
- **Prompt:** "Fetch docs for a PatternFly card"
- **Expected AI behavior:**  This will trigger the `usePatternFlyDocs` tool. The assistant will return a detailed, organized summary of the card component's documentation from the v6 library, including design guidelines (elements, usage, variations), accessibility guidelines (key requirements, React props), and machine-readable schemas.
- **Response:** “Here’s the PatternFly v6 card documentation, including the general design guidelines and key accessibility requirements: [documentation summary]“

@edonehoo
Copy link
Copy Markdown
Collaborator Author

ty @cdcabrera ! I made those updates, but we can keep refining as needed

Copy link
Copy Markdown
Member

@cdcabrera cdcabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MCP tools are the primary thing that need to be updated

## What does the PatternFly MCP provide?
There are 2 main tools provided by the PatternFly MCP:
- `usePatternFlyDocs`: Used to answer high-level questions about components, design guidelines, and accessibility.
- `fetchDocs`: Used to retrieve the full documentation for a specific component via a URL provided by `usePatternFlyDocs`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edonehoo you may have overlooked this, i put 3 updates in the comment... the MCP tools have been renamed and restructured for different behavior

  • usePatternFlyDocs is now about retrieving content
  • fetchDocs doesn't exist
### Tools
- `searchPatternFlyDocs`: Search for PatternFly components and guidelines. It returns names and URLs that can be used for deep-diving into specific documentation.
- `usePatternFlyDocs`: The primary tool for retrieving content. It fetches full markdown documentation and automatically attaches machine-readable JSON schemas (props, types) for React components.

"command": "npx",
"args": [
"-y",
"@patternfly/patternfly-mcp@latest",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the trailing comma may actually bust the JSON here

"@patternfly/patternfly-mcp@latest"


### Get design guidance
- **Prompt:** "Which PatternFly components should I use if we want a user to be able to select several different cards from a gallery view?"
- **Expected AI behavior:** This will trigger the `usePatternFlyDocs tool`. The AI assistant will analyze your request and provide a recommendation based on PatternFly's design guidelines, likely suggesting the use of selectable cards and noting that multi-select is achieved using cards with checkboxes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we should update the "expected ai behavior" on line 94

// from this
This will trigger the `usePatternFlyDocs tool`. The..
// to this
This will trigger the `searchPatternFlyDocs` tool

- `usePatternFlyDocs`: Used to answer high-level questions about components, design guidelines, and accessibility.
- `fetchDocs`: Used to retrieve the full documentation for a specific component via a URL provided by `usePatternFlyDocs`.

To help power `usePatternFlyDocs` and `fetchDocs`, the MCP provides the following additional resources as an indexed library via the `patternfly://` URI scheme:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we have the old tool references here too

maybe

// from
To help power `usePatternFlyDocs` and `fetchDocs`
// to
To help power `searchPatternFlyDocs` and `usePatternFlyDocs`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PF MCP - add overview documentation to the website

5 participants