abac-validation-mcp-server
Enables AI-assisted Attribute-Based Access Control code validation and review, with batch processing and progress notifications for long-running operations.
README
ABAC Validation MCP Server
An MCP (Model Context Protocol) server that provides AI-assisted ABAC (Attribute-Based Access Control) code validation and review tools. This server integrates with Claude CLI or GitHub Copilot CLI to perform long-running validation operations with progress notifications.
Features
- Business Logic Validation: Validate code against business requirements using AI
- AI-Assisted Code Review: Comprehensive code review covering quality, security, and performance
- Batch Processing: Validate multiple files with progress updates
- Progress Notifications: Long-running operations report progress to the client
- CLI Integration: Calls Claude/Copilot CLI for AI analysis (ready for integration)
Installation
npm install
npm run build
Usage
Running Standalone
npm run dev
VS Code Configuration
Add to your VS Code settings.json (.vscode/settings.json or user settings):
{
"mcp.servers": {
"abac-validation": {
"type": "stdio",
"command": "node",
"args": [
"/absolute/path/to/abac-validation-mcp-server/dist/index.js"
]
}
}
}
Or use npx for easier distribution:
{
"mcp.servers": {
"abac-validation": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"abac-validation-mcp-server"
]
}
}
}
Claude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"abac-validation": {
"command": "node",
"args": [
"/absolute/path/to/abac-validation-mcp-server/dist/index.js"
]
}
}
}
Available Tools
1. validate_business_logic
Validate code against business requirements using AI.
Parameters:
code(string, required): The code to validaterequirements(string, required): Business requirements to validate against
Example:
{
"code": "function calculateDiscount(price, customerType) { ... }",
"requirements": "Premium customers get 20% discount, regular customers get 10%"
}
2. ai_code_review
Perform comprehensive AI-assisted code review.
Parameters:
code(string, required): The code to reviewcontext(string, optional): Additional context about the codereview_type(string, optional): Type of review - "comprehensive", "security", "performance", or "style"
Example:
{
"code": "async function fetchUserData(userId) { ... }",
"context": "This is part of a user authentication system",
"review_type": "security"
}
3. batch_validate
Validate multiple files in batch with progress updates.
Parameters:
files(array, required): Array of file objects withpathand optionalrequirements
Example:
{
"files": [
{ "path": "src/auth.ts", "requirements": "Must use OAuth 2.0" },
{ "path": "src/payment.ts", "requirements": "PCI DSS compliant" }
]
}
Integration with Claude/Copilot CLI
Current Status
The server skeleton is ready with placeholder implementations. To integrate with actual CLIs:
Option 1: Claude CLI
Replace the TODO sections in src/index.ts with:
// Install: npm install -g @anthropic-ai/claude-cli
const result = await executeWithProgress('claude', [
'analyze',
'--prompt', prompt
], (msg) => {
if (progressToken) {
// Send progress notification
}
});
Option 2: GitHub Copilot CLI
// Requires GitHub Copilot CLI access
const result = await executeWithProgress('gh', [
'copilot',
'explain',
code
], (msg) => {
if (progressToken) {
// Send progress notification
}
});
Option 3: API Calls
For more control, use the Anthropic API directly:
npm install @anthropic-ai/sdk
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY
});
// Use streaming for progress
const stream = await client.messages.create({
model: 'claude-sonnet-4-5-20250929',
messages: [{ role: 'user', content: prompt }],
stream: true,
max_tokens: 4096
});
for await (const event of stream) {
// Send progress updates
}
Development
Build
npm run build
Watch Mode
npm run watch
Testing
Test the server with MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js
Next Steps
- Integrate CLI: Choose your preferred AI CLI (Claude/Copilot) and implement in the TODO sections
- Add Progress Notifications: Use MCP progress notification protocol for real-time updates
- File System Access: Add file reading capabilities for batch validation
- Configuration: Add config file for API keys, CLI paths, etc.
- Error Handling: Improve error handling and retry logic
- Caching: Add caching for repeated validations
- Custom Validators: Add domain-specific validation rules
Architecture
User (VS Code/Copilot/Claude)
↓
MCP Client
↓ (stdio)
Validation MCP Server
↓
Claude CLI / Copilot CLI / API
↓
AI Model (validation/review)
↓
Results with Progress
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.