An MCP (Model Context Protocol) server that standardizes and binds specific patterns for development tools, enabling Claude Code to generate code more efficiently with fewer errors and better autocorrection capabilities.
Alpha - This project is in early development and actively evolving.
🎯 Current Priority: Enhanced Go Language Support - Go development toolchain integration is the highest priority feature. We're building comprehensive support for Go testing, building, linting, and formatting to make this the best DevTools server for Go development.
This MCP server creates a standardized interface between development tools and AI assistants like Claude Code. By establishing consistent patterns and best practices, it helps:
- Reduce code generation errors
- Enable better autocorrection of common issues
- Standardize development workflows
- Improve efficiency when working with Claude Code
- make_lint - Run
make lintwith optional directory and target specification - make_test - Run
make testwith optional test patterns/targets - make_depend - Run
make dependor equivalent dependency installation - make_build - Run
make buildormake all - make_clean - Run
make clean
- go_test - Run Go tests with coverage and race detection
- go_build - Build Go packages with custom flags and tags
- go_fmt - Format Go code using gofmt
- go_lint - Lint Go code using golangci-lint
- go_vet - Examine Go source code for suspicious constructs
- go_mod_tidy - Tidy Go module dependencies
- markdownlint - Run markdownlint on markdown files
- yamllint - Run yamllint on YAML files
- eslint - Run ESLint on JavaScript/TypeScript files
- lint_all - Run all available linters based on project type
- run_tests - Run tests using the detected test framework
- project_status - Get overall project health (lint + test summary)
- test_status - Get project test status and recommendations
-
ensure_newline - Validate and fix POSIX newline compliance
Ensures text files end with a proper newline character, as required by POSIX standards. This addresses a common pain point where AI coding assistants frequently create or modify files without proper trailing newlines, causing linting failures and git diff noise.
Modes:
check- Report files without trailing newlines (read-only, non-destructive)fix- Automatically add missing newlines to files (safe, preserves line ending style)validate- Exit with error if non-compliant files found (CI/CD mode)
Key Features:
- Pure Node.js implementation using Buffer operations (no shell commands like
tailorod) - Cross-platform compatibility (Windows, macOS, Linux)
- Smart line ending detection - automatically detects and preserves LF vs CRLF style
- Binary file detection and automatic skipping
- Configurable file size limits for safety
- Flexible glob pattern support for file selection
- Exclusion patterns for node_modules, build artifacts, etc.
Why This Matters:
- POSIX Compliance: Text files should end with a newline character per POSIX definition
- Linting: Many linters (ESLint, markdownlint, golangci-lint) enforce trailing newlines
- Git Diffs: Missing newlines create "No newline at end of file" warnings
- AI Assistants: Common issue when AI tools generate or modify files
- Input sanitization to prevent command injection
- Allowlist of permitted commands and arguments
- Working directory validation (must be within project boundaries)
- Timeout protection for long-running commands
- Auto-detect project type (Node.js, Python, Go, Rust, Java, .NET)
- Locate Makefiles and configuration files
- Suggest relevant tools based on project structure
- Extract available make targets
- Node.js 18+
- TypeScript
- Go 1.19+ (for Go language support - PRIORITY)
- Make (for make-based commands)
- Go tools:
golangci-lint,staticcheck(for enhanced Go support) - Project-specific tools (eslint, markdownlint, yamllint, etc.)
- Clone the repository:
git clone https://github.com/rshade/mcp-devtools-server.git
cd mcp-devtools-server- Install dependencies:
npm install- Build the project:
npm run build- Start the server:
npm start# Run in development mode
npm run dev
# Run linting
npm run lint
# Run tests
npm test
# Clean build artifacts
npm run clean-
Build the project first:
npm run build
-
Add to your Claude Desktop configuration file (
~/.claude/claude_desktop_config.json):{ "mcpServers": { "mcp-devtools-server": { "command": "node", "args": ["/absolute/path/to/mcp-devtools-server/dist/index.js"], "env": { "LOG_LEVEL": "info" } }, "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } } }Replace
/absolute/path/to/mcp-devtools-serverwith your actual project path. -
Example configuration files:
- See
examples/claude-desktop-config.jsonfor a complete example - The
.mcp.jsonfile in the project root is a template you can copy
- See
-
Restart Claude Desktop after updating the configuration.
Create a .mcp-devtools.json file in your project root:
{
"commands": {
"lint": "make lint",
"test": "make test",
"build": "make build",
"clean": "make clean"
},
"linters": ["eslint", "markdownlint", "yamllint"],
"testRunner": "jest",
"timeout": 300000
}// Run make lint
await callTool('make_lint', {});
// Run make test with specific target
await callTool('make_test', { target: 'unit-tests' });
// Run all linters
await callTool('lint_all', { fix: true });
// Get project status
await callTool('project_status', {});// Run Go tests with coverage and race detection
await callTool('go_test', {
coverage: true,
race: true,
verbose: true
});
// Build Go application with specific tags
await callTool('go_build', {
tags: ["integration", "postgres"],
verbose: true
});
// Format Go code
await callTool('go_fmt', {
write: true,
simplify: true
});
// Lint Go code with custom config
await callTool('go_lint', {
config: ".golangci.yml",
fix: true
});
// Vet Go code for issues
await callTool('go_vet', { package: "./..." });
// Tidy Go modules
await callTool('go_mod_tidy', { verbose: true });// Check all TypeScript and JavaScript files for missing newlines
await callTool('ensure_newline', {
patterns: ['src/**/*.ts', 'src/**/*.js'],
mode: 'check',
exclude: ['node_modules/**', 'dist/**']
});
// Fix all markdown files (automatically adds trailing newlines)
await callTool('ensure_newline', {
patterns: ['**/*.md'],
mode: 'fix',
exclude: ['node_modules/**']
});
// Validate in CI/CD pipeline (exits with error if non-compliant)
await callTool('ensure_newline', {
patterns: ['**/*'],
mode: 'validate',
exclude: ['node_modules/**', '.git/**', 'dist/**', '*.min.js'],
maxFileSizeMB: 5
});
// Check specific file types only
await callTool('ensure_newline', {
patterns: ['**/*'],
fileTypes: ['*.ts', '*.go', '*.md', '*.json'],
mode: 'check'
});
// Fix files after AI code generation
await callTool('ensure_newline', {
patterns: ['src/**/*.ts', 'test/**/*.ts'],
mode: 'fix',
skipBinary: true // default: true
});// Run tests with coverage
await callTool('run_tests', {
coverage: true,
pattern: "*.test.js"
});
// Lint specific files
await callTool('markdownlint', {
files: ["README.md", "docs/*.md"],
fix: true
});
// Build with parallel jobs
await callTool('make_build', { parallel: 4 });Add EOL validation to your GitHub Actions workflow:
name: Lint
on: [push, pull_request]
jobs:
validate-eol:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install MCP DevTools Server
run: |
git clone https://github.com/rshade/mcp-devtools-server.git
cd mcp-devtools-server
npm install
npm run build
- name: Validate EOL compliance
run: |
# Use the ensure_newline tool in validate mode
# This will exit with error if any files lack trailing newlines
node mcp-devtools-server/dist/index.js ensure_newline \
--patterns "**/*.ts" "**/*.js" "**/*.md" \
--mode validate \
--exclude "node_modules/**" "dist/**"Add to your .git/hooks/pre-commit or use with Husky:
#!/bin/bash
# Automatically fix missing newlines before commit
npx mcp-devtools-server ensure_newline \
--patterns "**/*.ts" "**/*.js" "**/*.go" "**/*.md" \
--mode fix \
--exclude "node_modules/**" "vendor/**" "dist/**"
# Stage any files that were fixed
git add -u- Shell Executor - Secure command execution with validation
- Project Detector - Auto-detection of project type and configuration
- Tool Classes - Specialized handlers for make, lint, and test operations
- MCP Server - Main server implementation with tool registration
- Commands are validated against an allowlist
- Arguments are sanitized to prevent injection attacks
- Working directories are restricted to project boundaries
- All operations have configurable timeouts
Each tool uses JSON Schema for input validation:
{
directory?: string; // Working directory
args?: string[]; // Additional arguments
// Tool-specific options...
}The server provides comprehensive error handling with:
- Structured error responses
- Helpful suggestions for common failures
- Exit code interpretation
- Tool availability checking
Contributions are welcome! This project is built on continuous learning and improvement.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run linting and tests
- Submit a pull request
- Better development patterns
- Error prevention strategies
- Workflow optimizations
- Tool integrations
- Documentation improvements
-
Command not found errors
- Ensure required tools are installed
- Check PATH environment variable
- Verify tool permissions
-
Permission denied
- Check file permissions in project directory
- Ensure write permissions for build outputs
-
Timeout errors
- Increase timeout values in configuration
- Optimize slow operations
- Check system resources
-
EOL/Newline validation issues
- Files created by AI often miss trailing newlines
- Use
ensure_newlinewithmode: 'fix'to automatically correct - Binary files are automatically skipped - check file encoding if issues persist
- CRLF vs LF is automatically detected and preserved
- Use
validatemode in CI/CD to catch issues before commit
Enable debug logging:
LOG_LEVEL=debug npm startThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.
This project represents an ongoing effort to improve the developer experience when working with AI-powered coding assistants. All feedback and contributions help shape better development practices for the community.
Our development is organized into quarterly milestones with clear priorities:
- Enhanced Go language support (go_test, go_build, go_fmt, go_lint, go_vet, go_mod_tidy)
- POSIX newline compliance validation (ensure_newline tool)
- Complete Go toolchain integration
- golangci-lint and staticcheck integration
- Go project analysis and recommendations
- Go-specific configuration options
- Extensible plugin architecture framework
- Intelligent caching system (10x performance improvement)
- Advanced telemetry and observability
- Resource management and concurrency control
- Event-driven architecture
- Zero-configuration onboarding wizard
- AI-powered smart suggestions and failure analysis
- Workflow templates and patterns
- Enhanced project discovery and analysis
- Integration ecosystem (VS Code, GitHub Actions)
- Team workspace management
- Shared configuration and standards enforcement
- Enterprise features (SSO, RBAC, audit logging)
- Advanced monitoring and compliance reporting
- Multi-tenant support
- Predictive analytics and failure prediction
- Auto-remediation and self-healing workflows
- Natural language interface ("Run the deployment checklist")
- Cross-project learning and global best practices
See our GitHub Issues and Milestones for detailed tracking and progress updates.