mcp-server-agent

r3habb99/mcp-server-agent

3.2

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.

Tools
  1. read-file

    Complete file system management with security validation.

  2. get-system-info

    Real-time system monitoring and diagnostics.

  3. execute-command

    Safe command execution with timeout protection.

  4. search-files

    Advanced search with regex support and AI-powered analysis.

  5. analyze-code

    Augment AI-powered development assistance.

Augment MCP Server

TypeScript Node.js MCP

โœ… 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

CategoryToolsDescription
๐Ÿ“ File Operationsread-file, write-file, copy-file, move-file, delete-file, create-directory, list-directoryComplete file system management with security validation
๐Ÿ’ป System Informationget-system-info, get-process-list, get-network-info, get-disk-usageReal-time system monitoring and diagnostics
โš™๏ธ Process Managementexecute-command, kill-process, get-process-infoSafe command execution with timeout protection
๐Ÿ” Search & Analysissearch-files, search-content, analyze-codeAdvanced search with regex support and AI-powered analysis
๐Ÿค– AI Integrationanalyze-code, review-code, explain-codeAugment AI-powered development assistance

๐Ÿ“š Dynamic Resources

Resource TypeURI PatternCapabilities
๐Ÿ“„ File Contentfile://{path}Direct file access with MIME type detection
๐Ÿ“‚ Directory Listingsdirectory://{path}Hierarchical directory browsing
๐Ÿ“Š System Metricssystem://status, system://processesLive system performance data
๐ŸŒ Network Infonetwork://interfaces, network://connectionsNetwork topology and connection status
โš™๏ธ Server Configconfig://current, config://capabilitiesRuntime configuration and feature status

๐Ÿ’ก AI-Powered Prompts

Prompt CategoryAvailable PromptsUse Cases
๐Ÿ” Code Reviewcode-reviewSecurity, performance, maintainability analysis
๐Ÿ“– Documentationgenerate-docsJSDoc, Markdown, API documentation generation
๐Ÿ› Debuggingdebug-code, explain-errorIssue diagnosis and resolution guidance
๐Ÿงช Testinggenerate-testsUnit test generation for multiple frameworks
๐Ÿ“‹ Analysisanalyze-file, project-overviewCode 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

ScriptCommandDescription
๐Ÿ—๏ธ Buildnpm run buildCompile TypeScript to JavaScript with type checking
๐Ÿš€ Startnpm startStart the production server
โšก Developmentnpm run devRun with hot reload and debug logging
๐Ÿงช Testnpm testRun comprehensive test suite
๐Ÿ‘€ Test Watchnpm run test:watchRun tests in watch mode for development
๐Ÿ” Lintnpm run lintCheck code quality with ESLint
๐Ÿ”ง Lint Fixnpm run lint:fixAuto-fix linting issues
๐Ÿงน Cleannpm run cleanRemove 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 LayerImplementationBenefits
๐Ÿšซ Path Traversal ProtectionComprehensive path validation and sanitizationPrevents unauthorized file system access
โฑ๏ธ Command Execution LimitsTimeout protection and command filteringPrevents system resource abuse
๐Ÿ“ File Size LimitsConfigurable maximum file sizesProtects against resource exhaustion
๐Ÿ“ Directory RestrictionsAllowlist/blocklist directory accessLimits scope of file operations
โœ… Input ValidationZod schema-based validationEnsures data integrity and type safety
๐Ÿšฆ Rate LimitingOptional request throttlingPrevents API abuse and DoS attacks

โšก Performance Optimizations

FeatureImplementationImpact
๐Ÿ—„๏ธ Intelligent CachingTTL-based caching with configurable size limitsReduces I/O operations and improves response times
๐Ÿ”„ Concurrency ControlConfigurable limits on parallel operationsPrevents resource contention and system overload
๐Ÿง  Memory ManagementAutomatic GC triggers and heap monitoringMaintains stable memory usage
๐Ÿ“ก Streaming SupportLarge file handling with streamsEnables processing of files larger than available RAM
๐Ÿ“Š Health MonitoringReal-time system health checksProactive performance issue detection

Troubleshooting

Common Issues

  1. Server won't start

    • Check Node.js version (18+ required)
    • Verify all dependencies are installed
    • Check log files for error details
  2. File operations fail

    • Verify file paths are within allowed directories
    • Check file permissions
    • Ensure file sizes are within limits
  3. Augment AI features not working

    • Verify AUGMENT_ENABLED=true
    • Check API endpoint configuration
    • Verify network connectivity

Debugging

Enable debug logging:

LOG_LEVEL=debug npm start

Check log files:

tail -f logs/combined.log
tail -f logs/error.log

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

๐ŸŽฏ Why Choose Augment MCP Server?

AdvantageDescriptionBenefit
๐Ÿ—๏ธ Clean ArchitectureDomain-organized TypeScript interfaces with single import pointEasy maintenance and development
๐Ÿ”’ Production SecurityEnterprise-grade security with comprehensive validationSafe for production environments
โšก High PerformanceIntelligent caching and resource managementScales with your needs
๐Ÿค– AI IntegrationBuilt-in Augment AI support for development workflowsEnhanced productivity
๐Ÿ”ง Highly ConfigurableExtensive feature flags and environment configurationAdapts to any use case
๐Ÿ“– Well DocumentedComprehensive documentation and examplesQuick onboarding

๐Ÿ“„ License

MIT License - see file for details.

๐Ÿ†˜ Support & Community

Getting Help

ResourceDescriptionLink
๐Ÿ“š DocumentationComplete setup and usage guides
๐Ÿ› IssuesBug reports and feature requestsGitHub Issues
๐Ÿ’ฌ DiscussionsCommunity support and questionsGitHub Discussions
๐Ÿ“– TroubleshootingCommon issues and solutionsSee 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