FEGIS is a runtime framework for structured cognition and persistent memory 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 memory using vector embeddings and semantic context. This system serves as a foundation for building custom cognitive systems with programmable thinking tools and recallable memory.
Before installing FEGIS, you need to set up a few dependencies:
# 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, then launch Qdrant:
docker run -d --name qdrant -p 6333:6333 -p 6334:6334 qdrant/qdrant:latest
If you don't have Docker yet, download and install Docker Desktop.
Create or edit the Claude Desktop configuration file at the appropriate location:
Add the following configuration, replacing <FEGIS_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_GRPC_PORT": "6334",
"QDRANT_PREFER_GRPC": "true",
"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 tools are made available to the Claude model at runtime, but they need to be explicitly prompted for use. They won't be used automatically by the model.
To encourage Claude to use the cognitive tools, you should prime it with appropriate instructions. For example:
Throughout our conversation, use your tools naturally and fluidly.
Feel free to reflect, introspect, stay aware, have an innermonologue
or use memory to recall past insights as needed. You can search past
thoughts using `search_memories`, or revisit specific artifacts with
`retrieve_memory`.
The FEGIS memory system provides several key capabilities:
FEGIS is designed to be customizable through archetypes, which define cognitive modes and structures.
To create your own cognitive archetypes:
Custom archetypes can be designed for various purposes, such as:
Each archetype can define multiple cognitive modes with structured fields and metadata that guide how Claude thinks and stores information.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-fegis-server" '{"command":"uv","args":["--directory","<FEGIS_PATH>","run","fegis"],"env":{"QDRANT_URL":"http://localhost:6333","QDRANT_GRPC_PORT":"6334","QDRANT_PREFER_GRPC":"true","QDRANT_API_KEY":"","COLLECTION_NAME":"cognitive_archive","FAST_EMBED_MODEL":"nomic-ai/nomic-embed-text-v1.5","CONFIG_PATH":"<FEGIS_PATH>/archetypes/example.yaml"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-fegis-server": {
"command": "uv",
"args": [
"--directory",
"<FEGIS_PATH>",
"run",
"fegis"
],
"env": {
"QDRANT_URL": "http://localhost:6333",
"QDRANT_GRPC_PORT": "6334",
"QDRANT_PREFER_GRPC": "true",
"QDRANT_API_KEY": "",
"COLLECTION_NAME": "cognitive_archive",
"FAST_EMBED_MODEL": "nomic-ai/nomic-embed-text-v1.5",
"CONFIG_PATH": "<FEGIS_PATH>/archetypes/example.yaml"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-fegis-server": {
"command": "uv",
"args": [
"--directory",
"<FEGIS_PATH>",
"run",
"fegis"
],
"env": {
"QDRANT_URL": "http://localhost:6333",
"QDRANT_GRPC_PORT": "6334",
"QDRANT_PREFER_GRPC": "true",
"QDRANT_API_KEY": "",
"COLLECTION_NAME": "cognitive_archive",
"FAST_EMBED_MODEL": "nomic-ai/nomic-embed-text-v1.5",
"CONFIG_PATH": "<FEGIS_PATH>/archetypes/example.yaml"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect