MCP integration SDK for agent orchestration, persistent memory, AI reasoning, and Darwin Gödel Machine (DGM) evolution.
mcpvotsagi is the Python SDK of the MCPVOTS ecosystem. It gives AI agents a unified, AsyncIO-native interface to the MCPVOTS platform:
- Persistent memory — Redis-backed key-value store with categories and search
- Agent-to-agent (A2A) communication — WebSocket protocol gateway with agent registry and discovery
- AI reasoning — DeepSeek reasoning engine (Ollama) with task-aware prompting
- Darwin Gödel Machine evolution — self-improving programs via genetic algorithms (DGM)
- MCP server orchestration — consolidated management of DeepSeek and OpenCTI MCP servers
⚡ Python 3.11+ · AsyncIO · Redis · WebSockets · Ollama
pip install mcpvotsagiWith optional feature sets:
pip install mcpvotsagi[trading] # Solana trading support
pip install mcpvotsagi[ai] # OpenAI integration
pip install mcpvotsagi[monitoring] # Prometheus metrics
pip install mcpvotsagi[all] # Everythingimport asyncio
from mcpvotsagi import MCPVotsAGI, MCPVotsAGIConfig
async def main():
config = MCPVotsAGIConfig(
redis_host="localhost",
redis_password="your-password",
)
async with MCPVotsAGI(config) as agi:
# Store and retrieve memories
await agi.memory.store_memory("trade_1", {"action": "buy", "asset": "SOL", "price": 185.50}, category="trading")
memory = await agi.memory.retrieve_memory("trade_1")
print(memory)
# Search memories by category
trades = await agi.memory.search_memories(category="trading")
# AI reasoning
result = await agi.reason("Should I buy SOL at current price?", task_type="trading")
print(result)
# System status
status = await agi.status()
print(status)
asyncio.run(main())All settings can be passed via MCPVotsAGIConfig or environment variables:
| Env Variable | Default | Description |
|---|---|---|
REDIS_HOST |
localhost | Redis host |
REDIS_PORT |
6379 | Redis port |
REDIS_PASSWORD |
(empty) | Redis password |
A2A_PORT |
8001 | A2A gateway port |
MCP_MEMORY_PORT |
3002 | Memory MCP server port |
DEEPSEEK_PORT |
3003 | DeepSeek MCP server port |
OPENCTI_PORT |
3007 | OpenCTI MCP server port |
OLLAMA_HOST |
http://localhost:11434 | Ollama API host |
LOG_LEVEL |
INFO | Logging level |
Main SDK client. Use as an async context manager.
async with MCPVotsAGI() as agi:
agi.memory # EnhancedMCPMemoryServer
agi.a2a # A2AProtocolGateway
agi.dgm # UnifiedDGMServerMethods:
await agi.start()— Initialize all servicesawait agi.stop()— Shut down all servicesawait agi.reason(prompt, *, task_type="general", context=None) -> str— AI reasoning (task_type:trading,security,ecosystem,general)await agi.status()— System health check
Persistent key-value memory with Redis backend.
# Store
memory_id = await agi.memory.store_memory("key", {"data": "value"}, category="trades")
# Retrieve
entry = await agi.memory.retrieve_memory("key")
# Search by category
results = await agi.memory.search_memories(category="trades", limit=50)
# Delete
await agi.memory.delete_memory("key")
# Stats
stats = await agi.memory.get_stats()Agent-to-agent communication via WebSocket.
gateway = agi.a2a
await gateway.start_server()
# Register an agent
await gateway.agent_registry.register_agent(AgentInfo(...))
# Discover agents by capability
agents = gateway.agent_registry.discover_agents(capability="trading")Darwin Gödel Machine evolution engine for self-improving programs.
dgm = agi.dgm
result = await dgm.evolve_program({
"program_id": "strategy_1",
"task": "trading_optimization",
"iterations": 100,
})┌──────────────────────────────────┐
│ MCPVotsAGI Client │
├──────────┬──────────┬────────────┤
│ Memory │ A2A │ DGM │
│ (Redis) │ (WS:8001)│ (Evolution)│
├──────────┴──────────┴────────────┤
│ MCP Servers │
│ ┌──────────┐ ┌───────────────┐ │
│ │ DeepSeek │ │ OpenCTI │ │
│ │ (Ollama) │ │ (Threat Intel)│ │
│ └──────────┘ └───────────────┘ │
└──────────────────────────────────┘
git clone [email protected]:MCPVOT/mcpvotsagi.git
cd mcpvotsagi
pip install -e ".[dev]"
# Lint
ruff check src/mcpvotsagi/
# Test
pytest
# Type check
mypy src/mcpvotsagi/- Repository — github.com/MCPVOT/mcpvotsagi
- Ecosystem — MCPVOTS Platform
- Issues — github.com/MCPVOT/mcpvotsagi/issues
MIT — see LICENSE.