Skip to content

Conversation

@mkczarkowski
Copy link
Collaborator

@mkczarkowski mkczarkowski commented Apr 27, 2025

PR Summary: Feature - AI Rules Integration & MCP Server on Cloudflare

This PR introduces a significant feature set focused on integrating AI-driven rule management into the Model Context Protocol (MCP) server, deployed as an auth-less Cloudflare Worker.

Key Changes:

  • AI Rules Management:
    • Implemented tools (listAvailableRulesTool, getRuleContentTool) to allow listing available AI library rule identifiers and fetching specific rule content (mcp-server/src/tools/rulesTools.ts).
    • Added a data provider (mcp-server/src/data/rulesProvider.ts) to load and serve rule definitions from a preparedRules.json file.
    • Included a script (scripts/generate-rules-json.ts) to dynamically generate the preparedRules.json hierarchy and content.
  • MCP Server on Cloudflare Workers:
    • Set up the core MCP server logic (mcp-server/src/server.ts) extending McpAgent for Cloudflare Workers environment.
    • Configured the worker using wrangler.jsonc, including environment variables, bindings, and compatibility settings.
  • Project Setup & Configuration:
    • Added comprehensive project documentation in README.md.
    • Configured .gitignore and VS Code settings (.vscode/settings.json).
  • CI/CD & Deployment:
    • Established a GitHub Actions workflow (.github/workflows/master-deployment.yml) for automated linting, testing, building, and deployment to Cloudflare Pages and Workers upon pushes to main.
    • Updated build scripts in package.json to include rule generation and worker deployment steps.

Purpose:

This foundational work enables the MCP server to provide context-specific AI rules to clients based on the libraries or frameworks being used, running efficiently on Cloudflare's edge network. It also establishes a robust development and deployment pipeline.

@github-actions
Copy link

✅ All checks have passed successfully!

  • Lint: ✅
  • Unit Tests: ✅
  • E2E Tests: ✅

Coverage reports have been uploaded as artifacts.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 27, 2025

Deploying ai-rules-builder with  Cloudflare Pages  Cloudflare Pages

Latest commit: f2fc56a
Status: ✅  Deploy successful!
Preview URL: https://8b10f5fc.ai-rules-builder.pages.dev
Branch Preview URL: https://mcp-server.ai-rules-builder.pages.dev

View logs

@github-actions
Copy link

✅ All checks have passed successfully!

  • Lint: ✅
  • Unit Tests: ✅
  • E2E Tests: ✅

Coverage reports have been uploaded as artifacts.

@github-actions
Copy link

✅ All checks have passed successfully!

  • Lint: ✅
  • Unit Tests: ✅
  • E2E Tests: ✅

Coverage reports have been uploaded as artifacts.

@github-actions
Copy link

✅ All checks have passed successfully!

  • Lint: ✅
  • Unit Tests: ✅
  • E2E Tests: ✅

Coverage reports have been uploaded as artifacts.

@github-actions
Copy link

✅ All checks have passed successfully!

  • Lint: ✅
  • Unit Tests: ✅
  • E2E Tests: ✅

Coverage reports have been uploaded as artifacts.

@mkczarkowski mkczarkowski marked this pull request as ready for review April 27, 2025 12:11
@mkczarkowski mkczarkowski merged commit 8137bc6 into master Apr 27, 2025
4 checks passed
@mkczarkowski mkczarkowski deleted the mcp-server branch April 27, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants