|
| 1 | +# Installation Guide for LLMs |
| 2 | + |
| 3 | +This guide helps you assist users in setting up the @reapi/mcp-openapi server. |
| 4 | + |
| 5 | +## 1. Initial User Interaction |
| 6 | + |
| 7 | +First, ask the user for their OpenAPI specifications directory: |
| 8 | + |
| 9 | +``` |
| 10 | +"To set up the MCP OpenAPI server, I'll need to know where your OpenAPI specifications are located. Please provide either: |
| 11 | +- An absolute path (e.g., /Users/username/projects/api-specs) |
| 12 | +- A relative path from your project (e.g., ./specs, ../api-specs) |
| 13 | +
|
| 14 | +Where would you like to store your OpenAPI specifications?" |
| 15 | +``` |
| 16 | + |
| 17 | +## 2. Configuration Setup |
| 18 | + |
| 19 | +After receiving the path, guide the user through configuration: |
| 20 | + |
| 21 | +> **Important**: When editing the MCP configuration file, preserve any existing entries. Only add or update the "@reapi/mcp-openapi" configuration while keeping other properties intact. |
| 22 | +
|
| 23 | +If the file already exists, merge this configuration with existing entries: |
| 24 | + |
| 25 | +```json |
| 26 | +{ |
| 27 | + "mcpServers": { |
| 28 | + "@reapi/mcp-openapi": { |
| 29 | + "command": "npx", |
| 30 | + "args": ["-y", "@reapi/mcp-openapi", "--dir", "<USER_PROVIDED_PATH>"], |
| 31 | + "env": {} |
| 32 | + } |
| 33 | + // ... keep other existing configurations ... |
| 34 | + } |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +Example of merging with existing configuration: |
| 39 | + |
| 40 | +```json |
| 41 | +{ |
| 42 | + "mcpServers": { |
| 43 | + "existing-server": { |
| 44 | + // ... existing configuration ... |
| 45 | + }, |
| 46 | + "@reapi/mcp-openapi": { |
| 47 | + "command": "npx", |
| 48 | + "args": ["-y", "@reapi/mcp-openapi", "--dir", "<USER_PROVIDED_PATH>"], |
| 49 | + "env": {} |
| 50 | + }, |
| 51 | + "another-server": { |
| 52 | + // ... existing configuration ... |
| 53 | + } |
| 54 | + }, |
| 55 | + "other": {} |
| 56 | +} |
| 57 | +``` |
| 58 | + |
| 59 | +## 3. Place OpenAPI Specifications |
| 60 | + |
| 61 | +Guide the user to add their specifications: |
| 62 | + |
| 63 | +``` |
| 64 | +"Now, please place your OpenAPI 3.x specifications in the configured directory. The server supports: |
| 65 | +- JSON files (*.json) |
| 66 | +- YAML files (*.yaml, *.yml) |
| 67 | +
|
| 68 | +If you don't have any specifications ready, I can help you create a sample one for testing. |
| 69 | +
|
| 70 | +For detailed information about specification requirements and advanced features, please visit: |
| 71 | +https://github.com/ReAPI-com/mcp-openapi |
| 72 | +
|
| 73 | +The documentation includes: |
| 74 | +- Complete usage guide |
| 75 | +- Example prompts |
| 76 | +- Configuration options |
| 77 | +- Best practices for organizing multiple APIs |
| 78 | +- Tools and features reference" |
| 79 | +``` |
0 commit comments