Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Red Hat, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ npm run start:dev
### Use via npx (after publishing)

```bash
npx @jephilli-patternfly-docs/mcp
npx @patternfly/patternfly-mcp
```

Or install locally in a project and run:

```bash
npm install @jephilli-patternfly-docs/mcp
npx @jephilli-patternfly-docs/mcp
npm install @patternfly/patternfly-mcp
npx @patternfly/patternfly-mcp
```

## Scripts
Expand Down Expand Up @@ -111,7 +111,7 @@ If you run the server with --docs-host, local paths you pass in urlList are reso
Example:

```bash
npx @jephilli-patternfly-docs/mcp --docs-host
npx @patternfly/patternfly-mcp --docs-host
```

Then, passing a local path such as react-core/6.0.0/llms.txt in urlList will load from llms-files/react-core/6.0.0/llms.txt.
Expand All @@ -127,7 +127,7 @@ Most MCP clients use a JSON configuration that tells the client how to start thi
"mcpServers": {
"patternfly-docs": {
"command": "npx",
"args": ["-y", "@jephilli-patternfly-docs/mcp@latest"],
"args": ["-y", "@patternfly/patternfly-mcp@latest"],
"description": "PatternFly React development rules and documentation"
}
}
Expand All @@ -141,7 +141,7 @@ Most MCP clients use a JSON configuration that tells the client how to start thi
"mcpServers": {
"patternfly-docs": {
"command": "npx",
"args": ["-y", "@jephilli-patternfly-docs/mcp@latest", "--docs-host"],
"args": ["-y", "@patternfly/patternfly-mcp@latest", "--docs-host"],
"description": "PatternFly docs (docs-host mode)"
}
}
Expand Down Expand Up @@ -207,10 +207,10 @@ Example (ESM):

```js
// Prefer the public export subpath
import { runServer } from '@jephilli-patternfly-docs/mcp/server';
import { runServer } from '@patternfly/patternfly-mcp/server';

// Or from the package root (index.ts re-exports it)
import { runServer } from '@jephilli-patternfly-docs/mcp';
import { runServer } from '@patternfly/patternfly-mcp';

// Starts the MCP server and listens on stdio
await runServer();
Expand Down Expand Up @@ -247,7 +247,7 @@ npm publish

After publishing, users can run your MCP server with:
```bash
npx @jephilli-patternfly-docs/mcp
npx @patternfly/patternfly-mcp
```

## Contributing
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jephilli-patternfly-docs/mcp",
"version": "1.1.0",
"name": "@patternfly/patternfly-mcp",
"version": "0.0.0",
"description": "PatternFly documentation MCP server built with Node.js and TypeScript",
"main": "dist/index.js",
"type": "module",
Expand Down Expand Up @@ -44,7 +44,7 @@
"documentation",
"react"
],
"author": "Jeff Phillips",
"author": "Red Hat",
"license": "MIT",
"dependencies": {
"@modelcontextprotocol/sdk": "1.19.1",
Expand All @@ -70,11 +70,11 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/jeff-phillips-18/patternfly-mcp.git"
"url": "git+https://github.com/patternfly/patternfly-mcp.git"
},
"types": "./dist/index.d.ts",
"bugs": {
"url": "https://github.com/jeff-phillips-18/patternfly-mcp/issues"
"url": "https://github.com/patternfly/patternfly-mcp/issues"
},
"homepage": "https://github.com/jeff-phillips-18/patternfly-mcp#readme"
"homepage": "https://github.com/patternfly/patternfly-mcp#readme"
}
8 changes: 4 additions & 4 deletions src/__tests__/__snapshots__/options.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`freezeOptions should return frozen options with consistent properties:
"docsHost": true,
"docsPath": "/documentation",
"llmsFilesPath": "/llms-files",
"name": "@jephilli-patternfly-docs/mcp",
"name": "@patternfly/patternfly-mcp",
"pfExternal": "https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content",
"pfExternalAccessibility": "https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/accessibility",
"pfExternalCharts": "https://raw.githubusercontent.com/patternfly/patternfly-react/refs/heads/main/packages/react-charts/src",
Expand Down Expand Up @@ -46,7 +46,7 @@ exports[`freezeOptions should return frozen options with consistent properties:
},
},
"urlRegex": /\\^\\(https\\?:\\)\\\\/\\\\//i,
"version": "1.1.0",
"version": "0.0.0",
}
`;

Expand All @@ -61,7 +61,7 @@ exports[`options should return specific properties 1`] = `
"contextPath": "/",
"docsPath": "/documentation",
"llmsFilesPath": "/llms-files",
"name": "@jephilli-patternfly-docs/mcp",
"name": "@patternfly/patternfly-mcp",
"pfExternal": "https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content",
"pfExternalAccessibility": "https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/accessibility",
"pfExternalCharts": "https://raw.githubusercontent.com/patternfly/patternfly-react/refs/heads/main/packages/react-charts/src",
Expand Down Expand Up @@ -101,7 +101,7 @@ exports[`options should return specific properties 1`] = `
},
},
"urlRegex": /\\^\\(https\\?:\\)\\\\/\\\\//i,
"version": "1.1.0",
"version": "0.0.0",
},
"PF_EXTERNAL": "https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content",
"PF_EXTERNAL_ACCESSIBILITY": "https://raw.githubusercontent.com/patternfly/patternfly-org/refs/heads/main/packages/documentation-site/patternfly-docs/content/accessibility",
Expand Down
16 changes: 8 additions & 8 deletions src/__tests__/__snapshots__/server.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ exports[`runServer should attempt to run server, create transport, connect, and
"mcpServer": [
[
{
"name": "@jephilli-patternfly-docs/mcp",
"version": "1.1.0",
"name": "@patternfly/patternfly-mcp",
"version": "0.0.0",
},
{
"capabilities": {
Expand Down Expand Up @@ -40,8 +40,8 @@ exports[`runServer should attempt to run server, register a tool: console 1`] =
"mcpServer": [
[
{
"name": "@jephilli-patternfly-docs/mcp",
"version": "1.1.0",
"name": "@patternfly/patternfly-mcp",
"version": "0.0.0",
},
{
"capabilities": {
Expand Down Expand Up @@ -81,8 +81,8 @@ exports[`runServer should attempt to run server, register multiple tools: consol
"mcpServer": [
[
{
"name": "@jephilli-patternfly-docs/mcp",
"version": "1.1.0",
"name": "@patternfly/patternfly-mcp",
"version": "0.0.0",
},
{
"capabilities": {
Expand Down Expand Up @@ -155,8 +155,8 @@ exports[`runServer should attempt to run server, use default tools: console 1`]
"mcpServer": [
[
{
"name": "@jephilli-patternfly-docs/mcp",
"version": "1.1.0",
"name": "@patternfly/patternfly-mcp",
"version": "0.0.0",
},
{
"capabilities": {
Expand Down
2 changes: 1 addition & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const OPTIONS: GlobalOptions = {
separator: DEFAULT_SEPARATOR,
urlRegex: URL_REGEX,
name: packageJson.name,
version: packageJson.version,
version: (process.env.NODE_ENV === 'local' && '0.0.0') || packageJson.version,
repoName: process.cwd()?.split?.('/')?.pop?.()?.trim?.(),
contextPath: (process.env.NODE_ENV === 'local' && '/') || process.cwd(),
docsPath: (process.env.NODE_ENV === 'local' && '/documentation') || join(process.cwd(), 'documentation'),
Expand Down
Loading