Codex with IDrive® e2 Self-Hosted MCP

IDrive® e2 MCP connects your IDrive® e2 object storage with AI assistants and applications using the open Model Context Protocol (MCP) standard. It enables compatible AI clients to securely access and work with your data using natural language, eliminating the need for custom integrations, scripts, or manual workflows. This guide explains how to connect Codex with IDrive® e2 storage using self-hosted MCP on Windows, Linux, or Mac machines.

Prerequisites

  1. An active IDrive® e2 account.
  2. Access to a Codex account.
  3. Node.js 20 or newer

Reference Architecture

IDrive e2 mcp guides

Deploy IDrive® e2 MCP Package

  1. Install the Self-hosted MCP package
    npm install --global @idrivee2/s3-mcp
    Or install it in a Node.js project:
    npm install @idrivee2/s3-mcp
  2. Run the agent after installation:
    idrivee2-s3-mcp
    The server starts in the background and prints its process ID, MCP URL, and log file. Use the default MCP URL to connect with Codex.
    http://127.0.0.1:1908/s3

Configure Codex for IDrive® e2 MCP

  1. Login to Codex and go to Plugins.
    idrive e2 mcp guides
  2. Navigate to Installed and click Setting icon.
    idrive e2 mcp guides
  3. Click Add and select Add MCP server from the dropdown.
    idrive e2 mcp guides
  4. Under Connect to a custom MCP dialog box, provide the following details and click Save.
    1. Choose Streamable HTTP
    2. Name for the connector: IDrive e2
    3. URL of the MCP server: http://127.0.0.1:1908/s3
    idrive e2 mcp guides
  5. You will be redirected to the IDrive® e2 web console.
  6. Enter your IDrive® e2 account email address and password and click Sign in.
    IDrive e2 mcp guides
  7. Set session timeout duration and access permission.
    IDrive e2 mcp guides
  8. Once authenticated, you will be redirected to Codex. You can now use natural language prompts to interact with IDrive® e2 storage.

Connect the IDrive® e2 MCP Server to Codex CLI

You can connect the IDrive® e2 Model Context Protocol (MCP) server to Codex CLI using OAuth authentication.

  1. Add the IDrive® e2 MCP Server by executing the following command.
    codex mcp add idrive-s3 \
    --url http://127.0.0.1:1908/s3
  2. Authenticate with IDrive® e2
    After executing the command, you will be redirected to the IDrive® e2 sign-in page.
    1. Sign in using your IDrive® e2 credentials
    2. Set session timeout duration and access permission.
    3. Click Authorize to grant Codex access to your IDrive® e2 account.
  3. After authorization, you are redirected back to Codex. You can now start using the IDrive® e2 MCP tools from within Codex CLI.