JKEEPS/autonomous-ai-server
If you are the rightful owner of autonomous-ai-server 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 Autonomous AI Server is a comprehensive MCP server designed to provide autonomous AI capabilities with a wide range of tools for file system operations, web automation, Git integration, and multi-agent orchestration.
Autonomous AI Server
A comprehensive MCP (Model Context Protocol) server providing autonomous AI capabilities with extensive tooling for file system operations, web automation, Git integration, and multi-agent orchestration.
š Features
Core Capabilities
- Modular Architecture: Clean separation of concerns with dedicated tool modules
- Comprehensive File System Operations: Advanced file manipulation with pattern matching
- Web Automation: Browser automation, screenshot capture, and web scraping
- Git Integration: Full Git workflow support including branching and merging
- Multi-Agent Orchestration: Sophisticated task delegation and collaboration
- Performance Auditing: Lighthouse integration for accessibility and performance analysis
Tool Categories
š File System Tools
- Read/write files with directory creation
- Advanced file search with regex patterns
- Selective file editing with dry-run support
- File metadata and batch operations
- Directory management and file moving
š Web Tools
- HTML/JSON/text content fetching
- Screenshot capture with viewport control
- Accessibility and performance auditing
- DOM analysis and console log monitoring
- Network request tracking
š§ Git Tools
- Repository status and diff operations
- Commit, branch, and merge operations
- Remote repository management
- Stash operations and log viewing
- Repository initialization
š¦ Installation
Prerequisites
- Node.js 18+
- npm or yarn
- Git (for Git tools functionality)
- Chrome/Chromium (for web automation)
Setup
- Clone and install dependencies:
git clone <repository-url>
cd autonomous-ai-server
npm install
- Build the project:
npm run build
- Run the server:
npm start
# or for development
npm run dev
š ļø Development
Project Structure
autonomous-ai-server/
āāā src/
ā āāā tools/ # Modular tool implementations
ā ā āāā base-tool.ts # Base tool class with common functionality
ā ā āāā filesystem/ # File system operations
ā ā āāā web/ # Web automation and scraping
ā ā āāā git/ # Git repository management
ā ā āāā tool-registry.ts # Central tool registration
ā āāā server.ts # Main MCP server implementation
ā āāā resource-manager.ts # Resource management
ā āāā multiagent.ts # Multi-agent orchestration
ā āāā model-config.ts # AI model configuration
āāā tests/ # Test suites
āāā jest.config.js # Jest configuration
āāā tsconfig.json # TypeScript configuration
Available Scripts
# Development
npm run dev # Start development server
npm run build # Build TypeScript to JavaScript
npm run start # Start production server
# Testing
npm run test # Run test suite
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage report
# Code Quality
npm run lint # Run ESLint
npm run clean # Clean build directory
Running Tests
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
š§ Configuration
MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"autonomous-ai": {
"command": "node",
"args": ["path/to/autonomous-ai-server/dist/server.js"],
"cwd": "/your/working/directory"
}
}
}
Environment Variables
# Optional: Set working directory
WORKING_DIRECTORY=/path/to/your/workspace
# Optional: Configure browser for web tools
PUPPETEER_EXECUTABLE_PATH=/path/to/chrome
š API Reference
File System Tools
read_file
Read file content from the working directory.
{
"name": "read_file",
"arguments": {
"filepath": "src/example.ts"
}
}
write_file
Write content to a file with optional directory creation.
{
"name": "write_file",
"arguments": {
"filepath": "output/result.txt",
"content": "Hello, World!",
"create_dirs": true
}
}
search_files
Search for text patterns across files.
{
"name": "search_files",
"arguments": {
"pattern": "function.*export",
"path": "src",
"file_pattern": "*.ts",
"case_sensitive": false
}
}
Web Tools
fetch_html
Fetch website content as HTML.
{
"name": "fetch_html",
"arguments": {
"url": "https://example.com",
"headers": {
"User-Agent": "Custom Agent"
}
}
}
capture_screenshot
Capture website screenshots.
{
"name": "capture_screenshot",
"arguments": {
"url": "https://example.com",
"fullPage": true,
"viewport": {
"width": 1280,
"height": 720
}
}
}
run_accessibility_audit
Run Lighthouse accessibility audit.
{
"name": "run_accessibility_audit",
"arguments": {
"url": "https://example.com"
}
}
Git Tools
git_status
Get repository status.
{
"name": "git_status",
"arguments": {
"repo_path": "."
}
}
git_commit
Commit staged changes.
{
"name": "git_commit",
"arguments": {
"message": "Add new feature",
"repo_path": "."
}
}
git_create_branch
Create and switch to new branch.
{
"name": "git_create_branch",
"arguments": {
"branch_name": "feature/new-feature",
"start_point": "main"
}
}
š Security
Path Validation
- All file operations validate paths to prevent directory traversal
- Paths are restricted to the configured working directory
- Input sanitization for Git commands
Safe Execution
- Git commands use parameterized execution
- Web requests include timeout protection
- Browser automation runs in sandboxed environment
š¤ Contributing
Development Setup
- Fork and clone the repository
- Install dependencies:
npm install
- Create feature branch:
git checkout -b feature/amazing-feature
- Make changes and add tests
- Run tests:
npm test
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open Pull Request
Code Style
- Use TypeScript for all new code
- Follow existing code formatting
- Add tests for new functionality
- Update documentation as needed
Adding New Tools
- Create tool class extending
BaseTool
- Add to tool registry in
tool-registry.ts
- Write comprehensive tests
- Update API documentation
Example:
export class MyTool extends BaseTool {
async myMethod(args: { param: string }): Promise<ToolResult> {
try {
// Implementation
return this.createSuccessResult(result);
} catch (error) {
return this.handleError(error, 'My operation');
}
}
}
š License
MIT License - see file for details.
š Troubleshooting
Common Issues
TypeScript compilation errors:
npm run clean
npm install
npm run build
Puppeteer installation issues:
npm install puppeteer --force
Git command failures:
- Ensure Git is installed and accessible
- Check repository permissions
- Verify working directory is a Git repository
Web automation failures:
- Install Chrome/Chromium browser
- Check network connectivity
- Verify URL accessibility
Debug Mode
Enable verbose logging:
DEBUG=autonomous-ai:* npm run dev
š Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
Built with ā¤ļø for autonomous AI development