ingeniux-cms-mcp-server
v1.0.28
Published
Production-ready Ingeniux CMS MCP server with OAuth, Roo integration, and modular architecture.
Maintainers
Readme
Ingeniux CMS MCP Server
A Model Context Protocol (MCP) server that provides programmatic access to Ingeniux CMS WebAPI v10.6.378 with OAuth authentication.
Features
- OAuth 2.0 Authentication: Secure authentication with PKCE support
- Modular Architecture: Clean separation of concerns with <500 line files
- Content Management: Tools for creating, updating, and managing CMS content
- Error Handling: Comprehensive error handling and validation
- Type Safety: Full TypeScript implementation with strict typing
- Configuration Management: Environment-based configuration with validation
Prerequisites
- Node.js >= 18.0.0
- TypeScript >= 5.0.0
- Access to Ingeniux CMS instance with OAuth configured
Installation
- Clone the repository:
git clone <repository-url>
cd ingeniux-cms-mcp-server- Install dependencies:
npm install- Copy environment configuration:
cp .env.example .env- Configure environment variables in
.env:
# Required
CMS_BASE_URL=https://your-cms-instance.com/api
OAUTH_CLIENT_ID=your_oauth_client_id
OAUTH_CLIENT_SECRET=your_oauth_client_secret
OAUTH_REDIRECT_URI=http://localhost:3000/callback
# Optional
API_TIMEOUT=30000
MAX_RETRIES=3
LOG_LEVEL=infoBuild
npm run buildUsage
Development Mode
npm run devProduction Mode
npm startAvailable Tools
Authentication
health_check- Check server health and authentication statusauth_status- Get current authentication statusinitiate_oauth- Start OAuth authentication flow
Content Management
cms_get_page- Retrieve a specific page by ID or pathcms_create_page- Create a new page in the CMScms_update_page- Update an existing pagecms_delete_page- Delete a page from the CMScms_list_pages- List pages with optional filteringcms_publish_page- Publish a page to make it livecms_search_content- Search for content in the CMS
Architecture
The server follows a modular architecture with clear separation of concerns:
src/
├── core/ # Core MCP server functionality
├── auth/ # OAuth authentication and token management
├── api/ # HTTP client and API integration
├── tools/ # MCP tool implementations
├── utils/ # Shared utilities and helpers
└── types/ # TypeScript type definitionsConfiguration
All configuration is managed through environment variables. See .env.example for all available options.
Required Variables
CMS_BASE_URL- Base URL for your Ingeniux CMS instanceOAUTH_CLIENT_ID- OAuth application client IDOAUTH_CLIENT_SECRET- OAuth application client secretOAUTH_REDIRECT_URI- OAuth callback URL
Optional Variables
API_TIMEOUT- Request timeout in milliseconds (default: 30000)MAX_RETRIES- Maximum retry attempts (default: 3)LOG_LEVEL- Logging level (default: 'info')CACHE_TTL- Cache time-to-live in seconds (default: 300)
Security
- OAuth 2.0 with PKCE for secure authentication
- Encrypted token storage with AES-256
- Input validation and sanitization
- Rate limiting and request throttling
- No hardcoded secrets or configuration values
Error Handling
The server implements comprehensive error handling:
- Authentication errors trigger re-authentication flow
- Network errors use exponential backoff retry
- Validation errors provide detailed feedback
- All errors are logged with context
Development
Project Structure
Each module is kept under 500 lines for maintainability. The codebase uses:
- TypeScript with strict typing
- Modular design patterns
- Environment-based configuration
- Comprehensive error handling
Adding New Tools
- Create tool implementation in
src/tools/ - Register tool in the appropriate tool class
- Add tool to the registry in
src/core/mcp-server.ts
Cursor Directory Publishing
This MCP server is ready for submission to cursor.directory with automated compliance validation and publishing workflow.
Publishing Workflow
The project includes a comprehensive publishing system in src/marketplace/cursor-directory/:
- Validators:
repository-validator.ts,mcp-compliance-validator.ts,documentation-validator.ts - Generators:
directory-entry-generator.ts,submission-pr-generator.ts,installation-guide-generator.ts - Orchestrator:
publishing-orchestrator.ts - Submitters:
cursor-directory-submitter.ts,github-api-client.ts
Submission Script Usage
Use scripts/submit-to-cursor-directory.ts for validation and submission:
Validation Only
# Validate project structure and compliance
bun run scripts/submit-to-cursor-directory.ts --validate-only
# Validate specific project path
bun run scripts/submit-to-cursor-directory.ts --validate-only --project-path /path/to/projectFull Submission
# Submit with GitHub token (environment variable)
GITHUB_TOKEN=your_token bun run scripts/submit-to-cursor-directory.ts
# Submit with explicit token
bun run scripts/submit-to-cursor-directory.ts --github-token your_token
# Dry run (simulate without creating PR)
bun run scripts/submit-to-cursor-directory.ts --dry-runAvailable Options
--validate-only- Run validation checks without submitting--project-path- Path to project directory (default: current directory)--github-token- GitHub token for API access (or useGITHUB_TOKENenv var)--dry-run- Simulate submission without creating actual PR--verbose- Enable verbose output--help- Show help message
Prerequisites for Submission
Before submitting to Cursor Directory, ensure:
- Built Project: Run
npm run buildto generatedist/index.js - Valid Package:
package.jsonwith required fields (name, description, repository, license) - Documentation: Complete
README.mdandLICENSEfiles - GitHub Repository: Public repository with proper URL in
package.json - GitHub Token: Personal access token with repo permissions for submission
Validation Process
The submission script validates:
- Repository Structure - Required files and build artifacts
- MCP Compliance - Protocol implementation and tool registration
- Documentation - README completeness and examples
- Entry Generation - Cursor Directory metadata creation
- Submission - Pull request creation to cursor.directory
Troubleshooting
Common Issues
Authentication Problems
- Error:
OAuth authentication failed- Solution: Verify your
OAUTH_CLIENT_ID,OAUTH_CLIENT_SECRET, andOAUTH_REDIRECT_URIin.env - Check: Ensure the OAuth app is properly configured in your Ingeniux CMS instance
- Solution: Verify your
Connection Issues
- Error:
Connection timeoutorECONNREFUSED- Solution: Check your
CMS_BASE_URLand ensure the CMS instance is accessible - Check: Verify network connectivity and firewall settings
- Solution: Check your
Build Errors
- Error: TypeScript compilation errors
- Solution: Run
npm installto ensure all dependencies are installed - Check: Verify Node.js version is >= 18.0.0
- Solution: Run
Runtime Errors
- Error:
Environment validation failed- Solution: Copy
.env.exampleto.envand configure all required variables - Check: Ensure all required environment variables are set
- Solution: Copy
Debug Mode
Enable debug logging by setting:
LOG_LEVEL=debugGetting Help
- Check the Issues page for known problems
- Review the error logs in the console output
- Verify your environment configuration matches the requirements
- For Ingeniux CMS specific issues, consult the official documentation
License
MIT License - see LICENSE file for details.
