MCP-Codex: Model Context Protocol Tool Orchestration
About
A MCP server for calling MCP tools remotely without requiring installation.
Details
- Author
- twolven
- Downloads
- 435
- Categories
- Other
Jump to
- Dynamic tool discovery without restarting the AI assistant
- Centralized management of MCP tools
- Remote execution of tools beyond the local machine
- Intelligent agent “The Librarian” for context-aware recommendations
- Standardized interface for tool search and execution
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP-Codex: Model Context Protocol Tool OrchestrationCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install by cloning the repository, running pip install -r requirements.txt, creating config, data, logs, tools directories, and configuring the .env file. Start the Codex Service with python codex-serv.py and the MCP Client with python mcp-codex.py. For Claude Desktop, use mcp install mcp-codex.py. The client registers two tools: search (find tools for a task) and call_tool (execute discovered tools).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp-codex: model context protocol tool orchestration": {
"mcp-codex": {
"command": "python",
"args": [
"codex-serv.py"
]
}
}
}
}
McpServers
{
"mcp-codex": {
"command": "python",
"args": [
"codex-serv.py"
]
}
}
MCP-Codex: Model Context Protocol Tool Orchestration
DISCLAIMER: This project was discontinued after Cloudflare released a similar service that addressed many of the same problems. I'm sharing this codebase as an educational resource and example of MCP orchestration architecture. While no longer actively developed, the concepts and implementations may still be valuable to those interested in AI tool orchestration. Please see Cloudflare's new Remote MCP service and their blogpost announcement here: https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/
A service for orchestrating Model Context Protocol (MCP) servers and allowing AI assistants to dynamically discover and utilize tools without requiring restarts, powered by "The Librarian" - an intelligent agent that understands user needs and connects them with the perfect tools.
Overview
MCP-Codex solves a core problem with the Model Context Protocol ecosystem: the need to restart AI assistants when adding new tools. It enables dynamic tool discovery and execution through a central service, allowing AI assistants to use any compatible MCP tool on demand.
The Librarian: Intelligent Tool Discovery
At the heart of MCP-Codex is "The Librarian" - an intelligent agent designed to understand user needs and connect them with the right tools. The Librarian functions as an agentic RAG (Retrieval-Augmented Generation) system with:
- Multi-Vector Knowledge Base: Separate vector databases for industry knowledge and internal documentation
- MCP Repository Awareness: Deep understanding of available MCP tools across the ecosystem
- Just-in-Time Tool Installation: Capability to install tools on-demand before they're needed
- Context-Aware Recommendations: Uses the full context of user queries to identify the optimal tools
- Seamless Integration: Handles all details of tool discovery, installation, and execution
The Librarian effectively serves as a universal adapter between user intent and technical capabilities, eliminating the cognitive load of tool selection for both users and AI assistants.
The Problem
Model Context Protocol (MCP) is a powerful standard for connecting AI assistants to external tools and data sources. However, traditional MCP implementations have a significant limitation:
- Static Configuration: Tools must be configured at startup, requiring restarts whenever new capabilities are needed
- Local-Only Operation: Tools typically run on the same machine as the assistant
- Limited Discovery: Assistants have no standardized way to discover what tools are available
- High Cognitive Load: Users must know exactly which tool they need for a specific task
The Solution
MCP-Codex provides a bridge between AI assistants and the broader MCP ecosystem by offering:
1. Intelligent Tool Discovery: The Librarian service analyzes user intent and recommends the perfect tools
2. Dynamic Tool Management: Tools can be installed, configured, and executed on-demand
3. Remote Execution: Tools can run anywhere, not just on the local machine
4. Centralized Management: Tools can be added, updated, or removed without restarting assistants
5. Standardized Protocol: A consistent interface for interacting with any MCP tool
Architecture
The project consists of three main components:
1. Codex Service (codex-serv.py): The core execution service that manages tool discovery and invocation
2. Librarian Service (planned): An AI-powered tool recommendation system
3. MCP Client (mcp-codex.py): The MCP-compatible interface for AI assistants
How It Works
1. The AI assistant connects to the MCP-Codex client
2. The client presents two main tools: search and call_tool
3. The assistant can search for capabilities using natural language
4. Once a tool is identified, it can be executed through a standardized call
5. The Codex service handles the actual tool execution and returns results
Components
Codex Service
The central orchestration service that:
- Manages the registry of available MCP tools
- Handles tool execution requests
- Routes requests to the appropriate tool subprocess
- Manages tool lifecycle
MCP Client
The MCP-compliant interface that allows any MCP-compatible assistant to:
- Connect to the Codex ecosystem
- Search for available tools
- Execute tools through a standardized interface
Included Tool Examples
The repository includes several example MCP tools:
- StockFlow: Financial data and stock market analysis tools
- OptionsFlow: Options trading analysis and strategy evaluation
- CodeSavant: Code management, editing, and execution tools
- StockScreen: Stock screening and filtering capabilities
Installation
Prerequisites
- Python 3.10+
- Required Python packages (see requirements.txt)
Setup
1. Clone the repository:
git clone https://github.com/your-username/mcp-codex.git
cd mcp-codex
2. Install dependencies:
pip install -r requirements.txt
3. Create required directories:
mkdir -p config data logs tools
4. Configure your environment:
```bash
cp .env.example .env
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



