MCP server for working with OpenAPI Modifier rules
npm install openapi-modifier-mcpπΊπΈ English | π·πΊ Π ΡΡΡΠΊΠΈΠΉ | π¨π³ δΈζ
MCP (Model Context Protocol) server for working with openapi-modifier rules and configurations.
``bash`
cd mcp
npm install
npm run build
Add to .cursor/mcp.json (or MCP settings):
`json`
{
"mcpServers": {
"openapi-modifier": {
"command": "npx",
"args": [
"openapi-modifier-mcp"
],
"env": {
"LANG": "en"
}
}
}
}
> Note: The LANG environment variable determines the default documentation language (en, ru, zh). If not specified, en is used.
Add to the Claude Desktop configuration file:
macOS:
``
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
``
%APPDATA%\Claude\claude_desktop_config.json
Linux:
``
~/.config/Claude/claude_desktop_config.json
Configuration:
`json`
{
"mcpServers": {
"openapi-modifier": {
"command": "npx",
"args": [
"openapi-modifier-mcp"
],
"env": {
"LANG": "en"
}
}
}
}
After adding the configuration, restart Claude Desktop.
> Note: The LANG environment variable determines the default documentation language (en, ru, zh). If not specified, en is used.
Add to the Roo configuration file:
macOS:
``
~/Library/Application Support/Roo/roo_config.json
Windows:
``
%APPDATA%\Roo\roo_config.json
Linux:
``
~/.config/Roo/roo_config.json
Configuration:
`json`
{
"mcpServers": {
"openapi-modifier": {
"command": "npx",
"args": [
"openapi-modifier-mcp"
],
"env": {
"LANG": "en"
}
}
}
}
After adding the configuration, restart Roo.
> Note: The LANG environment variable determines the default documentation language (en, ru, zh). If not specified, en is used.
- list_rules β returns a list of all available openapi-modifier rules with their brief descriptions. Supports the lang parameter for selecting documentation language (en, ru, zh).lang
- get_rule_config β gets the configuration description for a specific rule. Supports the parameter for selecting documentation language (en, ru, zh).lang
- get_simple_text_file_modifier_doc β gets the Simple Text File Modifier cli documentation (adding text to the beginning/end of a file, replacement by regular expressions). Supports the parameter for selecting documentation language (en, ru, zh).
`bash`
npm run build # build TypeScript to JavaScript
After building, the server is ready to use. Use the path to dist/index.js in the MCP configuration to run it.
For development, you can use the local build:
`json`
{
"mcpServers": {
"openapi-modifier": {
"command": "node",
"args": ["/path/to/openapi-modifier/mcp/dist/index.js"],
"env": {
"LANG": "en"
}
}
}
}
``
mcp/
βββ docs/
β βββ rules.md # list of rules (source for list_rules)
β βββ rules-ru.md
β βββ rules-zh.md
βββ resources/
β βββ rules.json # list of available rules
βββ src/
β βββ index.ts
βββ dist/ # after npm run build
βββ package.json
βββ tsconfig.json
βββ README.md
The server supports three documentation languages: en (default), ru, zh. The default language is determined from the LANG environment variable or set to en` if the variable is not set or contains an unsupported value.