avalokkumar/now-refactor-mcp
If you are the rightful owner of now-refactor-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The ServiceNow Code Intelligence & Refactoring MCP is a server designed to enhance the development experience for ServiceNow developers by providing real-time code intelligence and refactoring suggestions.
GlideScript & Typescript Code Intelligence & Refactoring MCP
A Model Context Protocol (MCP) server that provides real-time code intelligence and refactoring suggestions for ServiceNow developers working with GlideScript (Server-side JS) and TypeScript (UI/Now Experience components).
Features
- Code Analysis Engine: Parse and analyze GlideScript and TypeScript files
- Anti-Pattern Detection: Identify common code smells and ServiceNow-specific anti-patterns
- Refactoring Suggestions: Generate before/after code snippets with explanations
- Performance Analysis: Detect performance bottlenecks like nested queries and inefficient loops
- Simple UI: Web interface for code upload and results visualization
- REST API: Backend endpoints for code analysis and refactoring
Getting Started
Prerequisites
- Node.js 18 or higher
- npm or yarn
Installation
npm install
Development
# Start development server
npm run dev
# Build project
npm run build
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint code
npm run lint
# Format code
npm run format
Project Structure
now-refactor-mcp/
├── src/ # Source code
│ ├── storage/ # Storage implementations (in-memory, file-based)
│ ├── parser/ # Code parsers for JS/TS
│ ├── rules/ # Rule engine and anti-pattern detectors
│ ├── refactor/ # Refactoring engine
│ ├── api/ # REST API
│ ├── server/ # MCP server
│ └── ui/ # Web UI components
├── tests/ # Test files
├── docs/ # Documentation
├── samples/ # Sample code for testing
└── templates/ # Refactoring templates
Documentation
Guides
- - Quick start guide for new users
- - Detailed usage instructions
- - Guide for extending the system
Architecture
- - Overview of project organization
- - Integration approach and architecture
Components
- - Storage layer documentation
- - MCP server documentation
- - REST API documentation
- - Web UI documentation
Technical Documentation
- - Rule engine documentation
- - Refactoring engine documentation
- - Parser documentation
- - Testing approach and guidelines
Resources
- - Sample code and templates
Testing
The project includes comprehensive testing:
- Unit tests for core components
- Integration tests for API endpoints
- End-to-end tests for complete workflows
Contributing
See the implementation plan in planning/code-intelligence-mcp/ for detailed development guidelines.
License
MIT