Skip to main content

Code codex aid ai.

Project description

CodexAid - MCP Self-Learning Service

A powerful service for building, managing, and deploying self-learning and self-generating MCP (Model Context Protocol) agents.

Overview

CodexAid is a framework that allows you to create intelligent MCP agents that can learn from tasks and generate new skills on their own. The system follows a design-develop-deploy pipeline that turns natural language prompts into functional MCP servers with custom tools.

Features

  • Self-Learning: Create agents that can learn from user interactions
  • Self-Generation: Generate new MCP servers based on natural language prompts
  • Tool Generation: Automatically create and deploy new tools based on requirements
  • FastAPI Integration: Expose MCP functionality through an HTTP API
  • Design-Develop Pipeline: Structured approach to converting tasks into working code

Architecture

The system consists of several key components:

  • Designer: Analyzes tasks and creates specifications for development
  • Developer: Implements tools based on specifications
  • MCP Builder: Constructs MCP servers from developed tools
  • Tool Server: FastAPI server that hosts and manages MCP tools

Getting Started

Prerequisites

  • Python 3.12 or higher
  • Dependencies listed in pyproject.toml

Installation

# Clone the repository
git clone <repository-url>
cd CodexAid

# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -e .

Usage

  1. Start the Tool Server:
python mcp_service/tool_server.py
  1. Create a new MCP from a prompt:
from scr.work import mcp_create

# Generate a new MCP server from a natural language prompt
mcp_str = mcp_create("Create a tool that summarizes web content")

# Save the generated server
with open("my_new_mcp.py", "w") as f:
    f.write(mcp_str)
  1. Use the HTTP API to generate new MCPs:
curl -X POST "http://localhost:8848/new_mcp" \
     -H "Content-Type: application/json" \
     -d '{"prompt": "Create a tool that searches for information"}'

API Endpoints

  • GET /health - Check server health
  • GET /reset - Reset the MCP manager
  • GET /get_tool - Get available tools
  • GET /get_tool/{agent_name} - Get tools for a specific agent
  • POST /call_tool/{tool_name} - Call a specific tool
  • POST /new_mcp - Generate a new MCP from a prompt

Configuration

Edit the config.py file to configure:

  • LLM API endpoints and keys
  • MCP service paths
  • Server port

Examples

Creating a Learning Timer

from mcp.server.fastmcp import FastMCP
mcp = FastMCP("LearningTimer")

@mcp.tool(description='Start a learning timer when detected')
async def start_learning_timer():
    # Implementation details
    pass

if __name__ == '__main__':
    mcp.run(transport='stdio')

License

See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_sleeeepyzhou_codexaid-0.1.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_sleeeepyzhou_codexaid-0.1.0-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_sleeeepyzhou_codexaid-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_sleeeepyzhou_codexaid-0.1.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_sleeeepyzhou_codexaid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 867dc9d2f18e449c2f2720574e4717a19dacde7c7162c515cfb45526528ad6fc
MD5 a5db6fabaf8ff439e9ea86dc75835d30
BLAKE2b-256 45eb3ddbc16e7cbf1b796549ba062f2ee76ca09588ceaa57b24c315e2e387f7e

See more details on using hashes here.

File details

Details for the file iflow_mcp_sleeeepyzhou_codexaid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_sleeeepyzhou_codexaid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_sleeeepyzhou_codexaid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7411974050895c8a26b5a1da45a916461c70644378d65373f39e18e2f580cd91
MD5 7ab1616967037f6db43c202d8cd1485d
BLAKE2b-256 7f3ded0e11d4a633de99361dd89772d66ff3c45681432f61f0f279a09ea70e3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page