Skip to content

Commit b8b1756

Browse files
Option to read hosted files via --docs-host flag (patternfly#3)
1 parent ba61c85 commit b8b1756

File tree

10 files changed

+403
-93
lines changed

10 files changed

+403
-93
lines changed

README.md

Lines changed: 17 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -72,37 +72,18 @@ The MCP server communicates over stdio and provides access to PatternFly documen
7272

7373
### Available Tools
7474

75-
#### `list_documentation`
76-
Lists available PatternFly documentation categories and files.
75+
#### `usePatternFlyDocs`
76+
Provides a list of URLs to `llms.txt` files that should be chosen to read for a particular context. These `llms.txt` files contain
77+
a list of URLs to be read by the following `fetchDocs` tool.
7778

7879
**Parameters:**
79-
- `path` (string, optional): Specific directory path to list (relative to documentation)
80+
- `urlList` (array of strings, required): Specific directory path to list (relative to the `llms-files` directory)
8081

81-
#### `get_documentation`
82-
Retrieves the full content of a specific PatternFly documentation file.
82+
#### `fetchDocs`
83+
Retrieves the full content of a specific PatternFly `llms.txt` files.
8384

8485
**Parameters:**
85-
- `file_path` (string, required): Path to the documentation file (relative to documentation)
86-
87-
#### `search_documentation`
88-
Searches for specific text across all PatternFly documentation files.
89-
90-
**Parameters:**
91-
- `query` (string, required): Text to search for in the documentation
92-
- `case_sensitive` (boolean, optional): Whether the search should be case sensitive (default: false)
93-
94-
#### `get_quick_rules`
95-
Gets essential PatternFly development rules and guidelines for specific categories.
96-
97-
**Parameters:**
98-
- `category` (string, optional): Specific category of rules (charts, chatbot, component-groups, components, guidelines, resources, setup, troubleshooting). If not provided, returns overview of all categories.
99-
100-
#### `get_all_standards`
101-
Gets comprehensive PatternFly standards and guidelines from all documentation in a single response.
102-
103-
**Parameters:**
104-
- `include_examples` (boolean, optional): Whether to include code examples and detailed explanations (default: true)
105-
- `sections` (array, optional): Specific sections to include (charts, chatbot, component-groups, components, guidelines, resources, setup, troubleshooting). If not provided, includes all sections.
86+
- `urls` (array of strings, required): Path to the documentation file (relative to documentation)
10687

10788
### Example Client Integration
10889

@@ -114,7 +95,7 @@ Example configuration for MCP clients using npx (see `mcp-config-example.json`):
11495
"mcpServers": {
11596
"patternfly-docs": {
11697
"command": "npx",
117-
"args": ["-y", "@jephilli-patternfly-docs/mcp@latest"]
98+
"args": ["-y", "@jephilli-patternfly-docs/mcp@latest"],
11899
"description": "PatternFly React development rules and documentation"
119100
}
120101
}
@@ -135,63 +116,20 @@ For local development (without npx):
135116
}
136117
```
137118

138-
## Project Structure
119+
### Example test commands using the inspector-cli:
139120

121+
#### usePatternFlyDocs
140122
```
141-
patternfly-mcp/
142-
├── documentation/ # PatternFly development rules and guidelines
143-
├── src/
144-
│ └── index.ts # Main server implementation
145-
├── dist/ # Compiled JavaScript (after build)
146-
├── package.json # Project dependencies and scripts
147-
├── tsconfig.json # TypeScript configuration
148-
├── mcp-config-example.json # Example MCP client configuration
149-
├── .gitignore # Git ignore patterns
150-
└── README.md # This file
123+
npx @modelcontextprotocol/inspector-cli --config /Users/jeffreyphillips/.cursor/mcp.json --server patternfly-mcp-server --cli --method tools/call --tool-name usePatternFlyDocs --tool-arg urlList='["/Users/jeffreyphillips/repositories/patternfly-mcp/documentation/chatbot/README.md"]'
151124
```
152125

153-
## Documentation Structure
126+
#### fetchDocs
127+
```
128+
npx @modelcontextprotocol/inspector-cli --config /Users/jeffreyphillips/.cursor/mcp.json --server patternfly-mcp-server --cli --method tools/call --tool-name fetchDocs --tool-arg urls='["https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/design-guidelines/components/about-modal/about-modal.md", "https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/accessibility/components/about-modal/about-modal.md"]'
129+
```
154130

155-
The server provides access to the PatternFly documentation located in `documentation/`:
156-
157-
- **charts/** - PatternFly Charts implementation rules
158-
- **chatbot/** - PatternFly Chatbot component rules
159-
- **component-groups/** - Component grouping and organization patterns
160-
- **components/** - Component-specific usage rules and best practices
161-
- **guidelines/** - Core development principles and standards
162-
- **resources/** - External links and local documentation references
163-
- **setup/** - Project initialization and environment setup rules
164-
- **troubleshooting/** - Common issues and solutions
165-
166-
## Example Usage
167-
168-
### Browse Available Documentation
169-
Use `list_documentation` to see what's available:
170-
- List root categories: `list_documentation` (no parameters)
171-
- List specific directory: `list_documentation` with `path: "guidelines"`
172-
173-
### Get Specific Rules
174-
Use `get_documentation` to retrieve specific files:
175-
- Get setup rules: `get_documentation` with `file_path: "setup/README.md"`
176-
- Get styling standards: `get_documentation` with `file_path: "guidelines/styling-standards.md"`
177-
- Get component groups rules: `get_documentation` with `file_path: "component-groups/README.md"`
178-
- Get external links: `get_documentation` with `file_path: "resources/external-links.md"`
179-
180-
### Search for Specific Information
181-
Use `search_documentation` to find relevant rules:
182-
- Find all references to "v6": `search_documentation` with `query: "v6"`
183-
- Search for accessibility rules: `search_documentation` with `query: "accessibility"`
184-
### Quick Access to Essential Rules
185-
Use `get_quick_rules` for common categories:
186-
- Overview of all rules: `get_quick_rules` (no parameters)
187-
- Specific category: `get_quick_rules` with `category: "components"`
188-
189-
### Comprehensive Standards Access
190-
Use `get_all_standards` to get all PatternFly standards in one response:
191-
- All standards with examples: `get_all_standards` (no parameters)
192-
- All standards without code examples: `get_all_standards` with `include_examples: false`
193-
- Only specific sections: `get_all_standards` with `sections: ["components", "guidelines"]`
194-
- Component groups and charts only: `get_all_standards` with `sections: ["component-groups", "charts"]`
131+
## Documentation Structure
132+
TBD
195133

196134
## Publishing
197135

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @patternfly/component-groups 6.0.0
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# @patternfly/patternfly 6.0.0
2+
3+
## About PatternFly
4+
[About PatternFly](https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/get-started/about-patternfly.md): <classification>LLM should read this page when assisting with understanding what PatternFly is, why to use it, who should use it, and where to start.</classification>
5+
[Design with PatternFly](https://github.com/patternfly/patternfly-org/blob/main/packages/documentation-site/patternfly-docs/content/get-started/design-with-figma.md): <classification>LLM should read this page when assisting with how to design using PatternFly</classification>
6+
[Develop with PatternFly](https://github.com/patternfly/patternfly-org/blob/main/packages/documentation-site/patternfly-docs/content/get-started/develop.md): <classification>LLM should read this page when assisting with how to get started developing with PatternFly. It describes the design system and token system and includes information about the PatternFly React libraries used to build interfaces with consistent markup, styling and behavior.</classification>
7+
8+
## Migration
9+
[Migrating to v6: Upgrade guid](https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/get-started/upgrade.md): <classification>LLM should read this page when assisting with migrating a project from PatternFly React version 5 to version 6. It is useful for guiding updates to dependencies, package names, React and TypeScript versions, styling solutions, and running codemods to handle breaking changes. This document is essential for ensuring compatibility with React 18, adopting the new Emotion styling engine, and addressing key migration steps and potential issues.</classification>
10+
11+
## Design Foundations
12+
13+
[Colors](https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/design-guidelines/styles/colors/colors.md): <classification>LLM should read this page when assisting with choosing colors using PatternFly's color palette</classification>
14+
[Icons](https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/design-guidelines/styles/icons/icons.md): <classification>LLM should read this page when assisting with choosing colors using PatternFly's color palette</classification>
15+
[Motion](): <classification></classification>
16+
[Typography](): <classification></classification>
17+
[Usage and behaviour](): <classification></classification>
18+
19+
## Tokens
20+
[About tokens](): <classification></classification>
21+
[All PatternFly Tokens](): <classification></classification>
22+
[Design with tokens](): <classification></classification>
23+
[Develop with tokens](): <classification></classification>
24+
25+
## PatternFly AI
26+
27+
## Accessibility
28+
29+
## UX writing
30+
31+
## Patterns
32+
33+
## Utility classes
34+
35+
## Developer Resources
36+
37+
## Training
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# @patternfly/react-charts 6.0.0
2+
3+
## About Charts
4+
[About PatternFly](https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/get-started/about-patternfly.md): <classification>LLM should read this page when assisting with understanding what PatternFly is, why to use it, who should use it, and where to start.</classification>
5+
[Design with PatternFly](https://github.com/patternfly/patternfly-org/blob/main/packages/documentation-site/patternfly-docs/content/get-started/design-with-figma.md): <classification>LLM should read this page when assisting with how to design using PatternFly</classification>
6+
[Develop with PatternFly](https://github.com/patternfly/patternfly-org/blob/main/packages/documentation-site/patternfly-docs/content/get-started/develop.md): <classification>LLM should read this page when assisting with how to get started developing with PatternFly. It describes the design system and token system and includes information about the PatternFly React libraries used to build interfaces with consistent markup, styling and behavior.</classification>
7+
8+
## Colors for Charts
9+
[Migrating to v6: Upgrade guid](https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/get-started/upgrade.md): <classification>LLM should read this page when assisting with migrating a project from PatternFly React version 5 to version 6. It is useful for guiding updates to dependencies, package names, React and TypeScript versions, styling solutions, and running codemods to handle breaking changes. This document is essential for ensuring compatibility with React 18, adopting the new Emotion styling engine, and addressing key migration steps and potential issues.</classification>
10+
11+
## Charts
12+
[Area Chart](https://raw.githubusercontent.com/patternfly/patternfly-react/refs/heads/main/packages/react-charts/src/charts/area-chart/area-chart.md): <classification>LLM should read this page when assisting with choosing colors using PatternFly's color palette</classification>
13+
[Icons](https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/design-guidelines/styles/icons/icons.md): <classification>LLM should read this page when assisting with choosing colors using PatternFly's color palette</classification>
14+
[Motion](): <classification></classification>
15+
[Typography](): <classification></classification>
16+
[Usage and behaviour](): <classification></classification>
17+
18+
## Tokens
19+
[About tokens](): <classification></classification>
20+
[All PatternFly Tokens](): <classification></classification>
21+
[Design with tokens](): <classification></classification>
22+
[Develop with tokens](): <classification></classification>
23+
24+
## PatternFly AI
25+
26+
## Accessibility
27+
28+
## UX writing
29+
30+
## Patterns
31+
32+
## Utility classes
33+
34+
## Developer Resources
35+
36+
## Training

0 commit comments

Comments
 (0)