Validates Express-based backend API implementations against OpenAPI specifications to ensure consistency with frontend requirements.
Integrates with GitHub Copilot to provide real-time checking of interface consistency between frontend and backend code based on OpenAPI 3.0 specifications.
Supports validating AI-generated React frontend code to ensure API calls and data structures match backend specifications.
Utilizes Swagger/OpenAPI 3.0 specifications to perform deep validation and consistency checking of AI-generated code interfaces.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Interface Validatorvalidate consistency for my new login system .use interface"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Interface Validator - Intelligent Interface Constraints & Validation
❌ Without MCP Interface Validator
AI-generated frontend and backend code may have interface inconsistency issues:
❌ Frontend API calls don't match backend implementations
❌ Inconsistent data structure definitions causing runtime errors
❌ Lack of unified interface specifications
❌ Manual interface consistency checking is inefficient
✅ With MCP Interface Validator
MCP Interface Validator automatically validates interface consistency between AI-generated frontend and backend code using OpenAPI 3.0 specifications.
Add .use interface to your prompts in Cursor:
MCP Interface Validator will:
🔍 Smart Constraint Injection - Automatically add interface validation constraints to AI prompts
📋 OpenAPI Specification Validation - Ensure generated code follows API specifications
🔄 Real-time Interface Checking - Validate frontend-backend interface consistency
🛠️ Multi-tool Support - Support Cursor, Windsurf, Trae, Augment and other AI tools
🚀 Core Features
Intelligent Constraint System
.use interface- One-click activation of interface validation constraintsAutomatic Prompt Injection - Smart recognition and injection of OpenAPI constraint prompts
Multi-language Support - Support for Chinese and English commands
Fuzzy Instruction Processing - Handle imprecise user instructions
Interface Validation Engine
OpenAPI 3.0 Support - Complete Swagger specification validation
Real-time Validation - Real-time interface checking during code generation
Error Reporting - Detailed interface inconsistency reports
Auto-fix Suggestions - Provide interface repair suggestions
Multi-tool Integration
Cursor - Full support for Cursor AI programming assistant
Windsurf - Integration with Windsurf development environment
Trae - Support for Trae AI tools
Augment - Compatible with Augment code assistant
Claude Desktop - Support for Claude desktop application
🛠️ Quick Start
Requirements
Node.js >= v18.0.0
AI tools supporting MCP protocol (Cursor, Windsurf, Claude Desktop, etc.)
Global Installation
Install from GitHub
📦 Configuration Setup
Augment Code
在Augment配置中添加:
Claude Desktop
打开Claude Desktop配置文件:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
添加MCP服务器配置:
Cline (Claude in VSCode)
在VSCode的Cline扩展设置中添加:
Codex (GitHub Copilot)
在GitHub Copilot配置中添加:
Cursor AI
在Cursor设置中添加:
Roo (Roo.dev)
在Roo配置文件中添加:
Trae AI
在Trae配置中添加:
VSCode (with MCP extension)
在VSCode的settings.json中添加:
Windsurf
在Windsurf配置中添加:
📋 配置文件设置
创建配置文件
在项目根目录创建 mcp-validator.json:
🧪 验证安装
测试MCP服务器
测试工具功能
🔍 使用示例
基本验证
实时监控
🛠️ 故障排除
常见问题
命令未找到
# 确保全局安装 npm install -g mcp-interface-validator # 或使用npx npx mcp-interface-validator --version权限错误
# Windows (以管理员身份运行) npm install -g mcp-interface-validator # macOS/Linux sudo npm install -g mcp-interface-validator配置文件未找到
# 创建默认配置 mcp-interface-validator init
调试模式
📊 性能优化
大型项目配置
🔐 安全配置
生产环境
📈 监控和日志
日志配置
🚀 生产部署
Docker部署
系统服务
🎯 Usage
Basic Usage
Activate Smart Constraints: Add
.use interfaceto your AI promptsDescribe Requirements: Normally describe your development needs
Automatic Validation: System automatically injects interface validation constraints
Get Results: Receive code that complies with OpenAPI specifications
Example Scenarios
User Management System:
Product Management Module:
Order Processing System:
🔧 Advanced Configuration
Custom Constraint Rules
Create constraint-config.json file:
Multi-language Support
Supported command formats:
Chinese:
.use interface,.使用接口English:
.use interface,.apply constraints
📚 Documentation Links
🌟 Key Advantages
Zero Configuration Startup - Ready to use after installation, no complex configuration needed
Smart Recognition - Automatically recognize interface validation requirements
Real-time Feedback - Instant interface consistency checking
Cross-platform Support - Full support for Windows, macOS, Linux
Open Source & Free - MIT license, completely open source
🤝 Contributing
Issues and Pull Requests are welcome!
📄 License
MIT License - See LICENSE file for details