### Setup OpenCode with Jarvis MCP Source: https://context7.com/shantur/jarvis-mcp/llms.txt Installs MCP configuration and the OpenCode plugin for Jarvis MCP, enabling voice message forwarding. After setup, start OpenCode and use the 'converse' tool. ```bash # Install MCP configuration npx @shantur/jarvis-mcp --install-opencode-config --local # Install OpenCode plugin for voice message forwarding npx @shantur/jarvis-mcp --install-opencode-plugin --local # Start OpenCode and use the converse tool ``` -------------------------------- ### Install Jarvis MCP from Source Source: https://context7.com/shantur/jarvis-mcp/llms.txt Clones the Jarvis MCP repository, installs dependencies, builds the project, and starts the server. This is useful for developers who want to contribute or modify the source code. ```bash git clone https://github.com/shantur/jarvis-mcp.git cd jarvis-mcp npm install && npm run build && npm start ``` -------------------------------- ### Install and Build Plugin (Bash) Source: https://github.com/shantur/jarvis-mcp/blob/main/opencode-plugin/README.md Commands to install dependencies and build the OpenCode Voice Interface Plugin. Assumes you are in the 'opencode-plugin' directory. ```bash cd opencode-plugin npm install npm run build ``` -------------------------------- ### Install OpenCode Configuration and Plugin for Jarvis MCP Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md These commands set up Jarvis MCP for use with OpenCode within your current project. The first command installs the configuration, and the second installs the plugin. After installation, start OpenCode and utilize the 'converse' tool. ```bash npx @shantur/jarvis-mcp --install-opencode-config --local npx @shantur/jarvis-mcp --install-opencode-plugin --local # Start OpenCode and use the converse tool ``` -------------------------------- ### Manual Installation from Source for Jarvis MCP Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md This process involves cloning the Jarvis MCP repository, navigating into the directory, installing dependencies, building the project, and then starting the application. This is useful for development or if you need to modify the source code. ```bash git clone cd jarvis-mcp npm install && npm run build && npm start ``` -------------------------------- ### Global NPM Installation and Execution of Jarvis MCP Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md This method installs Jarvis MCP globally using npm, making the 'jarvis-mcp' command available system-wide. After global installation, you can run the command to start the application. ```bash npm install -g @shantur/jarvis-mcp jarvis-mcp ``` -------------------------------- ### Install and Run Development Server (Bash) Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md This snippet provides the essential bash commands to install project dependencies, build the project, and run it in development or production mode. It assumes a Node.js environment. ```bash npm install npm run build npm run dev # Watch mode npm run start # Run server ``` -------------------------------- ### Install Claude Code CLI Configuration for Jarvis MCP Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md This command installs the configuration for Jarvis MCP to be used with Claude Code CLI locally. Once installed, you can start Claude Code CLI and access its voice tools. ```bash npx @shantur/jarvis-mcp --install-claude-code-config --local # Start Claude Code CLI and use voice tools ``` -------------------------------- ### Example Voice Command Usage in AI Chat Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md This example demonstrates how to initiate a voice conversation with an AI assistant using the 'converse' tool. It includes a sample greeting and a timeout duration, showcasing a typical interaction pattern. ```text Use the converse tool to start talking: - converse("Hello! How can I help you today?", timeout: 35) ``` -------------------------------- ### Get Server Configuration via API Source: https://context7.com/shantur/jarvis-mcp/llms.txt Retrieves server configuration details, including STT mode and network host candidates. This is a GET request. ```bash curl https://localhost:5114/api/config # Response { "sttMode": "browser", "whisperConfigured": false, "whisperProxyPath": "/api/whisper/transcriptions", "hostCandidates": ["localhost", "127.0.0.1", "192.168.1.100"], "httpsPort": 5114, "sessionAutoClaimSeconds": 3600 } ``` -------------------------------- ### Jarvis MCP CLI Commands Source: https://context7.com/shantur/jarvis-mcp/llms.txt Provides command-line interface options for managing and running the Jarvis MCP tool. Includes commands for showing help, version, running the server, debugging, and installing configurations for various AI tools like Claude and OpenCode. Supports local and global installation paths. ```bash # Show help npx @shantur/jarvis-mcp --help # Show version npx @shantur/jarvis-mcp --version # Run MCP server (default) npx @shantur/jarvis-mcp # Run with browser interface pre-started for testing npx @shantur/jarvis-mcp --debug-browser # Install configurations npx @shantur/jarvis-mcp --install-claude-config npx @shantur/jarvis-mcp --install-opencode-config --local npx @shantur/jarvis-mcp --install-claude-code-config --local npx @shantur/jarvis-mcp --install-opencode-plugin --local # Use --global for home directory instead of current directory npx @shantur/jarvis-mcp --install-opencode-config --global ``` -------------------------------- ### Profile Definition Example (TOML) Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Defines multiple named profiles within a TOML configuration file. Each profile bundles a set of configuration values, allowing users to switch between different settings using the `--profile` flag. ```toml model = "o3" approval_policy = "untrusted" # Setting `profile` is equivalent to specifying `--profile o3` on the command # line, though the `--profile` flag can still be used to override this value. profile = "o3" [model_providers.openai-chat-completions] name = "OpenAI using Chat Completions" base_url = "https://api.openai.com/v1" env_key = "OPENAI_API_KEY" wire_api = "chat" [profiles.o3] model = "o3" model_provider = "openai" approval_policy = "never" model_reasoning_effort = "high" model_reasoning_summary = "detailed" [profiles.gpt3] model = "gpt-3.5-turbo" model_provider = "openai-chat-completions" [profiles.zdr] model = "o3" model_provider = "openai" approval_policy = "on-failure" ``` -------------------------------- ### JSON to TOML MCP Server Configuration Example Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Illustrates the conversion of an MCP server configuration from JSON format to TOML format, highlighting the differences in syntax and structure for Codex's configuration file. ```json { "mcpServers": { "server-name": { "command": "npx", "args": ["-y", "mcp-server"], "env": { "API_KEY": "value" } } } } ``` -------------------------------- ### Install Claude Desktop Configuration for Jarvis MCP Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md This command installs the necessary configuration for Jarvis MCP to work with Claude Desktop. After running this command, you need to restart Claude Desktop for the changes to take effect. ```bash npx @shantur/jarvis-mcp --install-claude-config # Restart Claude Desktop and you're ready! ``` -------------------------------- ### GET /api/config - Get Server Configuration Source: https://context7.com/shantur/jarvis-mcp/llms.txt Returns server configuration including STT mode and network hosts. This endpoint is useful for understanding the current operational settings of the server. ```APIDOC ## GET /api/config ### Description Returns server configuration including STT mode and network hosts. ### Method GET ### Endpoint /api/config ### Response #### Success Response (200) - **sttMode** (string) - The Speech-to-Text (STT) mode being used (e.g., 'browser', 'whisper'). - **whisperConfigured** (boolean) - Indicates if Whisper STT is configured. - **whisperProxyPath** (string) - The proxy path for Whisper STT. - **hostCandidates** (array) - A list of potential hostnames or IP addresses for the server. - **httpsPort** (integer) - The port number for HTTPS communication. - **sessionAutoClaimSeconds** (integer) - The duration in seconds after which a session is automatically claimed. #### Response Example ```json { "sttMode": "browser", "whisperConfigured": false, "whisperProxyPath": "/api/whisper/transcriptions", "hostCandidates": ["localhost", "127.0.0.1", "192.168.1.100"], "httpsPort": 5114, "sessionAutoClaimSeconds": 3600 } ``` ``` -------------------------------- ### Model Provider Configuration (TOML) Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Defines how to connect to different model providers, including their names, base URLs, and API keys. This example shows configuration for the default 'openai' provider and an 'openai-chat-completions' provider. ```toml [model_providers.openai-chat-completions] name = "OpenAI using Chat Completions" base_url = "https://api.openai.com/v1" env_key = "OPENAI_API_KEY" wire_api = "chat" ``` -------------------------------- ### MCP Tools - Get Voice Input Source: https://context7.com/shantur/jarvis-mcp/llms.txt Gets and delivers any pending voice input from users. Input is marked as delivered after retrieval. ```APIDOC ## GET /get_voice_input ### Description Retrieves any pending voice input from users. Once retrieved, the input is marked as delivered. ### Method GET ### Endpoint /get_voice_input ### Parameters #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **content** (array) - Contains the transcribed voice input(s) from users. - **type** (string) - 'text' - **text** (string) - A string listing the user's voice input(s). #### Response Example ```json { "content": [ { "type": "text", "text": "User spoke 2 voice input(s):\n\n\"Hello there\"\n\"Can you help me?\"" } ] } ``` ``` -------------------------------- ### Core Queue Operations in TypeScript Source: https://context7.com/shantur/jarvis-mcp/llms.txt Manages voice inputs, SSE clients, and conversation state for the VoiceQueue. Supports adding inputs, retrieving pending inputs, delivering consumed inputs, setting conversation waiting state, broadcasting TTS, and getting queue statistics. Dependencies include './voice-queue'. ```typescript import { VoiceQueue, VoiceInput } from './voice-queue'; const queue = new VoiceQueue(); // Add voice input to queue const input: VoiceInput = queue.addInput("Hello, how are you?"); // Returns: { id: 'uuid', text: 'Hello, how are you?', timestamp: Date, status: 'pending' } // Get pending inputs const pending = queue.getPendingInput(); // Returns: VoiceInput[] with status === 'pending' // Deliver (consume) pending inputs const delivered = queue.deliverPendingInput(); // Returns delivered inputs, marks them as 'delivered' // Set conversation waiting state (for timeout countdown) queue.setConversationWaiting(true, 150); // waiting=true, timeout=150 seconds // Broadcast TTS to all connected browsers queue.broadcastTTS("AI is speaking this text"); // Get queue statistics const stats = queue.getStats(); // Returns: { totalInputs, pendingInputs, connectedClients, voiceActive, conversationWaiting, ... } ``` -------------------------------- ### Jarvis MCP Converse Tool Schema and Usage (TypeScript) Source: https://context7.com/shantur/jarvis-mcp/llms.txt Defines the schema for the 'converse' MCP tool, which facilitates bidirectional voice conversations. It includes parameters for text input, response waiting, and timeouts, along with example usage and response formats. ```typescript // Tool schema { name: 'converse', inputSchema: { type: 'object', properties: { text: { type: 'string', description: 'Text to speak to the user' }, wait_for_response: { type: 'boolean', default: true }, timeout: { type: 'number', description: 'Seconds to wait for voice input' } }, required: ['text', 'timeout'] } } // Example usage from AI assistant converse({ text: "Hello! How can I help you today?", timeout: 150 // 30s speech + 120s response buffer }) // Response when user speaks { content: [{ type: 'text', text: 'User said: "I need help with my code"' }] } // Timeout calculation guide: // - Short responses (1-2 sentences): ~150s timeout // - Medium responses (3-5 sentences): ~165s timeout // - Long responses (6+ sentences): ~180s timeout ``` -------------------------------- ### GET /events - Server-Sent Events Stream Source: https://context7.com/shantur/jarvis-mcp/llms.txt Establishes an SSE connection for real-time updates, including TTS commands, queue updates, and status changes. Clients can subscribe to this endpoint to receive live notifications. ```APIDOC ## GET /events ### Description Establishes SSE connection for real-time updates (TTS commands, queue updates, status changes). ### Method GET ### Endpoint /events ### Parameters No specific parameters are required for this endpoint, but clients should handle incoming Server-Sent Events. ### Response #### Success Response (200) This endpoint returns a stream of Server-Sent Events. The structure of each event depends on its `type`. **Event Types:** - **connected**: Initial connection event, includes `clientId`. - **speak**: AI wants to speak text, includes `text`. - **queueUpdate**: Voice input queue changed, includes `recentInputs` and `pendingCount`. - **conversationWaiting**: Conversation tool waiting for response, includes `remainingSeconds`. - **sessionStatus**: Session ownership changed, includes `activeClientId` and `sessions`. ### Request Example (JavaScript) ```javascript const eventSource = new EventSource('https://localhost:5114/events'); eventSource.onmessage = (event) => { const data = JSON.parse(event.data); switch (data.type) { case 'connected': // Initial connection with clientId console.log('Connected:', data.clientId); break; case 'speak': // AI wants to speak text speakText(data.text); break; case 'queueUpdate': // Voice input queue changed updateQueue(data.recentInputs, data.pendingCount); break; case 'conversationWaiting': // Conversation tool waiting for response showCountdown(data.remainingSeconds); break; case 'sessionStatus': // Session ownership changed handleSession(data.activeClientId, data.sessions); break; } }; ``` ``` -------------------------------- ### Get Voice Queue Status via API Source: https://context7.com/shantur/jarvis-mcp/llms.txt Returns current voice queue statistics and recent inputs. This is a GET request and does not require a request body. ```bash curl https://localhost:5114/api/status # Response { "totalInputs": 5, "pendingInputs": 1, "connectedClients": 2, "voiceActive": true, "conversationWaiting": true, "conversationWaitTimeout": 150, "recentInputs": [ { "text": "What's the weather like?", "timestamp": "2024-01-15T10:30:00.000Z", "status": "pending" } ] } ``` -------------------------------- ### Set Model Verbosity for GPT-5 in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md This TOML configuration example demonstrates how to set the `model_verbosity` to 'low' for the 'gpt-5' model. This controls the output length and detail for GPT-5 family models when using the Responses API. ```toml model = "gpt-5" model_verbosity = "low" ``` -------------------------------- ### GET /api/status - Get Voice Queue Status Source: https://context7.com/shantur/jarvis-mcp/llms.txt Returns current voice queue statistics and recent inputs. This endpoint provides insights into the system's current workload and activity. ```APIDOC ## GET /api/status ### Description Returns current voice queue statistics and recent inputs. ### Method GET ### Endpoint /api/status ### Response #### Success Response (200) - **totalInputs** (integer) - The total number of voice inputs processed. - **pendingInputs** (integer) - The number of voice inputs currently waiting in the queue. - **connectedClients** (integer) - The number of currently connected clients. - **voiceActive** (boolean) - Indicates if voice processing is currently active. - **conversationWaiting** (boolean) - Indicates if a conversation is currently waiting for a response. - **conversationWaitTimeout** (integer) - The timeout duration for conversation waiting in seconds. - **recentInputs** (array) - A list of recent voice inputs. - **text** (string) - The text of the recent input. - **timestamp** (string) - The time the input was received. - **status** (string) - The status of the recent input. #### Response Example ```json { "totalInputs": 5, "pendingInputs": 1, "connectedClients": 2, "voiceActive": true, "conversationWaiting": true, "conversationWaitTimeout": 150, "recentInputs": [ { "text": "What's the weather like?", "timestamp": "2024-01-15T10:30:00.000Z", "status": "pending" } ] } ``` ``` -------------------------------- ### Jarvis MCP Get Voice Input Tool Schema and Usage (TypeScript) Source: https://context7.com/shantur/jarvis-mcp/llms.txt Defines the schema for the 'get_voice_input' MCP tool, used to retrieve pending voice input from users. Once retrieved, the input is marked as delivered. ```typescript // Tool schema { name: 'get_voice_input', inputSchema: { type: 'object', properties: {} } } // Example response with pending input { content: [{ type: 'text', text: 'User spoke 2 voice input(s):\n\n"Hello there"\n"Can you help me?"' }] } ``` -------------------------------- ### Build Plugin (Bash) Source: https://github.com/shantur/jarvis-mcp/blob/main/opencode-plugin/README.md Command to build the OpenCode Voice Interface Plugin. This is typically run after making code changes. ```bash npm run build ``` -------------------------------- ### Run Plugin in Development Mode (Bash) Source: https://github.com/shantur/jarvis-mcp/blob/main/opencode-plugin/README.md Command to run the plugin in development mode with watch enabled. This automatically rebuilds the plugin on file changes. ```bash npm run dev ``` -------------------------------- ### Initialize OpenCode Plugin for Voice Forwarding Source: https://context7.com/shantur/jarvis-mcp/llms.txt Initializes the OpenCode plugin to monitor sessions and forward voice messages. It uses environment variables for configuration and hooks into session events. ```typescript // Plugin hooks into OpenCode events const plugin: Plugin = async (input: PluginInput): Promise => { const { client } = input; const voiceService = new VoiceMessageService(client, { voiceInterfaceUrl: process.env.VOICE_INTERFACE_URL || 'https://localhost:5114', pollInterval: parseInt(process.env.VOICE_POLL_INTERVAL || '2000'), maxMessagesPerPoll: parseInt(process.env.VOICE_MAX_MESSAGES || '5'), debug: process.env.VOICE_DEBUG === 'true' }); return { // Forward voice messages on session idle event: async ({ event }) => { if (event.type === 'session.idle') { await voiceService.checkAndForwardMessages(event.properties.sessionID); } }, // Forward after tool execution "tool.execute.after": async (input) => { await voiceService.checkAndForwardMessages(input.sessionID); } }; }; // Mock definitions for type checking (replace with actual imports) interface Plugin {} interface PluginInput { client: any; } interface Hooks { event?: (input: any) => Promise; "tool.execute.after"?: (input: any) => Promise; } class VoiceMessageService { constructor(client: any, config: any) {} async checkAndForwardMessages(sessionId: string): Promise { console.log(`Checking and forwarding messages for session: ${sessionId}`); } } ``` -------------------------------- ### Configure OpenCode Plugin Environment Variables Source: https://context7.com/shantur/jarvis-mcp/llms.txt Sets environment variables to configure the OpenCode plugin's voice forwarding behavior, including the voice interface URL, polling interval, and maximum messages per poll. ```bash # Voice interface URL export VOICE_INTERFACE_URL=https://localhost:5114 # Polling interval in milliseconds export VOICE_POLL_INTERVAL=2000 # Maximum messages per poll export VOICE_MAX_MESSAGES=5 # Enable debug logging export VOICE_DEBUG=true ``` -------------------------------- ### Configure MCP Servers in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Defines how to configure MCP servers in Codex's `config.toml` file. This includes specifying the command to launch the server, arguments, environment variables, and optional timeouts for startup and tool execution. This format is similar to JSON configurations but adapted for TOML. ```toml # IMPORTANT: the top-level key is `mcp_servers` rather than `mcpServers`. [mcp_servers.server-name] command = "npx" args = ["-y", "mcp-server"] env = { "API_KEY" = "value" } # Optional: override the default 10s startup timeout startup_timeout_sec = 20 # Optional: override the default 60s per-tool timeout tool_timeout_sec = 30 ``` -------------------------------- ### Configure Voice Interface (OpenCode) Source: https://github.com/shantur/jarvis-mcp/blob/main/opencode-plugin/README.md A manual tool within OpenCode to configure the voice interface settings, such as URL, auto-forwarding, and polling interval. ```javascript voice_configure(url="https://localhost:5114", autoForward=true, pollInterval=3000) ``` -------------------------------- ### POST /api/audio-ready - Claim Session Source: https://context7.com/shantur/jarvis-mcp/llms.txt Claims the voice session for the current browser client, enabling audio input/output. This is necessary to establish a connection for real-time voice interaction. ```APIDOC ## POST /api/audio-ready ### Description Claims the voice session for the current browser client, enabling audio input/output. ### Method POST ### Endpoint /api/audio-ready ### Parameters #### Request Body - **clientId** (string) - Required - The unique identifier for the client. - **label** (string) - Optional - A label describing the client environment (e.g., 'Chrome macOS'). ### Request Example ```json { "clientId": "abc123", "label": "Chrome macOS" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **activeClientId** (string) - The client ID that now holds the active session. #### Response Example ```json { "success": true, "activeClientId": "abc123" } ``` ``` -------------------------------- ### Forward Voice Messages Immediately (OpenCode) Source: https://github.com/shantur/jarvis-mcp/blob/main/opencode-plugin/README.md A manual tool within OpenCode to immediately trigger a check for and forward any pending voice messages from the Jarvis MCP. ```javascript voice_forward_now() ``` -------------------------------- ### Configure Azure Model Provider with Query Params in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Shows how to configure the Azure model provider, specifically noting the requirement to include `api-version` within the `query_params` for the API requests. ```toml [model_providers.azure] name = "Azure" # Note that Azure requires `api-version` to be passed as a query parameter, # so be sure to specify it as part of `query_params` when defining the Azure provider: # query_params = { "api-version" = "2023-05-15" } # Example api-version ``` -------------------------------- ### SSE Client Management in TypeScript Source: https://context7.com/shantur/jarvis-mcp/llms.txt Handles Server-Sent Events (SSE) client connections for the VoiceQueue. Supports adding and removing SSE clients, retrieving the count of connected clients, and broadcasting messages to all clients. Dependencies include an Express response object. ```typescript // Add SSE client connection queue.addSSEClient(clientId, expressResponse); // Remove client on disconnect queue.removeSSEClient(clientId); // Get connected client count const count = queue.getConnectedClients(); // Broadcast message to all clients queue.broadcast({ type: 'customMessage', data: { ... } }); ``` -------------------------------- ### Configure File Opener for Hyperlinked Citations Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md This TOML configuration sets the URI scheme used for hyperlinking file citations in Codex model output. Supported values include "vscode", "vscode-insiders", "windsurf", "cursor", or "none" to disable. The default is "vscode". ```toml file_opener = "vscode" # Example: Sets the file opener to VS Code ``` -------------------------------- ### Configuring Jarvis MCP with Environment Variables Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md This section shows how to configure Jarvis MCP using environment variables. These variables control aspects like auto-opening the browser, the HTTPS port, the speech-to-text mode, and the Whisper server endpoint and authentication. ```bash export MCP_VOICE_AUTO_OPEN=false # Disable auto-opening browser export MCP_VOICE_HTTPS_PORT=5114 # Change HTTPS port export MCP_VOICE_STT_MODE=whisper # Switch the web app to Whisper streaming export MCP_VOICE_WHISPER_URL=http://localhost:12017/v1/audio/transcriptions # Whisper endpoint (full path) export MCP_VOICE_WHISPER_TOKEN=your_token # Optional Bearer auth for Whisper server ``` -------------------------------- ### Approval Policy Configuration: On Request (TOML) Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Sets the approval policy to 'on-request'. The model determines when it needs escalated permissions and will prompt the user accordingly, allowing for dynamic permission management during execution. ```toml approval_policy = "on-request" ``` -------------------------------- ### Remote Access to Jarvis MCP Source: https://context7.com/shantur/jarvis-mcp/llms.txt Instructions for accessing the Jarvis MCP interface from mobile devices on the same network. Involves finding the computer's IP address and navigating to the specified URL, while also addressing potential self-signed certificate warnings and microphone permission requests. ```bash # Find your computer's IP address ifconfig | grep inet # Mac/Linux ipconfig # Windows # Access from phone/tablet # https://YOUR_IP:5114 # Accept the self-signed certificate warning # Grant microphone permissions when prompted ``` -------------------------------- ### Configure HTTP Headers for Model Provider in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Demonstrates how to add custom HTTP headers to requests made to a model provider. This can include hardcoded headers or headers whose values are read from environment variables. ```toml [model_providers.example] # name, base_url, ... # This will add the HTTP header `X-Example-Header` with value `example-value` # to each request to the model provider. http_headers = { "X-Example-Header" = "example-value" } # This will add the HTTP header `X-Example-Features` with the value of the # `EXAMPLE_FEATURES` environment variable to each request to the model provider # _if_ the environment variable is set and its value is non-empty. env_http_headers = { "X-Example-Features" = "EXAMPLE_FEATURES" } ``` -------------------------------- ### Claim Audio Session via API Source: https://context7.com/shantur/jarvis-mcp/llms.txt Claims the voice session for the current browser client, enabling audio input/output. Requires a JSON payload with 'clientId' and 'label'. ```bash curl -X POST https://localhost:5114/api/audio-ready \ -H "Content-Type: application/json" \ -d '{"clientId": "abc123", "label": "Chrome macOS"}' # Response { "success": true, "activeClientId": "abc123" } ``` -------------------------------- ### Configure Full Access Sandbox Mode in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md This TOML configuration sets the `sandbox_mode` to 'danger-full-access', which disables all sandboxing. This provides full disk and network access and should be used with extreme caution, typically when the execution environment provides its own sandboxing. ```toml # same as `--sandbox danger-full-access` sandbox_mode = "danger-full-access" ``` -------------------------------- ### Type Check Plugin Code (Bash) Source: https://github.com/shantur/jarvis-mcp/blob/main/opencode-plugin/README.md Command to perform type checking on the plugin's TypeScript code. Ensures code quality and catches potential type-related errors. ```bash npm run typecheck ``` -------------------------------- ### Jarvis MCP Speak Tool Schema and Usage (TypeScript) Source: https://context7.com/shantur/jarvis-mcp/llms.txt Defines the schema for the 'speak' MCP tool, used for one-way speech output to the user. It takes a 'text' parameter and does not wait for a response, suitable for updates or announcements. ```typescript // Tool schema { name: 'speak', inputSchema: { type: 'object', properties: { text: { type: 'string', description: 'The text to speak aloud' } }, required: ['text'] } } // Example usage speak({ text: "Processing your request, please wait..." }) // Response { content: [{ type: 'text', text: '' }] } ``` -------------------------------- ### Show Raw Agent Reasoning Configuration Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Controls whether the model's raw chain-of-thought reasoning content is displayed. This option only takes effect if the selected model or provider actually emits raw reasoning content. When unsupported, this option has no visible effect. Defaults to false. ```toml show_raw_agent_reasoning = true # defaults to false ``` -------------------------------- ### Finding Local IP Address Source: https://github.com/shantur/jarvis-mcp/blob/main/README.md These commands help you find your computer's local IP address on Mac/Linux and Windows. This is necessary for accessing the Jarvis MCP web interface remotely from other devices on your network. ```bash ifconfig | grep inet # Mac/Linux ipconfig # Windows ``` -------------------------------- ### Azure OpenAI API Configuration Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Sets up the base URL and API key for connecting to Azure OpenAI services. It also defines query parameters, including the API version, and specifies the wire API endpoint for responses. ```python base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai" env_key = "AZURE_OPENAI_API_KEY" # Or "OPENAI_API_KEY", whichever you use. query_params = { api-version = "2025-04-01-preview" } wire_api = "responses" ``` -------------------------------- ### Configure Workspace Write Sandbox Mode in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md This TOML configuration enables 'workspace-write' sandbox mode, allowing the current working directory and temporary directories to be writable. It also includes options to exclude default writable paths and specify additional writable roots, along with a network access toggle. ```toml # same as `--sandbox workspace-write` sandbox_mode = "workspace-write" # Extra settings that only apply when `sandbox = "workspace-write"`. [sandbox_workspace_write] # By default, the cwd for the Codex session will be writable as well as $TMPDIR # (if set) and /tmp (if it exists). Setting the respective options to `true` # will override those defaults. exclude_tmpdir_env_var = false exclude_slash_tmp = false # Optional list of _additional_ writable roots beyond $TMPDIR and /tmp. writable_roots = ["/Users/YOU/.pyenv/shims"] # Allow the command being run inside the sandbox to make outbound network # requests. Disabled by default. network_access = false ``` -------------------------------- ### Exporting API Key Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Command to export the Azure OpenAI API key as an environment variable before launching Codex. This ensures the application can authenticate with the service. ```shell export AZURE_OPENAI_API_KEY=… ``` -------------------------------- ### Configure OpenAI Chat Model Provider in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Defines a custom model provider for OpenAI using the chat completions API. This includes setting the provider name, base URL, API key environment variable, and wire API type. ```toml # Recall that in TOML, root keys must be listed before tables. model = "gpt-4o" model_provider = "openai-chat-completions" [model_providers.openai-chat-completions] # Name of the provider that will be displayed in the Codex UI. name = "OpenAI using Chat Completions" # The path `/chat/completions` will be amended to this URL to make the POST # request for the chat completions. base_url = "https://api.openai.com/v1" # If `env_key` is set, identifies an environment variable that must be set when # using Codex with this provider. The value of the environment variable must be # non-empty and will be used in the `Bearer TOKEN` HTTP header for the POST request. env_key = "OPENAI_API_KEY" # Valid values for wire_api are "chat" and "responses". Defaults to "chat" if omitted. wire_api = "chat" # If necessary, extra query params that need to be added to the URL. # See the Azure example below. query_params = {} ``` -------------------------------- ### Overriding Model Provider and Model (TOML) Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Demonstrates how to override the default model provider and model selection in the configuration. This is useful for using alternative services like Ollama with specific models such as Mistral. ```toml model_provider = "ollama" model = "mistral" ``` -------------------------------- ### Approval Policy Configuration: On Failure (TOML) Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Configures the approval policy to 'on-failure'. If a command fails when run in the sandbox, Codex will ask for permission to retry it outside the sandbox, allowing for recovery from transient errors. ```toml approval_policy = "on-failure" ``` -------------------------------- ### Connect to Server-Sent Events Stream Source: https://context7.com/shantur/jarvis-mcp/llms.txt Establishes a Server-Sent Events (SSE) connection to receive real-time updates from the server, such as TTS commands, queue updates, and status changes. Requires JavaScript. ```javascript const eventSource = new EventSource('https://localhost:5114/events'); eventSource.onmessage = (event) => { const data = JSON.parse(event.data); switch (data.type) { case 'connected': // Initial connection with clientId console.log('Connected:', data.clientId); break; case 'speak': // AI wants to speak text speakText(data.text); break; case 'queueUpdate': // Voice input queue changed updateQueue(data.recentInputs, data.pendingCount); break; case 'conversationWaiting': // Conversation tool waiting for response showCountdown(data.remainingSeconds); break; case 'sessionStatus': // Session ownership changed handleSession(data.activeClientId, data.sessions); break; } }; // Placeholder functions for event handlers function speakText(text) { console.log('Speaking:', text); } function updateQueue(inputs, count) { console.log('Queue updated:', inputs, count); } function showCountdown(seconds) { console.log('Countdown:', seconds); } function handleSession(clientId, sessions) { console.log('Session status:', clientId, sessions); } ``` -------------------------------- ### Force Reasoning Support for Models in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md This TOML configuration snippet shows how to force the `reasoning` setting to be enabled for requests to the current model, even if the model is not explicitly known to support it. This is achieved by setting `model_supports_reasoning_summaries` to `true`. ```toml model_supports_reasoning_summaries = true ``` -------------------------------- ### Check Voice Interface Status (OpenCode) Source: https://github.com/shantur/jarvis-mcp/blob/main/opencode-plugin/README.md A manual tool within OpenCode to check the current status of the voice interface connection to the Jarvis MCP. ```javascript voice_status() ``` -------------------------------- ### Model Context Window Configuration Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Sets the size of the context window for the model in tokens. This is used by Codex to determine how much context is left during a conversation, especially for newer models not recognized by older versions of the Codex CLI. ```toml model_context_window = 4096 # Example value, actual value depends on the model ``` -------------------------------- ### Configure Ollama Model Provider in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Sets up a model provider to use Ollama running locally. This configuration specifies the provider's name and the base URL for the Ollama API endpoint. ```toml [model_providers.ollama] name = "Ollama" base_url = "http://localhost:11434/v1" ``` -------------------------------- ### Manage MCP Servers via CLI Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Provides command-line interface (CLI) commands for managing MCP servers within Codex. These commands allow adding, listing, retrieving, and removing server configurations. ```shell # Add a server (env can be repeated; `--` separates the launcher command) codex mcp add docs -- docs-server --port 4000 # List configured servers (pretty table or JSON) codex mcp list codex mcp list --json # Show one server (table or JSON) codex mcp get docs codex mcp get docs --json # Remove a server codex mcp remove docs ``` -------------------------------- ### Configure MCP Voice Environment Variables Source: https://context7.com/shantur/jarvis-mcp/llms.txt Sets environment variables to configure the behavior of the MCP Voice application, such as disabling automatic browser opening, changing the HTTPS port, or enabling Whisper STT mode. ```bash # Disable automatic browser opening export MCP_VOICE_AUTO_OPEN=false # Change HTTPS port (default: 5114) export MCP_VOICE_HTTPS_PORT=5114 # Enable Whisper STT mode instead of browser Web Speech API export MCP_VOICE_STT_MODE=whisper # Whisper server endpoint (required when STT_MODE=whisper) export MCP_VOICE_WHISPER_URL=http://localhost:12017/v1/audio/transcriptions # Optional Bearer token for Whisper server authentication export MCP_VOICE_WHISPER_TOKEN=your_token # Session auto-claim duration in seconds (default: 3600) export MCP_VOICE_AUTO_CLAIM_SECONDS=3600 ``` -------------------------------- ### MCP Tools - Speak Source: https://context7.com/shantur/jarvis-mcp/llms.txt Speaks text to the user without waiting for response. Useful for progress updates or announcements. ```APIDOC ## POST /speak ### Description Speaks the provided text to the user via text-to-speech without waiting for any response. ### Method POST ### Endpoint /speak ### Parameters #### Request Body - **text** (string) - Required - The text to speak aloud. ### Request Example ```json { "text": "Processing your request, please wait..." } ``` ### Response #### Success Response (200) - **content** (array) - An empty text content indicating the speech command was processed. - **type** (string) - 'text' - **text** (string) - Empty string. #### Response Example ```json { "content": [ { "type": "text", "text": "" } ] } ``` ``` -------------------------------- ### MCP Tools - Converse Source: https://context7.com/shantur/jarvis-mcp/llms.txt The primary tool for having bidirectional voice conversations. It speaks text to the user via browser TTS and waits for voice response via speech recognition. ```APIDOC ## POST /converse ### Description Initiates a bidirectional voice conversation. Speaks provided text and waits for user's voice response. ### Method POST ### Endpoint /converse ### Parameters #### Request Body - **text** (string) - Required - The text to speak to the user. - **wait_for_response** (boolean) - Optional - Whether to wait for a voice response (defaults to true). - **timeout** (number) - Required - Seconds to wait for voice input. ### Request Example ```json { "text": "Hello! How can I help you today?", "timeout": 150 } ``` ### Response #### Success Response (200) - **content** (array) - Contains the transcribed user's speech. - **type** (string) - 'text' - **text** (string) - The user's transcribed voice input. #### Response Example ```json { "content": [ { "type": "text", "text": "User said: \"I need help with my code\"" } ] } ``` ``` -------------------------------- ### Configure Mistral Model Provider in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Configures a model provider for Mistral AI services. This includes the provider name, base URL, and the environment variable containing the API key. ```toml [model_providers.mistral] name = "Mistral" base_url = "https://api.mistral.ai/v1" env_key = "MISTRAL_API_KEY" ``` -------------------------------- ### Configure Reasoning Summaries in TOML Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md This snippet shows how to disable reasoning summaries for models by setting the `model_reasoning_summary` configuration option to 'none' in a TOML file. This is useful for reducing output verbosity when detailed summaries are not required. ```toml model_reasoning_summary = "none" # disable reasoning summaries ``` -------------------------------- ### Jarvis MCP Voice Status Tool Schema and Usage (TypeScript) Source: https://context7.com/shantur/jarvis-mcp/llms.txt Defines the schema for the 'voice_status' MCP tool, which retrieves the current state of the voice system. It returns information about the browser connection, pending input, and the speech-to-text mode. ```typescript // Tool schema { name: 'voice_status', inputSchema: { type: 'object', properties: {} } } // Example response when running { content: [{ type: 'text', text: `Voice Status: - Browser Interface: Running (https://localhost:5114) - Browser Connected: true - Pending Voice Input: 0 messages - Speech-to-text mode: Browser Web Speech API` }] } ``` -------------------------------- ### Model Maximum Output Tokens Configuration Source: https://github.com/shantur/jarvis-mcp/blob/main/config.md Defines the maximum number of output tokens for the model. This setting is analogous to `model_context_window` and limits the length of the model's response. ```toml model_max_output_tokens = 1024 # Example value, actual value depends on the model ``` -------------------------------- ### MCP Tools - Voice Status Source: https://context7.com/shantur/jarvis-mcp/llms.txt Returns the current state of the voice system including browser connection, pending input, and STT mode. ```APIDOC ## GET /voice_status ### Description Retrieves the current status of the Jarvis MCP voice system. ### Method GET ### Endpoint /voice_status ### Parameters #### Query Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **content** (array) - Contains the status information of the voice system. - **type** (string) - 'text' - **text** (string) - A formatted string detailing the system status (e.g., browser connection, pending input, STT mode). #### Response Example ```json { "content": [ { "type": "text", "text": "Voice Status:\n- Browser Interface: Running (https://localhost:5114)\n- Browser Connected: true\n- Pending Voice Input: 0 messages\n- Speech-to-text mode: Browser Web Speech API" } ] } ``` ``` -------------------------------- ### POST /api/voice-input - Submit Voice Input Source: https://context7.com/shantur/jarvis-mcp/llms.txt Submits transcribed voice text to the queue for AI assistant retrieval. This endpoint is used to send user's spoken commands or queries to the system. ```APIDOC ## POST /api/voice-input ### Description Submits transcribed voice text to the queue for AI assistant retrieval. ### Method POST ### Endpoint /api/voice-input ### Parameters #### Request Body - **text** (string) - Required - The transcribed voice text. ### Request Example ```json { "text": "Hello, I need help with my project" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **input** (object) - Details of the submitted voice input. - **id** (string) - Unique identifier for the input. - **text** (string) - The submitted text. - **timestamp** (string) - The time the input was received. - **status** (string) - The current status of the input (e.g., 'pending'). - **delivered** (integer) - Number of times the input was delivered. #### Response Example ```json { "success": true, "input": { "id": "550e8400-e29b-41d4-a716-446655440000", "text": "Hello, I need help with my project", "timestamp": "2024-01-15T10:30:00.000Z", "status": "pending" }, "delivered": 0 } ``` ```