Skip to content

Commit d8ac4fd

Browse files
committed
docs: troubleshooting steps, rename examples
* docs, troubleshooting steps, rename mcp server examples * github, refine issue templates
1 parent 70c9470 commit d8ac4fd

8 files changed

Lines changed: 112 additions & 28 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
### Assumptions and questions, context, version information
1212
<!-- Please do not post sensitive information, we are not liable. -->
1313
<!-- Append a sanitized log/demo/screenshot/animated GIF of the problem. -->
14-
<!-- Package.json version, tag, or git commit information. -->
14+
<!-- PatternFly MCP version, Node.js version, tag or git commit information. -->
1515
...

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ about: Create a report to help us improve
1919
### Additional context, version info
2020
<!-- Please do not post sensitive information, we are not liable. -->
2121
<!-- Append a sanitized log/demo/screenshot/animated GIF of the problem. -->
22-
<!-- Package.json version, tag, or git commit information. -->
22+
<!-- PatternFly MCP version, Node.js version, tag or git commit information. -->
2323
...

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ PR tips
2323
1. `> [test prompt]`
2424
-->
2525
<!--
26+
### Check the work
27+
1. update the NPM packages with `$ npm install`
28+
1. `$ npm run build`
29+
1. `npx -y @modelcontextprotocol/inspector node dist/cli.js`
30+
1. next...
31+
-->
32+
<!--
2633
### Unit test check
2734
1. update the NPM packages with `$ npm install`
2835
1. `$ npm test`

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Minimal configuration
2222
```json
2323
{
2424
"mcpServers": {
25-
"patternfly-docs": {
25+
"patternfly-mcp": {
2626
"command": "npx",
2727
"args": ["-y", "@patternfly/patternfly-mcp@latest"],
2828
"description": "PatternFly rules and documentation"
@@ -35,10 +35,10 @@ HTTP transport mode
3535
```json
3636
{
3737
"mcpServers": {
38-
"patternfly-docs": {
38+
"patternfly-mcp": {
3939
"command": "npx",
4040
"args": ["-y", "@patternfly/patternfly-mcp@latest", "--http", "--port", "8080"],
41-
"description": "PatternFly docs (HTTP transport)"
41+
"description": "PatternFly rules and documentation (HTTP transport)"
4242
}
4343
}
4444
}
@@ -48,9 +48,11 @@ HTTP transport mode
4848

4949
### For development, advanced usage
5050

51-
#### Run the server directly
51+
#### Run the latest released server
5252
Run the server immediately via `npx`:
5353

54+
With the latest released package
55+
5456
```bash
5557
npx -y @patternfly/patternfly-mcp
5658
```
@@ -61,13 +63,26 @@ Or with options
6163
npx -y @patternfly/patternfly-mcp --log-stderr --verbose
6264
```
6365

66+
#### Run a locally built server
67+
```bash
68+
# clone the repo, change directories, npm install, npm run build, then in the repo context run...
69+
npm start
70+
```
71+
6472
#### Inspect the server
65-
Visualize and test the MCP interface:
73+
Visualize and test the packaged MCP interface:
6674

6775
```bash
6876
npx -y @modelcontextprotocol/inspector npx @patternfly/patternfly-mcp
6977
```
7078

79+
Build from source and test a local built MCP interface:
80+
81+
```bash
82+
# clone the repo, change directories, npm install, npm run build, then in the repo context run...
83+
npx -y @modelcontextprotocol/inspector node dist/cli.js
84+
```
85+
7186
#### Embed the server in your application
7287

7388
```typescript
@@ -94,7 +109,7 @@ main();
94109
For comprehensive usage, development, and project state [read the docs](./docs/README.md).
95110

96111
- **Architecture**: Learn about our [hybrid documentation concept and data sources](./docs/architecture.md#data-sources-and-integrations).
97-
- **Usage**: Detailed guide on [built-in tools and resources](./docs/usage.md).
112+
- **Usage**: Detailed guide on [built-in tools, resources, and troubleshooting for general use](./docs/usage.md).
98113
- **Development**: Reference for [CLI options and tool plugins](./docs/development.md).
99114

100115
## Contributing

cspell.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"codemods",
66
"ized",
77
"llms",
8+
"localappdata",
89
"midrun",
910
"modelcontextprotocol",
1011
"nosniff",

docs/development.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,16 @@ npx @patternfly/patternfly-mcp --mode test --mode-test-url "http://localhost:300
6767

6868
The `@modelcontextprotocol/inspector` is the recommended way to visualize the server's interface.
6969

70-
1. **Start the Inspector**:
70+
1. **Build the PatternFly MCP**:
7171
```bash
72-
npx -y @modelcontextprotocol/inspector npx @patternfly/patternfly-mcp
72+
npm install
73+
npm run build
7374
```
74-
2. **Interact**: The inspector opens a web interface (typically at `http://localhost:5173`) where you can list tools, execute them, and view resource contents.
75-
76-
**Example with repository context:**
77-
```bash
78-
npx @modelcontextprotocol/inspector-cli \
79-
--config ./mcp-config.json \
80-
--server patternfly-docs \
81-
--cli \
82-
--method tools/call \
83-
--tool-name usePatternFlyDocs \
84-
--tool-arg name="Button"
85-
```
75+
2. **Start the Inspector**:
76+
```bash
77+
npx -y @modelcontextprotocol/inspector node dist/cli.js
78+
```
79+
3. **Interact**: The inspector opens a web interface (typically at `http://localhost:5173`) where you can list tools, resources, and prompts, then execute and view their responses.
8680

8781
## Programmatic usage
8882

docs/usage.md

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ A comprehensive guide to PatternFly MCP Server tools, resources, and configurati
77
- [Built-in resources](#built-in-resources)
88
- [MCP client configuration](#mcp-client-configuration)
99
- [Custom MCP tool plugins](#custom-mcp-tool-plugins)
10+
- [Troubleshooting](#troubleshooting)
1011

1112
## Built-in tools
1213

@@ -101,7 +102,7 @@ Most MCP clients use JSON configuration to specify how the server is started. Be
101102
```json
102103
{
103104
"mcpServers": {
104-
"patternfly-docs": {
105+
"patternfly-mcp": {
105106
"command": "npx",
106107
"args": ["-y", "@patternfly/patternfly-mcp@latest"],
107108
"description": "PatternFly React development rules and documentation"
@@ -115,7 +116,7 @@ Most MCP clients use JSON configuration to specify how the server is started. Be
115116
```json
116117
{
117118
"mcpServers": {
118-
"patternfly-docs": {
119+
"patternfly-mcp": {
119120
"command": "npx",
120121
"args": ["-y", "@patternfly/patternfly-mcp@latest", "--http", "--port", "8080"],
121122
"description": "PatternFly docs (HTTP transport)"
@@ -129,7 +130,7 @@ Most MCP clients use JSON configuration to specify how the server is started. Be
129130
```json
130131
{
131132
"mcpServers": {
132-
"patternfly-docs": {
133+
"patternfly-mcp": {
133134
"command": "npx",
134135
"args": [
135136
"-y",
@@ -148,7 +149,7 @@ Most MCP clients use JSON configuration to specify how the server is started. Be
148149
```json
149150
{
150151
"mcpServers": {
151-
"patternfly-docs": {
152+
"patternfly-mcp": {
152153
"command": "npx",
153154
"args": [
154155
"-y",
@@ -172,3 +173,69 @@ Most MCP clients use JSON configuration to specify how the server is started. Be
172173
You can extend the server's capabilities by loading custom **Tool Plugins** at startup.
173174

174175
[See development documentation for tool plugins.](./development.md#mcp-tool-plugins)
176+
177+
## Troubleshooting
178+
179+
This guide is designed to help resolve common environment-related issues across macOS, Linux, and Windows.
180+
181+
> **Note on Operating Systems**: Our primary development and testing environments are **macOS and Linux**. While we provide instructions for **Windows**, these commands are run at your own discretion. If you are unsure, please verify them with your IT or system administrator before proceeding.
182+
183+
### 1. Verify Node.js Version
184+
The PatternFly MCP server requires **Node.js 20 or higher**.
185+
186+
- **How to check**:
187+
- **macOS/Linux**: Open **Terminal** and type `node -v`.
188+
- **Windows**: Open **PowerShell** or **Command Prompt** and type `node -v`.
189+
- **Requirement**: You should see a version starting with `v20`, `v22`, or higher.
190+
- **Solution**: If your version is lower than 20, please download and install the latest "LTS" (Long Term Support) version from [nodejs.org](https://nodejs.org/).
191+
192+
### 2. Reset the npx Cache
193+
If you encounter an `ERR_MODULE_NOT_FOUND` error or don't see the latest features, your system may be using a "stale" or corrupted version in its cache.
194+
195+
#### **macOS and Linux**
196+
Run this command in your **Terminal**:
197+
```bash
198+
rm -rf ~/.npm/_npx
199+
```
200+
201+
#### **Windows**
202+
Run the appropriate command for your terminal:
203+
- **PowerShell**:
204+
```powershell
205+
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx"
206+
```
207+
- **Command Prompt (CMD)**:
208+
```cmd
209+
rd /s /q "%LocalAppData%\npm-cache\_npx"
210+
```
211+
212+
**Next Step**: Restart your MCP client (e.g., Claude Desktop, IDE, or Cursor) to force a fresh download.
213+
214+
### 3. Windows-Specific: Symbolic Links
215+
If you are developing locally or have cloned the repository on Windows, you may encounter issues with "missing" files in `.agents/skills` and `.claude/skills`. This is often due to Git not creating symbolic links correctly on Windows.
216+
217+
- **The Fix**: Enable **Developer Mode** in Windows Settings (Privacy & security → For developers).
218+
- **Git Config**: Run `git config --global core.symlinks true` and then re-clone the repository or run `git checkout .` to restore the links.
219+
220+
### 4. Configuration Best Practices
221+
To ensure you stay up to date with the latest PatternFly documentation, use the `@latest` tag in your configuration:
222+
223+
```json
224+
"patternfly-mcp": {
225+
"command": "npx",
226+
"args": ["-y", "@patternfly/patternfly-mcp@latest"],
227+
"description": "PatternFly rules and documentation"
228+
}
229+
```
230+
231+
Using `@latest` tells the system to check for updates periodically, helping to ensure you are working with the most current PatternFly specifications.
232+
233+
### 5. Common Error: `ERR_MODULE_NOT_FOUND`
234+
If your logs show `Error [ERR_MODULE_NOT_FOUND]`, it likely indicates a corrupted cache following a PatternFly MCP version update. Please follow the [Reset the npx Cache](#2-reset-the-npx-cache) steps above for your specific operating system.
235+
236+
### 6. Community Support
237+
If you have tried the steps above and are still encountering issues, or if you have specific questions about using PatternFly with your AI assistant, the following community resources are available:
238+
239+
- **[PatternFly Slack](https://patternfly.slack.com/)**: Join our Slack community for real-time support and conversation.
240+
- **[GitHub Discussions](https://github.com/orgs/patternfly/discussions)**: A great place to ask questions, share ideas, and see how others are leveraging PatternFly.
241+
- **[PatternFly on Medium](https://medium.com/patternfly)**: Read articles and deep-dives into PatternFly design and development practices.

mcp-config-example.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"mcpServers": {
3-
"patternfly-docs": {
3+
"patternfly-mcp": {
44
"command": "npx",
55
"args": ["@patternfly/patternfly-mcp"],
6-
"description": "PatternFly development rules and documentation"
6+
"description": "PatternFly rules and documentation"
77
}
88
}
99
}

0 commit comments

Comments
 (0)