r3habb99/mcp-server-agent
If you are the rightful owner of mcp-server-agent and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Augment MCP Server is a production-ready Model Context Protocol server designed for seamless integration with AI assistants, offering a robust TypeScript architecture and enterprise-grade security.
read-file
Complete file system management with security validation.
get-system-info
Real-time system monitoring and diagnostics.
execute-command
Safe command execution with timeout protection.
search-files
Advanced search with regex support and AI-powered analysis.
analyze-code
Augment AI-powered development assistance.
Augment MCP Server
โ Status: PRODUCTION READY
Fully functional and optimized MCP server with organized TypeScript architecture, comprehensive features, and enterprise-grade security. Ready for production use with Claude Desktop and other MCP clients.
๐ Quick Start
# Install dependencies and build
npm install && npm run build
# Run basic tests to verify functionality
npm test
# Start the server
npm start
๐ See for detailed Claude Desktop integration instructions.
๐ฏ Overview
A production-ready Model Context Protocol (MCP) server designed for seamless local system integration with AI assistants. Built with TypeScript and featuring a clean, organized architecture, this server provides comprehensive tools, resources, and AI-powered prompts for development workflows.
๐๏ธ Architecture Highlights
- ๐จ Clean TypeScript Architecture: Organized interfaces by domain for maximum maintainability
- ๐ Enterprise Security: Path traversal protection, input validation, and configurable access controls
- โก High Performance: Intelligent caching, concurrency limits, and memory management
- ๐งฉ Modular Design: Domain-specific services with clear separation of concerns
- ๐ง Highly Configurable: Feature flags, environment-based configuration, and runtime customization
๐ Features
๐ ๏ธ Comprehensive Tools Suite
Category | Tools | Description |
---|---|---|
๐ File Operations | read-file , write-file , copy-file , move-file , delete-file , create-directory , list-directory | Complete file system management with security validation |
๐ป System Information | get-system-info , get-process-list , get-network-info , get-disk-usage | Real-time system monitoring and diagnostics |
โ๏ธ Process Management | execute-command , kill-process , get-process-info | Safe command execution with timeout protection |
๐ Search & Analysis | search-files , search-content , analyze-code | Advanced search with regex support and AI-powered analysis |
๐ค AI Integration | analyze-code , review-code , explain-code | Augment AI-powered development assistance |
๐ Dynamic Resources
Resource Type | URI Pattern | Capabilities |
---|---|---|
๐ File Content | file://{path} | Direct file access with MIME type detection |
๐ Directory Listings | directory://{path} | Hierarchical directory browsing |
๐ System Metrics | system://status , system://processes | Live system performance data |
๐ Network Info | network://interfaces , network://connections | Network topology and connection status |
โ๏ธ Server Config | config://current , config://capabilities | Runtime configuration and feature status |
๐ก AI-Powered Prompts
Prompt Category | Available Prompts | Use Cases |
---|---|---|
๐ Code Review | code-review | Security, performance, maintainability analysis |
๐ Documentation | generate-docs | JSDoc, Markdown, API documentation generation |
๐ Debugging | debug-code , explain-error | Issue diagnosis and resolution guidance |
๐งช Testing | generate-tests | Unit test generation for multiple frameworks |
๐ Analysis | analyze-file , project-overview | Code quality and project structure analysis |
Installation
Prerequisites
- Node.js 18.0.0 or higher
- npm or yarn package manager
Install Dependencies
npm install
Build the Project
npm run build
Usage
Basic Usage
# Start the server
npm start
# Or run directly
node build/server/index.js
Development Mode
# Run with hot reload
npm run dev
Command Line Options
# Show help
augment-mcp-server --help
# Show version
augment-mcp-server --version
# Show current configuration
augment-mcp-server --config
Configuration
The server can be configured using environment variables:
Core Settings
# Logging
LOG_LEVEL=info # error, warn, info, debug
LOG_FILE=/path/to/logfile # Optional log file path
# Security
MAX_FILE_SIZE=104857600 # Maximum file size (100MB)
MAX_BATCH_SIZE=100 # Maximum batch operation size
COMMAND_TIMEOUT=30000 # Command timeout in milliseconds
ALLOWED_DIRECTORIES=.,./src # Comma-separated allowed directories
BLOCKED_DIRECTORIES=/etc,/usr # Comma-separated blocked directories
# Performance
CACHE_ENABLED=true # Enable caching
CACHE_TTL=300000 # Cache TTL in milliseconds
MAX_CONCURRENT_FILE_OPS=10 # Max concurrent file operations
MAX_CONCURRENT_SEARCHES=5 # Max concurrent searches
Augment AI Integration
AUGMENT_ENABLED=true # Enable Augment AI features
AUGMENT_API_ENDPOINT=http://localhost:8080 # Augment AI API endpoint
AUGMENT_API_KEY=your-api-key # API key (if required)
AUGMENT_MODEL=claude-3-sonnet # AI model to use
AUGMENT_MAX_TOKENS=4096 # Maximum tokens per request
AUGMENT_TEMPERATURE=0.7 # AI temperature setting
Feature Flags
# Core Features
FEATURE_FILE_OPERATIONS=true # Enable file operations
FEATURE_SYSTEM_INFO=true # Enable system information tools
FEATURE_PROCESS_MANAGEMENT=true # Enable process management
FEATURE_NETWORK_INFO=true # Enable network information
FEATURE_CODE_ANALYSIS=true # Enable code analysis tools
FEATURE_SEARCH_OPERATIONS=true # Enable search operations
# Resources
FEATURE_FILE_RESOURCES=true # Enable file resources
FEATURE_SYSTEM_RESOURCES=true # Enable system resources
FEATURE_LOG_RESOURCES=true # Enable log resources
# Prompts
FEATURE_CODE_REVIEW_PROMPTS=true # Enable code review prompts
FEATURE_DOCUMENTATION_PROMPTS=true # Enable documentation prompts
FEATURE_DEBUGGING_PROMPTS=true # Enable debugging prompts
# Experimental
EXPERIMENTAL_AI_INTEGRATION=false # Enable experimental AI features
EXPERIMENTAL_ADVANCED_ANALYTICS=false
EXPERIMENTAL_REAL_TIME_MONITORING=false
Integration with Claude Desktop
To use this server with Claude Desktop, add the following to your claude_desktop_config.json
:
macOS/Linux
{
"mcpServers": {
"augment-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/augment-mcp-server/build/server/index.js"],
"env": {
"LOG_LEVEL": "info",
"AUGMENT_ENABLED": "true"
}
}
}
}
Windows
{
"mcpServers": {
"augment-mcp-server": {
"command": "node",
"args": ["C:\\absolute\\path\\to\\augment-mcp-server\\build\\server\\index.js"],
"env": {
"LOG_LEVEL": "info",
"AUGMENT_ENABLED": "true"
}
}
}
}
Development
๐๏ธ Project Architecture
src/
โโโ ๐ฅ๏ธ server/ # Server implementation layer
โ โโโ index.ts # Main server entry point with graceful shutdown
โ โโโ config.ts # Environment-based configuration management
โ โโโ handlers/ # MCP protocol handlers
โ โโโ tools.ts # Tool implementations with validation
โ โโโ resources.ts # Resource providers with caching
โ โโโ prompts.ts # AI-powered prompt templates
โโโ ๐ง services/ # Business logic layer
โ โโโ fileService.ts # File system operations with security
โ โโโ systemService.ts # System information and monitoring
โ โโโ augmentService.ts # Augment AI integration service
โโโ ๐ฏ interfaces/ # Organized TypeScript interfaces
โ โโโ server/ # Server configuration interfaces
โ โโโ file/ # File operation interfaces
โ โโโ system/ # System information interfaces
โ โโโ mcp/ # MCP protocol interfaces
โ โโโ analysis/ # Code analysis interfaces
โ โโโ git/ # Git integration interfaces
โ โโโ index.ts # Central interface export hub
โโโ ๐ ๏ธ utils/ # Utility functions
โโโ logger.ts # Structured logging with Winston
โโโ validation.ts # Zod-based input validation schemas
๐จ Interface Organization
Our TypeScript interfaces are organized by domain for maximum maintainability:
// Single import point for all interfaces
import type {
ServerConfig, AugmentConfig, // Server configuration
FileInfo, SearchOptions, SearchResult, // File operations
SystemInfo, ProcessInfo, HealthCheck, // System information
ToolResult, ResourceContent, // MCP protocol
CodeAnalysisResult // Code analysis
} from '../interfaces/index.js';
Benefits:
- ๐ฏ Domain-specific organization - Related interfaces grouped together
- ๐ Single import point - All interfaces available from one central location
- ๐ Clear documentation - Each domain has specific purpose and examples
- ๐ง Easy maintenance - Add new interfaces to appropriate domain
- ๐ Better IDE support - Improved autocomplete and navigation
๐ง Development Scripts
Script | Command | Description |
---|---|---|
๐๏ธ Build | npm run build | Compile TypeScript to JavaScript with type checking |
๐ Start | npm start | Start the production server |
โก Development | npm run dev | Run with hot reload and debug logging |
๐งช Test | npm test | Run comprehensive test suite |
๐ Test Watch | npm run test:watch | Run tests in watch mode for development |
๐ Lint | npm run lint | Check code quality with ESLint |
๐ง Lint Fix | npm run lint:fix | Auto-fix linting issues |
๐งน Clean | npm run clean | Remove build artifacts |
# Development workflow
npm install # Install dependencies
npm run build # Build the project
npm test # Verify everything works
npm start # Start the server
Testing
# Run all tests
npm test
# Run tests with coverage
npm run test -- --coverage
# Run specific test file
npm test -- fileService.test.ts
# Run tests in watch mode
npm run test:watch
๐ Security & Performance
๐ก๏ธ Enterprise Security Features
Security Layer | Implementation | Benefits |
---|---|---|
๐ซ Path Traversal Protection | Comprehensive path validation and sanitization | Prevents unauthorized file system access |
โฑ๏ธ Command Execution Limits | Timeout protection and command filtering | Prevents system resource abuse |
๐ File Size Limits | Configurable maximum file sizes | Protects against resource exhaustion |
๐ Directory Restrictions | Allowlist/blocklist directory access | Limits scope of file operations |
โ Input Validation | Zod schema-based validation | Ensures data integrity and type safety |
๐ฆ Rate Limiting | Optional request throttling | Prevents API abuse and DoS attacks |
โก Performance Optimizations
Feature | Implementation | Impact |
---|---|---|
๐๏ธ Intelligent Caching | TTL-based caching with configurable size limits | Reduces I/O operations and improves response times |
๐ Concurrency Control | Configurable limits on parallel operations | Prevents resource contention and system overload |
๐ง Memory Management | Automatic GC triggers and heap monitoring | Maintains stable memory usage |
๐ก Streaming Support | Large file handling with streams | Enables processing of files larger than available RAM |
๐ Health Monitoring | Real-time system health checks | Proactive performance issue detection |
Troubleshooting
Common Issues
-
Server won't start
- Check Node.js version (18+ required)
- Verify all dependencies are installed
- Check log files for error details
-
File operations fail
- Verify file paths are within allowed directories
- Check file permissions
- Ensure file sizes are within limits
-
Augment AI features not working
- Verify
AUGMENT_ENABLED=true
- Check API endpoint configuration
- Verify network connectivity
- Verify
Debugging
Enable debug logging:
LOG_LEVEL=debug npm start
Check log files:
tail -f logs/combined.log
tail -f logs/error.log
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
๐ฏ Why Choose Augment MCP Server?
Advantage | Description | Benefit |
---|---|---|
๐๏ธ Clean Architecture | Domain-organized TypeScript interfaces with single import point | Easy maintenance and development |
๐ Production Security | Enterprise-grade security with comprehensive validation | Safe for production environments |
โก High Performance | Intelligent caching and resource management | Scales with your needs |
๐ค AI Integration | Built-in Augment AI support for development workflows | Enhanced productivity |
๐ง Highly Configurable | Extensive feature flags and environment configuration | Adapts to any use case |
๐ Well Documented | Comprehensive documentation and examples | Quick onboarding |
๐ License
MIT License - see file for details.
๐ Support & Community
Getting Help
Resource | Description | Link |
---|---|---|
๐ Documentation | Complete setup and usage guides | |
๐ Issues | Bug reports and feature requests | GitHub Issues |
๐ฌ Discussions | Community support and questions | GitHub Discussions |
๐ Troubleshooting | Common issues and solutions | See troubleshooting section above |
Contributing
We welcome contributions! Please see our for details on:
- ๐ง Setting up the development environment
- ๐งช Running tests and quality checks
- ๐ Documentation standards
- ๐ Submitting pull requests
๐ Changelog
v1.0.0 - Production Release ๐
๐๏ธ Architecture Improvements
- โจ Organized TypeScript Interfaces: Refactored monolithic types into domain-specific interface modules
- ๐ฏ Central Import System: Single entry point for all interfaces via
src/interfaces/index.ts
- ๐งน Clean Architecture: Removed redundant types directory, streamlined import structure
- ๐ Enhanced Documentation: Comprehensive interface documentation with usage examples
๐ Core Features
- ๐ ๏ธ Complete MCP Implementation: Full Model Context Protocol server with tools, resources, and prompts
- ๐ Advanced File Operations: Secure file system management with validation and safety checks
- ๐ป System Integration: Real-time system monitoring, process management, and network information
- ๐ค AI-Powered Development: Augment AI integration for code analysis, review, and documentation
- ๐ Smart Search: Advanced file and content search with regex support
๐ Security & Performance Enhancements
- ๐ก๏ธ Enterprise Security: Path traversal protection, input validation, and access controls
- โก Performance Optimizations: Intelligent caching, concurrency limits, and memory management
- ๐ Health Monitoring: Real-time system health checks and performance metrics
- ๐ง Configurable Features: Extensive feature flags and environment-based configuration
๐งช Quality Assurance
- โ Comprehensive Testing: Full test suite with unit and integration tests
- ๐ Code Quality: ESLint configuration with strict TypeScript checking
- ๐ Documentation: Complete README, setup guides, and API documentation
- ๐ Production Ready: Optimized build process and deployment scripts