### Start Unified Server (Bash) Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Examples of starting the MCP unified server using the 'uvx' command. Includes basic usage, restricting tool search, SSE transport, Docker deployment, and debugging with MCP Inspector. ```bash export ACI_API_KEY="your_aci_api_key_here" # Basic usage (stdio transport) uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" ``` ```bash # Restrict tool search to apps explicitly allowed for this API key uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" \ --allowed-apps-only ``` ```bash # SSE transport for remote/HTTP clients uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" \ --transport sse \ --port 8080 ``` ```bash # Docker docker run --rm -i \ -e ACI_API_KEY=your_aci_api_key_here \ aci-mcp unified-server \ --linked-account-owner-id "user_123" ``` ```bash # Debug with MCP Inspector npx @modelcontextprotocol/inspector \ uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" ``` -------------------------------- ### Start ACI MCP Apps Server (stdio) Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Starts the apps-server with stdio transport, exposing tools from specified ACI.dev apps. Requires ACI_API_KEY and linked-account-owner-id. ```bash # Set your API key export ACI_API_KEY="your_aci_api_key_here" # Run via uvx (stdio transport — default, for Claude Desktop / Cursor) uvx aci-mcp apps-server \ --apps "BRAVE_SEARCH,GMAIL" \ --linked-account-owner-id "user_123" ``` -------------------------------- ### Start VibeOps Specialized MCP Server Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Starts a specialized MCP server for VibeOps workflows, targeting AI-assisted project scaffolding. It uses a separate API key and connects to a specific controller URL. ```bash export VIBEOPS_API_KEY="your_vibeops_api_key_here" # Start the vibeops server (stdio only, no transport options) uvx aci-mcp vibeops-server # The server exposes: # - GET_PROJECT_STATE: retrieves current GitLab, Vercel, and Supabase project state # and returns rich guidance on Next.js/TypeScript best practices. # - All dynamically fetched VibeOps functions from /v1/functions/search ``` -------------------------------- ### Start ACI MCP Apps Server (SSE) Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Starts the apps-server with SSE transport on a specified port, exposing tools from specified ACI.dev apps. Requires ACI_API_KEY and linked-account-owner-id. ```bash # Run with SSE transport (for network/HTTP clients) on port 9000 uvx aci-mcp apps-server \ --apps "BRAVE_SEARCH,GMAIL,GITHUB" \ --linked-account-owner-id "user_123" \ --transport sse \ --port 9000 ``` -------------------------------- ### Install uv Package Manager Source: https://github.com/aipotheosis-labs/aci-mcp/blob/main/README.md Installs the uv package manager, which is used to run MCP servers locally. Ensure you have pip installed. ```bash # Install uv if you don't have it already curl -sSf https://install.pypa.io/get-pip.py | python3 - pip install uv ``` -------------------------------- ### unified-server Command Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Starts an MCP server that exposes meta-tools for agents to discover and invoke functions on ACI.dev. ```APIDOC ## `unified-server` Command Starts an MCP server that exposes two meta-tools (`ACI_SEARCH_FUNCTIONS`, `ACI_EXECUTE_FUNCTION`) plus a documentation search tool (`ACI_SEARCH_DOCS`). This server is designed for agents that need to autonomously discover and invoke any function available on ACI.dev without being pre-configured with specific apps. ```bash export ACI_API_KEY="your_aci_api_key_here" # Basic usage (stdio transport) uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" # Restrict tool search to apps explicitly allowed for this API key uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" \ --allowed-apps-only # SSE transport for remote/HTTP clients uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" \ --transport sse \ --port 8080 # Docker docker run --rm -i \ -e ACI_API_KEY=your_aci_api_key_here \ aci-mcp unified-server \ --linked-account-owner-id "user_123" # Debug with MCP Inspector npx @modelcontextprotocol/inspector \ uvx aci-mcp unified-server \ --linked-account-owner-id "user_123" ``` ``` -------------------------------- ### ACI_EXECUTE_FUNCTION Tool Usage (Python) Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt This Python code illustrates the schema and example usage for the ACI_EXECUTE_FUNCTION tool. It enables agents to execute ACI.dev functions by name and arguments, supporting multi-user overrides. ```python # The tool is exposed to MCP clients as: # { # "name": "ACI_EXECUTE_FUNCTION", # "description": "Execute a function on ACI.dev by name.", # "inputSchema": { # "type": "object", # "properties": { # "function_name": { "type": "string" }, # "function_arguments": { "type": "object" } # }, # "required": ["function_name", "function_arguments"] # } # } # Example agent call (tools/call): # name: "ACI_EXECUTE_FUNCTION" # arguments: { # "function_name": "GMAIL__SEND_EMAIL", # "function_arguments": { # "to": "alice@example.com", # "subject": "Hello from ACI", # "body": "This email was sent by an AI agent via ACI MCP." # }, # "aci_override_linked_account_owner_id": "other_user_456" # optional multi-user override # } ``` -------------------------------- ### Run SSE Server with Starlette and Uvicorn Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Sets up an SSE server using SseServerTransport and integrates it with a Starlette application. Requires uvicorn to serve. ```python async def run_sse_async(server: Server, host: str, port: int): sse = SseServerTransport("/messages/") async def handle_sse(request): async with sse.connect_sse(request.scope, request.receive, request._send) as streams: await server.run(streams[0], streams[1], server.create_initialization_options()) starlette_app = Starlette( routes=[ Route("/sse", endpoint=handle_sse), Mount("/messages/", app=sse.handle_post_message), ], ) config = uvicorn.Config(starlette_app, host=host, port=port, log_level="debug") await uvicorn.Server(config).serve() ``` -------------------------------- ### Show ACI MCP CLI Help Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Displays all available commands for the aci-mcp CLI. Ensure the ACI_API_KEY environment variable is set before running. ```bash uvx aci-mcp --help ``` -------------------------------- ### Build and Run MCP Servers with Docker Source: https://github.com/aipotheosis-labs/aci-mcp/blob/main/README.md Builds the Docker image for aci-mcp and provides commands to run both the unified and apps MCP servers. Ensure you replace placeholders like and . ```bash # Build the image docker build -t aci-mcp . # Run the unified server docker run --rm -i -e ACI_API_KEY= aci-mcp unified-server --linked-account-owner-id # Run the apps server docker run --rm -i -e ACI_API_KEY= aci-mcp apps-server --apps --linked-account-owner-id ``` -------------------------------- ### Fetch Project State for VibeOps Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Fetches the current state of GitLab, Vercel, and Supabase deployments for an authenticated project. This tool is triggered by an MCP client calling tools/call with name="GET_PROJECT_STATE". ```python # Triggered by MCP client calling tools/call with name="GET_PROJECT_STATE" async with httpx.AsyncClient(base_url="https://controller.aci.dev") as client: response = await client.get( "/v1/projects/self", headers={"X-API-KEY": VIBEOPS_API_KEY}, ) project_states = response.json() # project_states structure: # { # "gitlab": { "resource": { "resource_config": { "name": "my-app", "project_access_token": "glpat-..." } } }, # "vercel": { ... }, # "supabase": { ... } # } # The tool returns a detailed prompt to the agent, including: # - Git remote command: # git remote add origin https://vibe:@gitlab.com/vibeops.infra-group/.git # - Full project state JSON for GitLab, Vercel, Supabase # - Next.js/TypeScript best practice guidelines (Shadcn UI, Radix, Tailwind, RSC patterns) # - Supabase Auth redirect URL setup snippet ``` -------------------------------- ### Claude Desktop Integration Configuration Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Configure ACI MCP servers in a Claude Desktop `claude_desktop_config.json` for seamless AI agent tool access. ```APIDOC ## Claude Desktop Integration (MCP Client Config) ### Description Configure ACI MCP servers in a Claude Desktop `claude_desktop_config.json` for seamless AI agent tool access. ### Configuration Example ```json { "mcpServers": { "aci-unified": { "command": "uvx", "args": [ "aci-mcp", "unified-server", "--linked-account-owner-id", "your_user_id" ], "env": { "ACI_API_KEY": "your_aci_api_key_here" } }, "aci-apps": { "command": "uvx", "args": [ "aci-mcp", "apps-server", "--apps", "BRAVE_SEARCH,GMAIL,GITHUB", "--linked-account-owner-id", "your_user_id" ], "env": { "ACI_API_KEY": "your_aci_api_key_here" } } } } ``` ``` -------------------------------- ### ACI-MCP CLI Help Source: https://github.com/aipotheosis-labs/aci-mcp/blob/main/README.md Displays the help message for the aci-mcp command-line interface, showing available commands and options. ```bash $ uvx aci-mcp --help Usage: aci-mcp [OPTIONS] COMMAND [ARGS]... Main entry point for the package. Options: --help Show this message and exit. Commands: apps-server Start the apps-specific MCP server to access tools... unified-server Start the unified MCP server with unlimited tool access. ``` -------------------------------- ### Debug MCP Servers with Inspector Source: https://github.com/aipotheosis-labs/aci-mcp/blob/main/README.md Launches the MCP inspector to debug the unified and apps MCP servers. Replace placeholders with your specific configuration. ```bash # For unified server npx @modelcontextprotocol/inspector uvx aci-mcp unified-server --linked-account-owner-id # For apps server npx @modelcontextprotocol/inspector uvx aci-mcp apps-server --apps "BRAVE_SEARCH,GMAIL" --linked-account-owner-id ``` -------------------------------- ### Run ACI MCP Apps Server with Docker Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Builds and runs the aci-mcp server using Docker, exposing tools from specified ACI.dev apps. Requires ACI_API_KEY and linked-account-owner-id. ```bash # Run via Docker docker build -t aci-mcp . docker run --rm -i \ -e ACI_API_KEY=your_aci_api_key_here \ aci-mcp apps-server \ --apps "BRAVE_SEARCH,GMAIL" \ --linked-account-owner-id "user_123" ``` -------------------------------- ### Configure MCP Servers for Claude Desktop Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt JSON configuration for Claude Desktop to connect to ACI MCP servers. Specifies command, arguments, and environment variables for each server. ```json { "mcpServers": { "aci-unified": { "command": "uvx", "args": [ "aci-mcp", "unified-server", "--linked-account-owner-id", "your_user_id" ], "env": { "ACI_API_KEY": "your_aci_api_key_here" } }, "aci-apps": { "command": "uvx", "args": [ "aci-mcp", "apps-server", "--apps", "BRAVE_SEARCH,GMAIL,GITHUB", "--linked-account-owner-id", "your_user_id" ], "env": { "ACI_API_KEY": "your_aci_api_key_here" } } } } ``` -------------------------------- ### API Key Validation Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Validates the ACI_API_KEY (or VIBEOPS_API_KEY) at server startup, rejecting placeholder values. ```APIDOC ## API Key Validation — `validate_api_key()` ### Description Validates the `ACI_API_KEY` (or `VIBEOPS_API_KEY`) at server startup, rejecting placeholder values that users may accidentally copy from documentation examples. ### Method ```python from aci_mcp.common import validators # Raises ValueError for missing or placeholder API keys validators.validate_api_key(os.getenv("ACI_API_KEY")) # Accepted: any non-empty string that is not a known placeholder # Rejected with ValueError("Invalid API key"): validators.validate_api_key(None) validators.validate_api_key("") validators.validate_api_key("") validators.validate_api_key("ACI_API_KEY") validators.validate_api_key("") ``` ``` -------------------------------- ### Validate API Key with aci_mcp.common.validators Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Validates the ACI_API_KEY or VIBEOPS_API_KEY environment variable at server startup. Raises ValueError for missing or placeholder keys. ```python from aci_mcp.common import validators # Raises ValueError for missing or placeholder API keys validators.validate_api_key(os.getenv("ACI_API_KEY")) # Accepted: any non-empty string that is not a known placeholder # Rejected with ValueError("Invalid API key"): validators.validate_api_key(None) validators.validate_api_key("") validators.validate_api_key("") validators.validate_api_key("ACI_API_KEY") validators.validate_api_key("") ``` -------------------------------- ### Debug ACI MCP Apps Server with Inspector Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Debugs the apps-server using the MCP Inspector tool. Requires ACI_API_KEY and linked-account-owner-id. ```bash # Debug with MCP Inspector npx @modelcontextprotocol/inspector \ uvx aci-mcp apps-server \ --apps "BRAVE_SEARCH,GMAIL" \ --linked-account-owner-id "user_123" ``` -------------------------------- ### ACI_SEARCH_FUNCTIONS Tool Usage (Python) Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt This Python code demonstrates how the ACI_SEARCH_FUNCTIONS tool is exposed and internally dispatched. It allows agents to search ACI.dev's function catalog by natural language intent. ```python # The tool is exposed to MCP clients as: # { # "name": "ACI_SEARCH_FUNCTIONS", # "description": "Search for functions available on ACI.dev by intent or keyword.", # "inputSchema": { # "type": "object", # "properties": { # "intent": { "type": "string", "description": "Natural language description of what you want to do" }, # "app_names": { "type": "array", "items": { "type": "string" }, "description": "Optional list of app names to filter by" } # }, # "required": ["intent"] # } # } # Example agent call (tools/call): # name: "ACI_SEARCH_FUNCTIONS" # arguments: { "intent": "send an email" } # Internally dispatched via: result = aci.handle_function_call( "ACI_SEARCH_FUNCTIONS", {"intent": "send an email", "limit": 15, "offset": 0}, linked_account_owner_id="user_123", allowed_apps_only=False, format=FunctionDefinitionFormat.ANTHROPIC, ) # Returns JSON array of matching function definitions the agent can then # pass to ACI_EXECUTE_FUNCTION. ``` -------------------------------- ### Monitor MCP Server Logs Source: https://github.com/aipotheosis-labs/aci-mcp/blob/main/README.md Command to continuously display the last 20 lines of MCP server logs, useful for real-time debugging. ```bash tail -n 20 -f ~/Library/Logs/Claude/mcp*.log ``` -------------------------------- ### Search ACI Documentation via REST API Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Queries the ACI.dev documentation using the REST API. This tool is exposed to MCP clients for looking up SDK usage and concepts. ```python # The tool is exposed to MCP clients as: # { # "name": "ACI_SEARCH_DOCS", # "description": "Search for ACI.dev concepts, documentation, Python & TypeScript SDK documentation, and usage examples", # "inputSchema": { # "type": "object", # "properties": { # "q": { "type": "string", "description": "The query to search for in the ACI documentation." } # }, # "required": ["q"] # } # } # Example agent call (tools/call): # name: "ACI_SEARCH_DOCS" # arguments: { "q": "how to create a linked account" } # Internal implementation: async with httpx.AsyncClient(timeout=30.0) as client: response = await client.get( "https://api.aci.dev/v1/docs", params={"q": "how to create a linked account"}, headers={"X-API-KEY": ACI_API_KEY}, ) # Returns JSON array of relevant documentation snippets. # Error cases handled: # - Non-200 status → "Error: API request failed with status ." # - Timeout → "Error: Request timed out while querying documentation." # - Network error → "Error: Network error occurred..." # - HTTP status err → "Error: HTTP error occurred..." ``` -------------------------------- ### Handle Tool Call in MCP Client Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt This Python code handles incoming 'tools/call' requests in an MCP client. It supports an optional override for routing calls to different linked accounts. ```python import json import types # Assume aci and server are imported and configured elsewhere # LINKED_ACCOUNT_OWNER_ID = "default_owner_id" @server.call_tool() async def handle_call_tool( name: str, arguments: dict ) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]: # Multi-user override: MCP client can pass this extra key to route # the call to a different linked account at runtime. linked_account_owner_id = LINKED_ACCOUNT_OWNER_ID if "aci_override_linked_account_owner_id" in arguments: linked_account_owner_id = str(arguments.pop("aci_override_linked_account_owner_id")) execution_result = aci.functions.execute( function_name=name, # e.g. "BRAVE_SEARCH__WEB_SEARCH" function_arguments=arguments, # e.g. {"query": "latest AI news"} linked_account_owner_id=linked_account_owner_id, ) if execution_result.success: return [types.TextContent(type="text", text=json.dumps(execution_result.data))] else: return [types.TextContent(type="text", text=f"Failed to execute tool, error: {execution_result.error}")] ``` -------------------------------- ### POST /messages/ Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt This endpoint is used for posting messages. ```APIDOC ## POST /messages/ ### Description This endpoint is used for posting messages. ### Method POST ### Endpoint /messages/ ``` -------------------------------- ### Run MCP Server via Stdio Transport Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Internal utility to wire an MCP Server instance to a stdio stream. This is the default transport used for local MCP clients like Claude Desktop. ```python # stdio transport (default) — used for local MCP clients like Claude Desktop async def run_stdio_async(server: Server): async with stdio_server() as (read_stream, write_stream): await server.run(read_stream, write_stream, server.create_initialization_options()) ``` -------------------------------- ### ACI MCP Apps Server: List Tools Handler Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Python code for the `handle_list_tools` function in the apps-server. It fetches functions from ACI.dev in Anthropic format and maps them to MCP tools. Triggered by MCP client's tools/list request. ```python # Internal handler (src/aci_mcp/apps_server.py) # Triggered when an MCP client sends a tools/list request. @server.list_tools() async def handle_list_tools() -> list[types.Tool]: functions = aci.functions.search( app_names=APPS, # e.g. ["BRAVE_SEARCH", "GMAIL"] allowed_apps_only=False, format=FunctionDefinitionFormat.ANTHROPIC, ) return [ types.Tool( name=function["name"], # e.g. "BRAVE_SEARCH__WEB_SEARCH" description=function["description"], inputSchema=function["input_schema"], ) for function in functions ] ``` -------------------------------- ### ACI_SEARCH_FUNCTIONS Tool Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Allows an AI agent to search the full ACI.dev function catalog by natural-language intent or keyword, returning up to 15 matching function definitions. ```APIDOC ## `unified-server` — `ACI_SEARCH_FUNCTIONS` Tool Allows an AI agent to search the full ACI.dev function catalog by natural-language intent or keyword. Returns up to 15 matching function definitions (limit/offset are set automatically; they are removed from the exposed schema to avoid issues with some MCP clients like Cursor). ```python # The tool is exposed to MCP clients as: # { # "name": "ACI_SEARCH_FUNCTIONS", # "description": "Search for functions available on ACI.dev by intent or keyword.", # "inputSchema": { # "type": "object", # "properties": { # "intent": { "type": "string", "description": "Natural language description of what you want to do" }, # "app_names": { "type": "array", "items": { "type": "string" }, "description": "Optional list of app names to filter by" } # }, # "required": ["intent"] # } # } # Example agent call (tools/call): # name: "ACI_SEARCH_FUNCTIONS" # arguments: { "intent": "send an email" } # Internally dispatched via: result = aci.handle_function_call( "ACI_SEARCH_FUNCTIONS", {"intent": "send an email", "limit": 15, "offset": 0}, linked_account_owner_id="user_123", allowed_apps_only=False, format=FunctionDefinitionFormat.ANTHROPIC, ) # Returns JSON array of matching function definitions the agent can then # pass to ACI_EXECUTE_FUNCTION. ``` ``` -------------------------------- ### ACI_EXECUTE_FUNCTION Tool Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Executes any function on ACI.dev by name with supplied arguments, intended to be called after ACI_SEARCH_FUNCTIONS. Supports multi-user routing via `aci_override_linked_account_owner_id`. ```APIDOC ## `unified-server` — `ACI_EXECUTE_FUNCTION` Tool Executes any function on ACI.dev by name with supplied arguments. Intended to be called after `ACI_SEARCH_FUNCTIONS` identifies the right function. Also supports the `aci_override_linked_account_owner_id` key for multi-user routing. ```python # The tool is exposed to MCP clients as: # { # "name": "ACI_EXECUTE_FUNCTION", # "description": "Execute a function on ACI.dev by name.", # "inputSchema": { # "type": "object", # "properties": { # "function_name": { "type": "string" }, # "function_arguments": { "type": "object" } # }, # "required": ["function_name", "function_arguments"] # } # } # Example agent call (tools/call): # name: "ACI_EXECUTE_FUNCTION" # arguments: { # "function_name": "GMAIL__SEND_EMAIL", # "function_arguments": { # "to": "alice@example.com", # "subject": "Hello from ACI", # "body": "This email was sent by an AI agent via ACI MCP." # }, # "aci_override_linked_account_owner_id": "other_user_456" # optional multi-user override # } ``` ``` -------------------------------- ### Run MCP Server via SSE Transport Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Internal utility to wire an MCP Server instance to an SSE/HTTP endpoint powered by Starlette and Uvicorn. This is used for remote/network MCP clients. ```python # SSE transport — used for remote/network MCP clients # Exposes: # GET /sse → SSE connection endpoint ``` -------------------------------- ### ACI MCP Apps Server: Call Tool Handler Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Placeholder for the `handle_call_tool` function in the apps-server. This function executes a named tool when invoked by an MCP client, delegating to `aci.functions.execute()` and returning the result. ```python # Internal handler (src/aci_mcp/apps_server.py) ``` -------------------------------- ### Execute ACI Function Call Source: https://context7.com/aipotheosis-labs/aci-mcp/llms.txt Internally dispatches function calls to the ACI. Use this for executing predefined ACI functions like sending emails. ```python result = aci.handle_function_call( "ACI_EXECUTE_FUNCTION", { "function_name": "GMAIL__SEND_EMAIL", "function_arguments": { "to": "alice@example.com", "subject": "Hello", "body": "..." } }, linked_account_owner_id="user_123", allowed_apps_only=False, format=FunctionDefinitionFormat.ANTHROPIC, ) # Returns JSON-serialized execution result. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.