Skip to main content

AI Integration

The MBC CQRS Serverless framework is designed with AI tool integration in mind.

Overview​

Modern development workflows increasingly include AI assistance for code generation, debugging, and documentation lookup. This framework supports AI development tools through llms.txt files and MCP server.

llms.txt Convention​

What is llms.txt?​

The llms.txt convention provides a standardized way for websites and projects to expose information for LLMs.

File Structure​

The framework provides two versions:

  • llms.txt - Concise overview and quick reference
  • llms-full.txt - Comprehensive documentation and context

Using llms.txt​

AI tools can directly fetch these files to build context about the framework:

# Short version for quick context
curl https://mbc-cqrs-serverless.mbc-net.com/llms.txt

# Full version for comprehensive context
curl https://mbc-cqrs-serverless.mbc-net.com/llms-full.txt

MCP Server Integration​

The Model Context Protocol (MCP) server provides a more dynamic way for AI tools to interact with the framework.

Context7 Integration​

Context7 is an MCP server that provides real-time, version-specific documentation to AI assistants.

MBC CQRS Serverless documentation is available through Context7. You can access it at:

To use Context7, add it to Claude Code:

claude mcp add context7 -- npx -y @upstash/context7-mcp@latest

Custom MCP Server​

The framework also provides a custom MCP server for deeper integration:

FeatureDescription
ResourcesAccess to framework documentation
ToolsCode generation and validation tools
PromptsGuided workflows for common tasks

Setup​

Add to Claude Code or other MCP-compatible tools:

{
"mcpServers": {
"mbc-cqrs-serverless": {
"command": "npx",
"args": ["@mbc-cqrs-serverless/mcp-server"],
"env": {
"MBC_PROJECT_PATH": "/path/to/your/project"
}
}
}
}

Learn more: MCP Server Documentation

Best Practices​

Documentation First​

Before tackling complex tasks, let AI read the framework documentation:

  1. Use MCP resources to fetch architecture documentation
  2. Review CQRS patterns and Event Sourcing concepts
  3. Examine existing modules as reference patterns

Code Generation​

When asking AI to generate modules, be specific:

"Generate an Order module with async command handling and validation"

Debugging Assistance​

When encountering errors, AI can use the error catalog to find solutions:

"I'm getting error 'version mismatch'. What should I do?"

Supported Tools​

The following AI tools can integrate with MBC CQRS Serverless:

ToolSupportNotes
Claude CodeFull SupportNative MCP support
CursorFull SupportMCP support available
GitHub CopilotPartial SupportVia llms.txt