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
36 changes: 20 additions & 16 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ npx @modelcontextprotocol/inspector-cli \
--cli \
--method tools/call \
--tool-name usePatternFlyDocs \
--tool-arg urlList='["documentation/guidelines/README.md"]'
--tool-arg name="Button"
```

## Programmatic usage
Expand All @@ -88,21 +88,21 @@ npx @modelcontextprotocol/inspector-cli \

The `start()` function accepts an optional `PfMcpOptions` object for programmatic configuration. Use these options to customize behavior, transport, and logging for embedded instances.

| Option | Type | Description | Default |
|:---------------------------|:-----------------------------------------|:----------------------------------------------------------------------|:-------------------|
| `toolModules` | `ToolModule \| ToolModule[]` | Array of tool modules or paths to external tool plugins to be loaded. | `[]` |
| `isHttp` | `boolean` | Enable HTTP transport mode. | `false` |
| `http.port` | `number` | Port for HTTP transport. | `8080` |
| `http.host` | `string` | Host to bind to. | `127.0.0.1` |
| `http.allowedOrigins` | `string[]` | List of allowed CORS origins. | `[]` |
| `http.allowedHosts` | `string[]` | List of allowed host headers. | `[]` |
| `pluginIsolation` | `'none' \| 'strict'` | Isolation preset for external tools-as-plugins. | `'strict'` |
| `logging.level` | `'debug' \| 'info' \| 'warn' \| 'error'` | Set the logging level. | `'info'` |
| `logging.stderr` | `boolean` | Enable terminal logging to stderr. | `false` |
| `logging.protocol` | `boolean` | Forward logs to MCP clients. | `false` |
| `mode` | `'cli' \| 'programmatic' \| 'test'` | Specifies the operation mode. | `'programmatic'` |
| `modeOptions.test.baseUrl` | `string` | Base URL for fixture/mock servers in `test` mode. | `undefined` |
| `docsPath` | `string` | Path to the documentation directory. | (Internal default) |
| Option | Type | Description | Default |
|:---------------------------|:-----------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|:-----------------|
| `toolModules` | `ToolModule \| ToolModule[]` | Array of tool modules or paths to external tool plugins to be loaded. | `[]` |
| `isHttp` | `boolean` | Enable HTTP transport mode. | `false` |
| `http.port` | `number` | Port for HTTP transport. | `8080` |
| `http.host` | `string` | Host to bind to. | `127.0.0.1` |
| `http.allowedOrigins` | `string[]` | List of allowed CORS origins. | `[]` |
| `http.allowedHosts` | `string[]` | List of allowed host headers. | `[]` |
| `pluginIsolation` | `'none' \| 'strict'` | Isolation preset for external tools-as-plugins. | `'strict'` |
| `logging.level` | `'debug' \| 'info' \| 'warn' \| 'error'` | Set the logging level. | `'info'` |
| `logging.stderr` | `boolean` | Enable terminal logging to stderr. | `false` |
| `logging.protocol` | `boolean` | Forward logs to MCP clients. | `false` |
| `mode` | `'cli' \| 'programmatic' \| 'test'` | Specifies the operation mode. | `'programmatic'` |
| `modeOptions.test.baseUrl` | `string` | Base URL for fixture/mock servers in `test` mode. | `undefined` |
| `docsPaths` | `string[]` | Whitelist of local documentation directories resolved by `documentation:` slug. When empty (default), the slug is dormant. | `[]` |

#### Example usage

Expand All @@ -124,6 +124,10 @@ const options: PfMcpOptions = {
const server: PfMcpInstance = await start(options);
```

#### About pinned documentation sources

The documentation catalog `src/docs.json` pins remote resources to specific commit SHAs (or explicit refs) for stability and reproducibility. This avoids unexpected upstream changes from breaking results. The `searchPatternFlyDocs` tool handles these lookups transparently for the user.

**Example: Programmatic test mode**
```typescript
import { start, type PfMcpInstance } from '@patternfly/patternfly-mcp';
Expand Down
70 changes: 0 additions & 70 deletions documentation/README.md

This file was deleted.

Loading
Loading