AI Optimizer MCP
Enables integration with GitHub Actions for CI/CD pipelines, allowing automated code testing and optimization workflows through subprocess execution.
Supports integration with Jenkins for CI/CD pipelines, enabling automated code testing and optimization workflows in Jenkins environments.
Integrates with OpenAI's API for AI-powered code optimization and improvement capabilities, requiring an OpenAI API key for functionality.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI Optimizer MCPrun tests on this Python function that calculates factorial"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Optimizer MCP 🧠🔧 - Multi-Task MCP Server
Developed by Barack Ndenga ♥️
Details
Multi-task MCP Server for VSCode/Cursor, CLI, autonomous agents. AI code optimization + testing + extensible.
Transports: Stdio (VSCode), subprocess, HTTP (future)
Use Cases: VSCode chat, agent loops, CI/CD, remote servers
Security: Env vars, sandbox exec
Related MCP server: VegaMCP
Manifesto (Multi-Task Capabilities)
🛠️ 3+ Tools: Code test/optimize/objective (+extensible)
🔌 VSCode/Cursor: native mcp.json
🖥️ CLI Standalone:
ai-optimizer-mcp run🤖 Agents: examples/agent.py loop
⚙️ Multi-Env: Local/dev/prod via .env
📊 Memory/History: Persistent JSON
🔄 Iterative Loops: Auto-improve
Multi-Platform Configuration
1. VSCode/Cursor (Recommended)
.vscode/mcp.json file (multi-servers):
{
"servers": {
"ai-optimizer": {
"command": "python",
"args": ["-m", "ai_optimizer_mcp.server"]
},
"ai-optimizer-dev": {
"command": "python",
"args": ["-m", "ai_optimizer_mcp.cli", "run", "--dev"]
}
}
}Multi-task: Switch servers in chat!
2. CLI / Scripts / Agents
ai-optimizer-mcp run # Stdio server (pipes)
ai-optimizer-mcp run --dev # Debug
ai-optimizer-mcp --install-mcp # Print mcp.json3. Autonomous Agents / Subprocess
# examples/agent.py
import asyncio
from mcp.client.stdio import stdio_client
async def agent_loop():
async with stdio_client(command=["python", "-m", "ai_optimizer_mcp.server"]) as client:
# Multi-task calls
score = await client.call_tool("run_tests", {"code_snippet": code})
improved = await client.call_tool("generate_improvement", {"code": code, "test_result": score})Prerequisites (.env)
cp .env.example .env
# OPENAI_API_KEY=sk-...
# OBJECTIVE="Your custom goal"Multi-Task Usage
VSCode Chat:
use_mcp_tool("ai-optimizer", "run_tests", ...)CLI Pipe:
echo code | ai-optimizer-mcp runAgent Loop:
python examples/agent.pyCI/CD: Subprocess in GitHub Actions/Jenkins
Tool Response Example:
run_tests → "Tests passed: score=4/4 (f(2)=4)"
generate_improvement → "def f(x): return 2 * x"Multi-Env Troubleshooting
VSCode: Reload window after mcp.json
No API Key: ValueError → Check .env
Timeout:
TEST_TIMEOUT=10in .envMemory:
rm memory.jsonLogs:
--devorLOG_LEVEL=DEBUG
Development
pip install -e .[dev]
pre-commit install
pytestMCP Tools (Extensible)
Tool | Args | Use Case |
|
| VSCode/CLI test code |
|
| Auto-optimize |
| - | Read goal any context |
Apache 2.0 - Multi-task ready! VSCode, CLI, Agents, CI. Contribute!
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceA production-grade MCP server providing an autonomous AI agent swarm, persistent semantic memory, browser automation, multi-model reasoning, and 78+ tools for AI-first testing and development.63MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables AI coding agents to communicate, share state, and coordinate work in real time via MCP tools or REST API.1305MIT
- AlicenseNot gradedqualityBmaintenanceMulti-agent AI orchestrator that runs parallel coding agents in isolated sessions with self-improving intelligence, exposed via an MCP server for task execution and management.MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BarackNdenga/AI-Task-Optimizer-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server