From 338a2dc2ccbdcb66bf6eb58ad2ffb6d5c22c98d3 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 25 Jun 2025 17:09:27 +0100 Subject: [PATCH] refactor: Rename MCP-Generated directory to MCP and update related references in scripts and documentation --- .github/workflows/publish-mcp-server.yml | 8 ++++---- .gitignore | 2 +- Scripts/MCPProvider/README.md | 8 ++++---- Scripts/MCPProvider/publish-mcp-server.sh | 8 ++++---- package.json | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-mcp-server.yml b/.github/workflows/publish-mcp-server.yml index 57158811b0..61e9424c27 100644 --- a/.github/workflows/publish-mcp-server.yml +++ b/.github/workflows/publish-mcp-server.yml @@ -145,13 +145,13 @@ jobs: uses: actions/upload-artifact@v4 with: name: mcp-server-${{ steps.version.outputs.version }} - path: ./MCP-Generated/ + path: ./MCP/ retention-days: 90 - name: Create GitHub Release Assets if: ${{ github.event_name == 'release' }} run: | - cd MCP-Generated + cd MCP npm pack PACKAGE_FILE=$(ls *.tgz) mv "$PACKAGE_FILE" "../oneuptime-mcp-server-${{ steps.version.outputs.version }}.tgz" @@ -171,7 +171,7 @@ jobs: if: ${{ github.event_name == 'release' }} run: | # Count generated tools - TOOL_COUNT=$(grep -c "server.tool(" MCP-Generated/Service/MCP.ts || echo "0") + TOOL_COUNT=$(grep -c "server.tool(" MCP/Service/MCP.ts || echo "0") # Create enhanced release notes cat > enhanced-release-notes.md << EOF @@ -216,7 +216,7 @@ jobs: ### 📚 Documentation - For detailed usage instructions, API documentation, and examples, see the [README](https://github.com/OneUptime/oneuptime/blob/main/MCP-Generated/README.md). + For detailed usage instructions, API documentation, and examples, see the [README](https://github.com/OneUptime/oneuptime/blob/main/MCP/README.md). ### 🔗 Links diff --git a/.gitignore b/.gitignore index 6a55e9cadc..3b3993b43a 100644 --- a/.gitignore +++ b/.gitignore @@ -126,4 +126,4 @@ TerraformTest/** terraform-provider-example/** MCP/** -MCP-Generated/** \ No newline at end of file +MCP/** \ No newline at end of file diff --git a/Scripts/MCPProvider/README.md b/Scripts/MCPProvider/README.md index 7f8129b3be..6d450b741d 100644 --- a/Scripts/MCPProvider/README.md +++ b/Scripts/MCPProvider/README.md @@ -31,7 +31,7 @@ This project provides a **dynamic MCP (Model Context Protocol) server generator* ## 📁 Generated Structure ``` -MCP-Generated/ +MCP/ ├── package.json # NPM package configuration ├── Index.ts # Main MCP server entry point ├── README.md # Complete usage documentation @@ -62,7 +62,7 @@ npm run generate-mcp-server ```bash # Navigate to the generated server -cd MCP-Generated +cd MCP # Install dependencies npm install @@ -94,7 +94,7 @@ npm start ```bash # Build Docker image -cd MCP-Generated +cd MCP docker build -t oneuptime-mcp . # Run with environment variables @@ -217,7 +217,7 @@ To modify the generator: 1. Edit TypeScript files in `Scripts/MCPProvider/Core/` 2. Run `npm run generate-mcp-server` to test changes -3. Check generated code in `MCP-Generated/` +3. Check generated code in `MCP/` 4. Iterate and improve ### Key Files diff --git a/Scripts/MCPProvider/publish-mcp-server.sh b/Scripts/MCPProvider/publish-mcp-server.sh index 847ca2a42a..edfb328ced 100755 --- a/Scripts/MCPProvider/publish-mcp-server.sh +++ b/Scripts/MCPProvider/publish-mcp-server.sh @@ -235,7 +235,7 @@ if [ "$DRY_RUN" = false ]; then This release includes the OneUptime Model Context Protocol (MCP) Server generated from the OneUptime API specification. ### Features -- Complete API coverage with $(find MCP-Generated -name "*.ts" | wc -l) generated TypeScript files +- Complete API coverage with $(find MCP -name "*.ts" | wc -l) generated TypeScript files - Auto-generated from OpenAPI specification - Full support for OneUptime monitoring and incident management features - Type-safe MCP tools for LLM integration @@ -262,7 +262,7 @@ oneuptime-mcp docker run -e ONEUPTIME_API_KEY=your-api-key-here oneuptime/mcp-server:$VERSION \`\`\` -For more information, see the [README](https://github.com/OneUptime/oneuptime/blob/main/MCP-Generated/README.md). +For more information, see the [README](https://github.com/OneUptime/oneuptime/blob/main/MCP/README.md). " echo "$RELEASE_NOTES" > release-notes.md @@ -271,7 +271,7 @@ For more information, see the [README](https://github.com/OneUptime/oneuptime/bl gh release create "mcp-v$VERSION" \ --title "MCP Server v$VERSION" \ --notes-file release-notes.md \ - MCP-Generated/*.tgz 2>/dev/null || echo "Note: No package files to attach to release" + MCP/*.tgz 2>/dev/null || echo "Note: No package files to attach to release" rm -f release-notes.md @@ -291,4 +291,4 @@ if [ "$DRY_RUN" = false ]; then print_status "🐙 GitHub: https://github.com/OneUptime/oneuptime/releases/tag/mcp-v$VERSION" fi -print_status "📚 Documentation: See MCP-Generated/README.md for usage instructions" +print_status "📚 Documentation: See MCP/README.md for usage instructions" diff --git a/package.json b/package.json index 996e4a5a54..e993fce731 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "typeorm": "node --require ts-node/register ./node_modules/typeorm/cli.js", "uninstall": "bash uninstall.sh", "lint": "export NODE_OPTIONS='--max-old-space-size=32768' && npx eslint . --cache", - "fix-lint": "export NODE_OPTIONS='--max-old-space-size=32768' && npx eslint . --fix --cache", + "fix-lint": "export NODE_OPTIONS='--max-old-space-size=32768' && npx eslint . --fix --cache --debug", "fix": "npm run fix-lint", "status-check": "bash ./Tests/Scripts/status-check.sh $npm_config_services", "start": "export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d $npm_config_services && npm run status-check",