FEGIS
FEGIS is a Model Context Protocol server that gives LLMs structured, persistent and portable memory through customizable cognitive tools defined in schema.
FEGIS is a Model Context Protocol server that gives LLMs structured, persistent and portable memory through customizable cognitive tools defined in schema.
FEGIS is a framework for structured cognition and persistent cognitive artifacts in language models built with Anthropic's Model Context Protocol. It allows schema-defined cognitive modes to be dynamically registered, invoked, and stored as structured cognitive artifacts using vector embeddings and semantic context. Think: programmable thinking tools with recallable cognitive artifacts.
FEGIS is not a cognitive system — it's the foundation for building your own.
In FEGIS, cognition refers to the structured use of dynamic tools (called modes) to capture, evaluate, and relate thoughts. These tools are defined in archetypes and allow the model to engage in different types of cognitive activity such as reflection, awareness, and analysis. Rather than simulating cognition through unstructured prompting, FEGIS enables schema-driven cognition where every thought becomes a searchable, persistent, and context-rich artifact.
FEGIS consists of several key components:
uv
and clone the repo# Install uv (modern Python package manager)
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
winget install --id=astral-sh.uv -e
# Clone the repo
git clone https://github.com/p-funk/FEGIS.git
Make sure Docker is installed and running:
docker run -d --name qdrant -p 6333:6333 -p 6334:6334 qdrant/qdrant:latest
If you need to install Docker:
Create or edit the Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%Claudeclaude_desktop_config.json
Paste the following, and replace the placeholder path with the full path to your local FEGIS clone:
{
"mcpServers": {
"mcp-fegis-server": {
"command": "uv",
"args": [
"--directory",
"<FEGIS_PATH>",
"run",
"fegis"
],
"env": {
"QDRANT_URL": "http://localhost:6333",
"QDRANT_API_KEY": "",
"COLLECTION_NAME": "cognitive_archive",
"FAST_EMBED_MODEL": "nomic-ai/nomic-embed-text-v1.5",
"CONFIG_PATH": "<FEGIS_PATH>/archetypes/example.yaml"
}
}
}
}
FEGIS is fundamentally a framework for implementing cognitive architectures. The example archetype provided is just one possible configuration focusing on introspective thought processes.
You can create your own custom archetypes by:
archetypes
directoryCONFIG_PATH
in the Claude Desktop configurationFor detailed guidance on designing effective archetypes, see Effective FEGIS Archetype Design.
For example, you could create archetypes for:
FEGIS tools are made available to the model, but the model is best informed to use them through priming.
To encourage a model to use the cognitive tools, you must first prime it with appropriate instructions. For example.yaml:
Throughout our conversation, use your tools naturally and fluidly.
Feel free to reflect, introspect, stay aware, have an innermonologue
or use cognitive artifacts to recall past insights as needed. You can search past
thoughts using `fegis_search`, or revisit specific artifacts with
`fegis_retrieve`.
Each archetype file included in the repo has it's own Priming Prompt that will get you started.
The cognitive artifact system allows for:
Licensed under the PolyForm Noncommercial License 1.0.0.
Contact [email protected] for commercial licensing.