(Powered by FastMCP, Ollama, and Redis)
This project separates the AI Interface from the Capabilities Layer through an MCP (Message Communication Protocol) bridge.
- The Brain (Ollama + Client Scripts):
agent_cli.pyanddiscord_bot.pyhandle user interaction. They maintain conversation state, dynamic system prompts, and automatically detect which tools should be invoked via standardollamafunction calling. - The Hands (MCP Server):
server/mcp_server.pymaintains isolated capabilities. If an agent wants to hit the Gematria cache or retrieve long-term memory, it calls the MCP Server over custom standard I/O streams. This ensures core tools never crash the LLM loop and keeps concerns cleanly separated.
config.json: Master configuration. Holds hyper-parameters (e.g.temperature,max_tool_turns) and the coresystem_prompttext.tools/gematria.py: A massively efficient cipher calculator that analyzes texts, converts words into 9 distinct cryptographic codes, and caches the results directly into a Redis Vector/Hash Database.tools/memory.py: Semantic memory engine. When the agent wants to remember something, it uses the Ollamanomic-embed-textmodel to embed the text into a Vector Field natively sorted in Redis Stack.client/agent_cli.py: Your global terminal orchestration script. (Alias:agent).
1. Start Redis Backend The semantic database and Gematria cipher caching operate entirely in-memory using Redis Stack.
# We spin this up natively in Docker
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest2. The Terminal Agent You can invoke the agent interactively from anywhere in your console:
agentIt will load your terminal interface, hook into the MCP server, load the tools dynamically, and immediately start answering your inputs while having full read/write access to your system tools.
3. The Discord AI Interface Your bot will intercept commands from Discord perfectly synced to the same MCP Server. To run it infinitely:
~/mcp_tools/venv/bin/python ~/mcp_tools/client/discord_bot.py(Requires the token to be set correctly inside ~/mcp_tools/.env)