### Install, Build, and Run ACE MCP Server Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/START_HERE.md This snippet shows the necessary bash commands to install project dependencies, build the TypeScript project, and start the ACE MCP server. Ensure you are in the project directory before running these commands. ```bash # 1. Go to directory cd $HOME/code/perplexity/ace-mcp-server # 2. Install dependencies npm install # 3. Build project npm run build # 4. Test npm start ``` -------------------------------- ### Clone and Setup ACE MCP Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/README.md Instructions to clone the ACE MCP repository and set up initial configuration files. This involves cloning the Git repository, navigating into the directory, and copying an example environment file. ```bash git clone https://github.com/Angry-Robot-Deals/ace-mcp.git cd ace-mcp cp .env.example .env # Edit .env with your configuration ``` -------------------------------- ### Clone Repository and Setup Dev Environment (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/CONTRIBUTING.md Commands to clone the ACE MCP Server repository locally and set up the development environment using Docker Compose. This involves copying an example environment file, editing it with specific configurations, and starting the development services. ```bash git clone https://github.com/YOUR_USERNAME/ace-mcp.git cd ace-mcp cp .env.example .env # Edit .env with your configuration docker-compose -f docker-compose.dev.yml up -d ``` -------------------------------- ### Run ACE MCP Server Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INSTALLATION.md Starts the ACE MCP Server. Can be run directly using 'npm start' for production or 'npm run dev' for development mode. ```bash # Test standalone npm start # Or in development mode npm run dev ``` -------------------------------- ### Install Dependencies and Build Project Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DESCRIPTION.md These commands are essential for setting up the project environment. 'npm install' downloads and installs all the necessary Node.js packages, while 'npm run build' compiles the source code, typically TypeScript, into executable JavaScript. ```bash cd $HOME/code/perplexity/ace-mcp-server npm install npm run build ``` -------------------------------- ### Verify Dependencies Installed (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/ASSETS_CHECKLIST.md Confirms that the '@modelcontextprotocol/sdk' package has been successfully installed within the 'node_modules' directory. This is crucial for the project to function correctly. ```bash ls node_modules/@modelcontextprotocol/sdk # Should exist ``` -------------------------------- ### Manual Deployment: Start Services Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Starts the ACE MCP Server services using Docker Compose after the application has been extracted to the `/opt/ace-mcp-server` directory. This command runs the services in detached mode. ```bash cd /opt/ace-mcp-server docker-compose up -d ``` -------------------------------- ### Manual Deployment: Install Server Dependencies Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Installs essential dependencies on the production server, including Docker, Docker Compose, and Nginx. This is a prerequisite for running the ACE MCP Server in a manual deployment scenario. ```bash # Install Docker curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh # Install Docker Compose curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose # Install Nginx apt-get update apt-get install -y nginx ``` -------------------------------- ### Start Server with npm Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DESCRIPTION.md This command initiates the server process after it has been built. It relies on the package.json scripts to start the application. ```bash npm start ``` -------------------------------- ### Automated Production Deployment Script Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Executes an automated deployment script (`deploy.sh`) to handle the entire production deployment process. This includes verifying environment, building Docker images, creating a deployment package, uploading to the server, installing dependencies, configuring Nginx, and starting services. ```bash # Make script executable chmod +x deploy.sh # Run deployment ./deploy.sh ``` -------------------------------- ### Troubleshoot Services Won't Start Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Commands to diagnose and resolve issues where Ace MCP services fail to start. This includes checking Docker logs, verifying container status, and rebuilding Docker images. ```bash # Check logs docker-compose logs # Check Docker status docker ps -a # Rebuild images docker-compose up -d --build ``` -------------------------------- ### Install Project Dependencies (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INITIALIZATION_REPORT.md Installs necessary project dependencies for the ace-mcp-server, including production and development packages. It navigates to the project directory and uses npm to manage packages. ```bash cd $HOME/code/perplexity/ace-mcp-server npm install openai axios zod npm install -D @types/axios jest ts-jest @types/jest ``` -------------------------------- ### Start ACE MCP Server with Docker Compose Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/setup/CURSOR_AI_SETUP.md This command initiates the ACE MCP server using Docker Compose in development mode. It requires the user to navigate to the server's directory first. Ensure Docker is installed and running. ```bash cd $HOME/code/perplexity/ace-mcp-server docker-compose -f docker-compose.dev.yml up -d ``` -------------------------------- ### Example Usage: Contextual Assistance (Command Prompt) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/setup/CURSOR_AI_AUTO_SETUP.md Shows how to leverage the `@ace_context_aware` command for contextual assistance in Cursor AI. The example demonstrates a query related to API optimization and the expected output from ACE. ```plaintext ``` @ace_context_aware how to optimize API for high load domain:api ``` ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INSTALLATION.md Installs project dependencies including @modelcontextprotocol/sdk, fs-extra, uuid, and TypeScript. This command should be run after navigating to the project directory. ```bash cd $HOME/code/perplexity/ace-mcp-server npm install ``` -------------------------------- ### View Server Resource Usage with htop Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Connects to the production server via SSH and launches 'htop' to monitor overall server resource utilization. ```bash ssh -i ~/.ssh/id_ed25519 root@$PRODUCTION_SERVER_IP \ 'htop' ``` -------------------------------- ### Configure LLM Providers using Factory (TypeScript) Source: https://context7.com/angry-robot-deals/ace-mcp/llms.txt This snippet demonstrates how to create and configure various Large Language Model (LLM) providers using the `createLLMProvider` factory function. It shows examples for DeepSeek, OpenAI, Anthropic Claude, Google Gemini, Mistral, and LM Studio (local). It also includes examples of how to use the configured providers for chat and embedding generation. ```typescript import { createLLMProvider } from './src/llm/factory'; // DeepSeek provider (recommended) const deepseek = createLLMProvider({ provider: 'deepseek', deepseek: { apiKey: 'sk-xxx', model: 'deepseek-chat', timeout: 30000, maxRetries: 3 } }); // OpenAI provider const openai = createLLMProvider({ provider: 'openai', openai: { apiKey: 'sk-xxx', model: 'gpt-4o', embeddingModel: 'text-embedding-3-small', timeout: 30000 } }); // Anthropic Claude provider const claude = createLLMProvider({ provider: 'anthropic', anthropic: { apiKey: 'sk-ant-xxx', model: 'claude-3-5-sonnet-20241022', maxTokens: 4096 } }); // Google Gemini provider const gemini = createLLMProvider({ provider: 'gemini', gemini: { apiKey: 'your-api-key', model: 'gemini-1.5-pro' } }); // Mistral provider const mistral = createLLMProvider({ provider: 'mistral', mistral: { apiKey: 'your-api-key', model: 'mistral-large-latest' } }); // LM Studio (local) const lmstudio = createLLMProvider({ provider: 'lmstudio', lmstudio: { baseUrl: 'http://localhost:1234/v1', model: 'local-model' } }); // Use provider const response = await deepseek.chat([ { role: 'system', content: 'You are a helpful coding assistant.' }, { role: 'user', content: 'Explain async/await in JavaScript' } ], { temperature: 0.7, maxTokens: 500 }); console.log('Response:', response); // Generate embeddings const embedding = await deepseek.embed('This is a sample text for embedding'); console.log('Embedding dimension:', embedding.length); ``` -------------------------------- ### Troubleshooting Build Failures Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INSTALLATION.md Steps to resolve build failures, including checking file integrity, verifying Node.js version, and performing a clean install/build cycle. ```bash # Verify Node.js version (should be >=18) node --version # Clean install and build rm -rf node_modules dist npm install npm run build ``` -------------------------------- ### Install ACE MCP Server Dependencies Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/setup/CURSOR_AI_SETUP.md These commands install necessary Node.js dependencies for the ACE MCP project, including the `tsx` runtime for TypeScript execution and project-specific packages. Run these in the project's root directory. ```bash # In project directory npm install -g tsx npm install ``` -------------------------------- ### Install Project Dependencies (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/PROJECT_STATUS.md This bash script outlines the commands to install project dependencies for the ACE MCP Server. It includes installing core packages like `openai`, `axios`, and `zod`, as well as development dependencies for testing such as `jest` and `ts-jest`. ```bash # 1. Install dependencies cd $HOME/code/perplexity/ace-mcp-server npm install openai axios zod npm install -D @types/axios jest ts-jest @types/jest # 2. Create structure mkdir -p src/llm src/llm/__tests__ mkdir -p src/core src/mcp src/storage src/utils # 3. Start Phase 2 # Create src/llm/provider.ts (interface) ``` -------------------------------- ### Install NPM Dependencies for ACE MCP Server Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DESCRIPTION.md This command installs all the necessary Node Package Manager (NPM) dependencies required to run the ACE MCP server. It reads the dependencies listed in the 'package.json' file and downloads them into the 'node_modules' directory. ```bash npm install ``` -------------------------------- ### Start Enhanced MCP Server (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/setup/CURSOR_AI_AUTO_SETUP.md These bash commands are used to stop the old MCP server and start the enhanced ACE MCP server. It involves navigating to the server directory and executing the enhanced server script. ```bash cd $HOME/code/perplexity/ace-mcp-server # Stop old server pkill -f "mcp-server-simple" # Start enhanced server npx tsx src/mcp-server-enhanced.ts ``` -------------------------------- ### Example Usage: Prompt Enhancement (Command Prompt) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/setup/CURSOR_AI_AUTO_SETUP.md Demonstrates the usage of the `@ace_enhance_prompt` command in Cursor AI for improving complex requests. The example shows how ACE adds security considerations and best practices to a prompt for creating a REST API. ```plaintext ``` @ace_enhance_prompt create REST API for users focus_area:security ``` ``` -------------------------------- ### Build TypeScript Project Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INSTALLATION.md Compiles TypeScript source files into JavaScript, outputting the compiled code to the 'dist/' directory. This is a crucial step before running the server. ```bash npm run build ``` -------------------------------- ### Docker Compose Override for LLM Provider Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/LLM_PROVIDERS.md An example of overriding service environment variables in a Docker Compose setup to configure the LLM provider and API key for the ACE server. It specifies the provider, API key, and model for DeepSeek. ```yaml # docker-compose.override.yml services: ace-server: environment: - LLM_PROVIDER=deepseek - DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY} - DEEPSEEK_MODEL=deepseek-reasoner # Use thinking mode ``` -------------------------------- ### Environment Variable Configuration Example (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INITIALIZATION_REPORT.md Illustrates environment variable settings for LLM provider configuration. This approach aligns with 12-factor app methodology and is Docker-friendly, enabling type-safe validation through tools like Zod. It specifies the active LLM provider and its corresponding API keys or base URLs. ```bash LLM_PROVIDER=openai|lmstudio OPENAI_API_KEY=sk-... LMSTUDIO_BASE_URL=http://10.242.247.136:11888/v1 ``` -------------------------------- ### Initialize and Push GitHub Repository (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/GITHUB_INITIALIZATION.md Commands executed to initialize a new Git repository, stage all files, create the initial commit, rename the branch to main, add a remote origin, and push the branch to GitHub. This assumes a specific SSH configuration for the remote. ```bash git init git add . git commit -m "first commit: ..." git branch -M main git remote add origin git@github-ard:... git push -u origin main ``` -------------------------------- ### Check .env File and Required Variables (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/deployment/DEPLOYMENT_README.md This snippet demonstrates how to check the contents of the `.env` file to troubleshoot missing environment variables during deployment. It also lists the critical variables that must be set for the application to function correctly, such as API credentials and server details. Ensure all listed variables are present and correctly configured in your `.env` file. ```bash # Check .env file cat .env # Verify required variables are set: # - API_BEARER_TOKEN # - PRODUCTION_SERVER_IP # - PRODUCTION_DOMAIN # - LLM_PROVIDER and its credentials ``` -------------------------------- ### Verify Configuration Valid (Node.js/Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/ASSETS_CHECKLIST.md Executes the built JavaScript code to ensure it initializes without runtime errors. This verifies the project's configuration and basic functionality. Use Ctrl+C to exit. ```bash node -e "require('./dist/index.js')" # Should start without errors (Ctrl+C to exit) ``` -------------------------------- ### Environment Variables for Multi-Provider Setup Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/LLM_PROVIDERS.md Configures primary and fallback LLM providers using environment variables. This setup allows specifying an API key for the main provider and another for fallback embeddings if the primary doesn't support them. ```env # Primary provider for most tasks LLM_PROVIDER=deepseek DEEPSEEK_API_KEY=sk-xxx # Fallback for embeddings (if primary doesn't support) OPENAI_API_KEY=sk-xxx OPENAI_EMBEDDING_MODEL=text-embedding-3-small ``` -------------------------------- ### Configure OpenAI LLM Provider Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/LLM_PROVIDERS.md Environment variables for configuring the OpenAI LLM provider. This setup includes specifying the provider, API key, the chat model, and the embedding model. ```env LLM_PROVIDER=openai OPENAI_API_KEY=sk-your-api-key-here OPENAI_MODEL=gpt-4o OPENAI_EMBEDDING_MODEL=text-embedding-3-small ``` -------------------------------- ### npm Dependency Installation for LLM Features (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INITIALIZATION_REPORT.md Lists the npm packages required to implement the LLM provider abstraction and related functionalities. This includes core libraries like 'openai', 'axios', and 'zod', as well as development dependencies for testing ('jest', 'ts-jest') and TypeScript support. ```bash npm install openai axios zod npm install -D @types/axios jest ts-jest @types/jest ``` -------------------------------- ### Docker Development Environment for ACE MCP Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/README.md Commands to manage the Docker development environment for ACE MCP. This includes starting, viewing logs, and stopping the containerized development setup using Docker Compose. ```bash # Start development environment docker-compose -f docker-compose.dev.yml up -d # View logs docker-compose -f docker-compose.dev.yml logs -f # Stop environment docker-compose -f docker-compose.dev.yml down ``` -------------------------------- ### Manual Deployment: Prepare Deployment Package Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Manually prepares the ACE MCP Server for deployment by building Docker images, creating a deployment directory, copying necessary files, and packaging them into a compressed archive (`.tar.gz`). ```bash # Build Docker images docker-compose build # Create deployment directory mkdir -p deploy-package cp -r src dashboard package*.json tsconfig.json docker-compose.yml Dockerfile .env deploy-package/ # Create archive tar -czf ace-mcp-deploy.tar.gz deploy-package/ ``` -------------------------------- ### Configure LM Studio Local LLM Provider Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/LLM_PROVIDERS.md Environment variables for configuring LM Studio as a local LLM provider. This setup uses a local base URL and specifies the model to be loaded by LM Studio. ```env LLM_PROVIDER=lmstudio LMSTUDIO_BASE_URL=http://localhost:1234/v1 LMSTUDIO_MODEL=your-local-model ``` -------------------------------- ### Troubleshooting Build Errors Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/START_HERE.md This bash script provides a common solution for build errors in the ACE MCP Server project. It involves removing the existing node modules and build artifacts, then reinstalling dependencies and rebuilding the project. ```bash # Delete and reinstall rm -rf node_modules dist npm install npm run build ``` -------------------------------- ### Create Project Directory Structure (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/INITIALIZATION_REPORT.md Creates the necessary directory structure for implementing LLM providers and their associated tests within the ace-mcp-server project. ```bash mkdir -p src/llm src/llm/__tests__ ``` -------------------------------- ### Troubleshooting API Key Format Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/LLM_PROVIDERS.md Provides a bash command to check the format of an API key, specifically for DeepSeek. It echoes the API key and displays the first 10 characters to verify it starts with 'sk-', which is the expected format. ```bash # Check your API key format echo $DEEPSEEK_API_KEY | head -c 10 # Should start with 'sk-' ``` -------------------------------- ### Performance Tuning with DeepSeek Model and Timeout Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/LLM_PROVIDERS.md Configures DeepSeek LLM provider for performance tuning. Examples show how to set the model to 'deepseek-chat' for faster responses or 'deepseek-reasoner' for better reasoning, along with adjusting the timeout values accordingly. ```env # For faster responses DEEPSEEK_MODEL=deepseek-chat DEEPSEEK_TIMEOUT=30000 # For better reasoning (slower) DEEPSEEK_MODEL=deepseek-reasoner DEEPSEEK_TIMEOUT=120000 ``` -------------------------------- ### Cursor AI Configuration for ACE MCP Server Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/START_HERE.md This JSON configuration is used to set up the ACE MCP server within Cursor AI. It specifies the command to run the server, its arguments, and environment variables required for its operation. Remember to restart Cursor AI after updating this configuration. ```json { "mcpServers": { "ace-context-engine": { "command": "node", "args": ["$HOME/code/perplexity/ace-mcp-server/dist/index.js"], "env": { "ACE_CONTEXT_DIR": "$HOME/code/perplexity/ace-mcp-server/contexts", "ACE_LOG_LEVEL": "info", "ACE_DEDUP_THRESHOLD": "0.85" } } } } ``` -------------------------------- ### Verify Cursor Configuration Exists (Bash) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/ASSETS_CHECKLIST.md Confirms that the necessary ACE context engine configuration is present in the Cursor AI user configuration file. This is required for integrating ACE with Cursor. ```bash cat ~/.cursor/mcp.json | grep ace-context-engine # Should show configuration ``` -------------------------------- ### Install Dependencies (npm) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/PROJECT_STATUS.md Installs project dependencies for Ace MCP, including runtime libraries like 'openai', 'axios', 'zod', and development dependencies for testing with Jest and TypeScript. ```bash npm install openai axios zod npm install -D jest ts-jest @types/jest @types/axios ``` -------------------------------- ### Configure Production Environment Variables Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Sets up the `.env` file for production deployment. This includes critical settings such as the API bearer token, LLM provider and API key, Node environment, log level, and server IP/domain. Ensure sensitive information like API keys are kept secure. ```bash # Copy example cp .env.example .env # Edit with your settings nano .env ``` -------------------------------- ### Build and Run ACE MCP Server with Direct Docker Commands Source: https://context7.com/angry-robot-deals/ace-mcp/llms.txt This section details how to build and run the ACE MCP server using direct Docker commands, bypassing Docker Compose. It includes steps for building the Docker image, running the container with specific environment variables and volume mounts, creating necessary volumes, viewing logs, executing commands within the container, and stopping/removing the container and volumes. ```bash # Build Docker image docker build -t ace-mcp-server:latest . # Run with environment variables docker run -d \ --name ace-mcp-server \ -p 34301:34301 \ -e LLM_PROVIDER=deepseek \ -e DEEPSEEK_API_KEY=sk-your-key \ -e DEEPSEEK_MODEL=deepseek-chat \ -e API_BEARER_TOKEN=your-secure-token \ -e ACE_SERVER_PORT=34301 \ -e ACE_MAX_PLAYBOOK_SIZE=1000 \ -v ace_contexts:/app/contexts \ -v ace_logs:/app/logs \ ace-mcp-server:latest # Create volumes first docker volume create ace_contexts docker volume create ace_logs # View logs docker logs -f ace-mcp-server # Execute test suite in container docker exec ace-mcp-server npm test docker exec ace-mcp-server node test-server.mjs # Stop and remove docker stop ace-mcp-server docker rm ace-mcp-server # Clean up volumes docker volume rm ace_contexts ace_logs ``` -------------------------------- ### Example Usage: Smart Code Analysis (TypeScript) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/setup/CURSOR_AI_AUTO_SETUP.md Illustrates the use of the `@ace_smart_reflect` command for analyzing code within Cursor AI. It provides a TypeScript function example and describes the types of feedback ACE offers. ```plaintext ``` @ace_smart_reflect ```typescript function quickSort(arr) { if (arr.length <= 1) return arr; const pivot = arr[0]; const left = arr.slice(1).filter(x => x < pivot); const right = arr.slice(1).filter(x => x >= pivot); return [...quickSort(left), pivot, ...quickSort(right)]; } ``` ``` -------------------------------- ### Enable Nginx Site and Reload Configuration Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DEPLOYMENT.md Commands to enable the Nginx site configuration, disable the default site, test Nginx configuration syntax, and reload the Nginx service to apply changes. ```bash ln -sf /etc/nginx/sites-available/ace-mcp /etc/nginx/sites-enabled/ rm -f /etc/nginx/sites-enabled/default nginx -t systemctl reload nginx ``` -------------------------------- ### Deploy ACE MCP Server with Docker Compose (Production) Source: https://context7.com/angry-robot-deals/ace-mcp/llms.txt This section provides instructions for deploying the ACE MCP Server and dashboard using Docker Compose in a production environment. It covers cloning the repository, configuring environment variables (including LLM provider and API keys), starting and stopping services, viewing logs, checking status, and rebuilding services. ```bash # Clone repository git clone https://github.com/Angry-Robot-Deals/ace-mcp.git cd ace-mcp # Configure environment cp .env.example .env nano .env # Set LLM_PROVIDER, API keys, and tokens # Start services docker-compose up -d # View logs docker-compose logs -f ace-server docker-compose logs -f ace-dashboard # Check status curl http://localhost:34301/health curl http://localhost:34300 # Dashboard # Stop services docker-compose down # Rebuild services docker-compose build --no-cache docker-compose up -d ``` -------------------------------- ### TypeScript: ACE Structured Bullet Example Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/intro/DESCRIPTION.md An example of a structured bullet object used within the ACE framework. This format is more compact and efficient than plain text prose, leading to reduced storage requirements and faster processing. ```typescript { id: "b001", content: "Use Zod for API validation", helpful_count: 12 } // ~100 bytes vs 1000+ byte prose ``` -------------------------------- ### Run ACE MCP Development Environment with Docker Compose Source: https://context7.com/angry-robot-deals/ace-mcp/llms.txt Instructions for running the ACE MCP development environment using Docker Compose, which includes live reloading. This covers starting the environment, viewing live logs, executing commands within the container (e.g., running tests), and stopping the development environment. ```bash # Start development environment docker-compose -f docker-compose.dev.yml up -d # View live logs docker-compose -f docker-compose.dev.yml logs -f # Execute commands in container docker-compose -f docker-compose.dev.yml exec ace-server npm test # Stop development environment docker-compose -f docker-compose.dev.yml down ``` -------------------------------- ### Example Usage: Smart Code Generation (Command Prompt) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/setup/CURSOR_AI_AUTO_SETUP.md Demonstrates how to use the `@ace_smart_generate` command for creating code in Cursor AI. It shows the difference between a regular request and an enhanced request, highlighting the automatic improvements ACE provides. ```plaintext Instead of a regular request: ``` Create a function to sort an array ``` Use: ``` @ace_smart_generate create a function to sort an array ``` ``` -------------------------------- ### Read Main Rule and Tasks Files Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/custom_modes/plan_instructions.md This code snippet demonstrates how to read the main rule file and the tasks file. It utilizes a 'read_file' function, specifying the target file paths and indicating that the entire file content should be read. This is a foundational step in the planning mode. ```javascript read_file({ target_file: ".cursor/rules/isolation_rules/main.mdc", should_read_entire_file: true }) read_file({ target_file: "tasks.md", should_read_entire_file: true }) ``` -------------------------------- ### Describe Test Cases (TypeScript) Source: https://github.com/angry-robot-deals/ace-mcp/blob/main/docs/CONTRIBUTING.md Example of how to structure test cases in TypeScript using `describe` and `it` blocks. Demonstrates best practices for naming test suites and individual tests, including handling specific scenarios like adding bullets to sections and managing empty playbooks. ```typescript describe('Playbook', () => { it('should add bullet to correct section', () => { // test implementation }); it('should handle empty playbook gracefully', () => { // test implementation }); }); ```