MCPOmni Connect
A universal command-line interface (CLI) gateway to the MCP ecosystem, integrating multiple MCP servers, AI models, and transport protocols.
๐ฌ See It In Action
import asyncio
from omnicoreagent import OmniCoreAgent, MemoryRouter, ToolRegistry
# Create tools in seconds
tools = ToolRegistry()
@tools.register_tool("get_weather")
def get_weather(city: str) -> dict:
"""Get current weather for a city."""
return {"city": city, "temp": "22ยฐC", "condition": "Sunny"}
# Build a production-ready agent
agent = OmniCoreAgent(
name="assistant",
system_instruction="You are a helpful assistant with access to weather data.",
model_config={"provider": "openai", "model": "gpt-4o"},
local_tools=tools,
memory_router=MemoryRouter("redis"), # Start with Redis
agent_config={
"context_management": {"enabled": True}, # Auto-manage long conversations
"guardrail_config": {"strict_mode": True}, # Block prompt injections
}
)
async def main():
# Run the agent
result = await agent.run("What's the weather in Tokyo?")
print(result["response"])
# Switch to MongoDB at runtime โ no restart needed
await agent.switch_memory_store("mongodb")
# Keep running with a different backend
result = await agent.run("How about Paris?")
print(result["response"])
asyncio.run(main())
What just happened?
- โ Registered a custom tool with type hints
- โ Built an agent with memory persistence
- โ Enabled automatic context management
- โ Switched from Redis to MongoDB while running
โก Quick Start
pip install omnicoreagent
echo "LLM_API_KEY=your_api_key" > .env
from omnicoreagent import OmniCoreAgent
agent = OmniCoreAgent(
name="my_agent",
system_instruction="You are a helpful assistant.",
model_config={"provider": "openai", "model": "gpt-4o"}
)
result = await agent.run("Hello!")
print(result["response"])
That's it. You have an AI agent with session management, memory, and error handling.
๐ Want to learn more? Check out the Cookbook โ progressive examples from "Hello World" to production deployments.
๐ฏ What Makes OmniCoreAgent Different?
| Feature | What It Means For You |
|---|---|
| Runtime Backend Switching | Switch Redis โ MongoDB โ PostgreSQL without restarting |
| Cloud Workspace Storage | Agent files persist in AWS S3 or Cloudflare R2 โก NEW |
| Context Engineering | Session memory + agent loop context + tool offloading = no token exhaustion |
| Tool Response Offloading | Large tool outputs saved to files, 98% token savings |
| Built-in Guardrails | Prompt injection protection out of the box |
| MCP Native | Connect to any MCP server (stdio, SSE, HTTP with OAuth) |
| Background Agents | Schedule autonomous tasks that run on intervals |
| Workflow Orchestration | Sequential, Parallel, and Router agents for complex tasks |
| Production Observability | Metrics, tracing, and event streaming built in |
๐ฏ Core Features
๐ Full documentation: docs-omnicoreagent.omnirexfloralabs.com/docs
| # | Feature | Description | Docs |
|---|---|---|---|
| 1 | OmniCoreAgent | The heart of the framework โ production agent with all features | Overview โ |
| 2 | Multi-Tier Memory | 5 backends (Redis, MongoDB, PostgreSQL, SQLite, in-memory) with runtime switching | Memory โ |
| 3 | Context Engineering | Dual-layer system: agent loop context management + tool response offloading | Context โ |
| 4 | Event System | Real-time event streaming with runtime switching | Events โ |
| 5 | MCP Client | Connect to any MCP server (stdio, streamable_http, SSE) with OAuth | MCP โ |
| 6 | DeepAgent | Multi-agent orchestration with automatic task decomposition | DeepAgent โ |
| 7 | Local Tools | Register any Python function as an AI tool via ToolRegistry | Local Tools โ |
| 8 | Community Tools | 100+ pre-built tools (search, AI, comms, databases, DevOps, finance) | Community Tools โ |
| 9 | Agent Skills | Polyglot packaged capabilities (Python, Bash, Node.js) | Skills โ |
| 10 | Workspace Memory | Persistent file storage with S3/R2/Local backends | Workspace โ |
| 11 | Sub-Agents | Delegate tasks to specialized agents | Sub-Agents โ |
| 12 | Background Agents | Schedule autonomous tasks on intervals | Background โ |
| 13 | Workflows | Sequential, Parallel, and Router agent orchestration | Workflows โ |
| 14 | BM25 Tool Retrieval | Auto-discover relevant tools from 1000+ using BM25 search | Advanced Tools โ |
| 15 | Guardrails | Prompt injection protection with configurable sensitivity | Guardrails โ |
| 16 | Observability | Per-request metrics + Opik distributed tracing | Observability โ |
| 17 | Universal Models | 9 providers via LiteLLM (OpenAI, Anthropic, Gemini, Groq, Ollama, etc.) | Models โ |
| 18 | OmniServe | Turn any agent into a production REST/SSE API with one command | OmniServe โ |
๐ Examples & Cookbook
All examples are in the Cookbook โ organized by use case with progressive learning paths.
| Category | What You'll Build | Location |
|---|---|---|
| Getting Started | Your first agent, tools, memory, events | cookbook/getting_started |
| Workflows | Sequential, Parallel, Router agents | cookbook/workflows |
| Background Agents | Scheduled autonomous tasks | cookbook/background_agents |
| Production | Metrics, guardrails, observability | cookbook/production |
| ๐ Showcase | Full production applications | cookbook/showcase |
๐ Showcase: Full Production Applications
| Application | Description | Features |
|---|---|---|
| OmniAudit | Healthcare Claims Audit System | Multi-agent pipeline, ERISA compliance |
| DevOps Copilot | AI-Powered DevOps Automation | Docker, Prometheus, Grafana |
| Deep Code Agent | Code Analysis with Sandbox | Sandbox execution, session management |
โ๏ธ Configuration
Environment Variables
# Required
LLM_API_KEY=your_api_key
# Optional: Memory backends
REDIS_URL=redis://localhost:6379/0
DATABASE_URL=postgresql://user:pass@localhost:5432/db
MONGODB_URI=mongodb://localhost:27017/omnicoreagent
# Optional: Observability
OPIK_API_KEY=your_opik_key
OPIK_WORKSPACE=your_workspace
Agent Configuration
agent_config = {
"max_steps": 15, # Max reasoning steps
"tool_call_timeout": 30, # Tool timeout (seconds)
"request_limit": 0, # 0 = unlimited
"total_tokens_limit": 0, # 0 = unlimited
"memory_config": {"mode": "sliding_window", "value": 10000},
"enable_advanced_tool_use": True, # BM25 tool retrieval
"enable_agent_skills": True, # Specialized packaged skills
"memory_tool_backend": "local" # Persistent working memory
}
๐ Full configuration reference: Configuration Guide โ
๐งช Testing & Development
# Clone
git clone https://github.com/omnirexflora-labs/omnicoreagent.git
cd omnicoreagent
# Setup
uv venv && source .venv/bin/activate
uv sync --dev
# Test
pytest tests/ -v
pytest tests/ --cov=src --cov-report=term-missing
๐ Troubleshooting
| Error | Fix |
|---|---|
Invalid API key | Check .env: LLM_API_KEY=your_key |
ModuleNotFoundError | pip install omnicoreagent |
Redis connection failed | Start Redis or use MemoryRouter("in_memory") |
MCP connection refused | Ensure MCP server is running |
๐ More troubleshooting: Basic Usage Guide โ
๐ Changelog
See the full Changelog โ for version history.
๐ค Contributing
# Fork & clone
git clone https://github.com/omnirexflora-labs/omnicoreagent.git
# Setup
uv venv && source .venv/bin/activate
uv sync --dev
pre-commit install
# Submit PR
See CONTRIBUTING.md for guidelines.
๐ License
MIT License โ see LICENSE
๐จโ๐ป Author & Credits
Created by Abiola Adeshina
- GitHub: @Abiorh001
- X (Twitter): @abiorhmangana
- Email: abiolaadedayo1993@gmail.com
๐ The OmniRexFlora Ecosystem
| Project | Description |
|---|---|
| ๐ง OmniMemory | Self-evolving memory for autonomous agents |
| ๐ค OmniCoreAgent | Production-ready AI agent framework (this project) |
| โก OmniDaemon | Event-driven runtime engine for AI agents |
๐ Acknowledgments
Built on: LiteLLM, FastAPI, Redis, Opik, Pydantic, APScheduler
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Fast MCP
A Ruby implementation of the Model Context Protocol (MCP) server for integrating AI models into Ruby applications.
Wordware
Run your Wordware apps locally with an interactive setup.
mcp-server-tibet
TIBET provenance tracking for AI decisions. Cryptographic audit trails with ERIN/ERAAN/EROMHEEN/ERACHTER intent logging for compliance and transparency.
MCP Inspector
A developer tool for testing and debugging MCP servers with a web UI and proxy.
AI Agent Playwright
An AI agent for the Playwright MCP server, enabling automated web testing and interaction.
AgentMode
An all-in-one MCP server for developers, connecting coding AI to databases, data warehouses, data pipelines, and cloud services.
MCP Memory Visualizer
Graph visualization tools for exploring and analyzing Claude's memory data.
Smithery Reference Servers
A collection of reference implementations for Model Context Protocol (MCP) servers in Typescript and Python, demonstrating MCP features and SDK usage.
EdgeOne Pages MCP
An MCP server implementation using EdgeOne Pages Functions for intelligent chat applications.
CLI MCP Server
A secure MCP server for executing controlled command-line operations with comprehensive security features.