Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:AIPexStudio AIPex NodeJS Runtime

From Leeroopedia
Knowledge Sources
Domains Agent_Framework, MCP, Backend
Last Updated 2026-10-24 12:00 GMT

Overview

Node.js >= 18 runtime powering the `@aipexstudio/aipex-core` agent framework and the `aipex-mcp-bridge` daemon relay.

Description

This environment provides a standard Node.js server-side context for the core AIPex agent engine and the MCP bridge. The core package (`@aipexstudio/aipex-core`) is a pure TypeScript AI agent framework built on top of `@openai/agents`, with no platform dependencies. The MCP bridge (`aipex-mcp-bridge`) is a Node.js CLI tool that spawns a background WebSocket daemon to relay tool calls between IDE-based AI agents (Cursor, Claude Code, VS Code Copilot) and the AIPex Chrome extension.

= Usage

Use this environment for any Agent Execution, MCP Bridge, or Daemon workflow that runs outside the browser. It is the mandatory prerequisite for running the AIPex agent class (`AIPex.create`, `AIPex.chat`, `AIPex.runExecution`), the conversation/context managers, screenshot shaping utilities, and the MCP bridge/daemon relay.

System Requirements

Category Requirement Notes
OS Linux / macOS / Windows Cross-platform Node.js
Hardware Any modern CPU No GPU required; network access for LLM APIs
Disk 200MB Node.js + npm dependencies

Dependencies

System Packages

  • `node` >= 18.0.0
  • `npm` or `pnpm` (monorepo workspace)

NPM Packages

  • `@openai/agents` >= 0.7.2
  • `@openai/agents-extensions` >= 0.5.4
  • `@modelcontextprotocol/sdk` >= 1.28.0
  • `ws` >= 8.18.0
  • `lru-cache` >= 11.2.7
  • `zod` >= 4.3.6

Optional Peer Dependencies

  • `@ai-sdk/openai` >= 3.0.0
  • `@ai-sdk/anthropic` >= 3.0.0
  • `@ai-sdk/google` >= 3.0.0
  • `@openrouter/ai-sdk-provider` >= 2.0.0

Credentials

The following environment variables must be set for LLM API access (varies by provider):

  • `OPENAI_API_KEY`: OpenAI API key (required for OpenAI models)
  • `ANTHROPIC_API_KEY`: Anthropic API key (required for Claude models)
  • `GOOGLE_GENERATIVE_AI_API_KEY`: Google AI API key (required for Gemini models)
  • `OPENROUTER_API_KEY`: OpenRouter API key (optional, for OpenRouter provider)

Quick Install

# Install core package dependencies
cd packages/core && npm install

# Install MCP bridge dependencies
cd mcp-bridge && npm install

# Or install everything in the monorepo
npm install

Code Evidence

Node.js engine requirement from `mcp-bridge/package.json:50-52`:

"engines": {
  "node": ">=18.0.0"
}

Core agent class importing `@openai/agents` from `packages/core/src/agent/aipex.ts:1-6`:

import {
  type AgentInputItem,
  Agent as OpenAIAgent,
  type RunItemStreamEvent,
  run,
} from "@openai/agents";

MCP bridge stdio transport and WebSocket relay from `mcp-bridge/src/bridge.ts:23-32`:

import { fork } from "node:child_process";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { WebSocket } from "ws";

Daemon self-termination idle timeout from `mcp-bridge/src/daemon.ts:34-40`:

const PORT = parseInt(getArg("--port", "9223"), 10);
const HOST = getArg("--host", "127.0.0.1");
const PID_FILE = join(homedir(), ".aipex-daemon.pid");
const IDLE_TIMEOUT_MS = 30_000;
const TOOL_CALL_TIMEOUT_MS = 60_000;

Common Errors

Error Message Cause Solution
`Not connected to AIPex daemon` Daemon not running or port blocked Run `npx aipex-mcp-bridge` to auto-spawn daemon, check port 9223
`Session not found` SessionId refers to a non-existent conversation Ensure ConversationManager is configured and session was created
`ConversationManager is required for continuing conversations` No conversation manager set when using sessionId Pass `conversation: true` or a `conversationManager` in AIPexOptions
`Tool '<name>' timed out after 60000ms` Tool call exceeded 60s daemon timeout Check if the browser extension is responsive and the tab is still open

Compatibility Notes

  • Node.js < 18: Not supported; `node:child_process`, `node:os`, `node:fs` modules require Node >= 18.
  • Bun/Deno: Not officially tested; the MCP bridge uses Node-specific modules (`node:child_process`, `node:http`).
  • Docker: Works in any container with Node.js 18+ installed.
  • The core package (`@aipexstudio/aipex-core`) is platform-agnostic and can run in any JS runtime that supports ES modules.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment