Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Provides LLMs with persistent memory and reusable skills via MCP, enabling semantic storage and retrieval of user preferences, project context, and step-by-step procedures across conversations.

README.md

Context Intelligence Layer

A model-agnostic middleware that gives LLMs persistent memory and reusable skills via the Model Context Protocol (MCP).

Why this exists

Every time you start a new conversation with an LLM, it forgets everything — your preferences, past decisions, project context, and workflows you've already explained. You end up repeating yourself across sessions.

This project solves that. It gives any MCP-compatible model a long-term memory and a skill library backed by a vector database. Memories are stored semantically, so the model retrieves them by meaning — not exact keywords. Skills let you save multi-step procedures once and have the model follow them automatically in future sessions.

The key design choice: model-agnostic. This isn't locked to Claude or GPT. Any client that speaks MCP (Claude Desktop, Claude Code, Codex, LiteLLM, or anything built tomorrow) can plug in and instantly get persistent context. Switch models, keep your memory.

What it can do

  • Remember who you are, what you're working on, and how you like things done
  • Recall decisions from weeks-old conversations without you repeating them
  • Store deployment checklists, debugging workflows, or review processes as reusable skills
  • Work across multiple AI clients simultaneously — same memory, different models

---

Features

  • Persistent memory — store facts, preferences, decisions, and goals across conversations
  • Semantic search — retrieve memories by meaning, not just keywords
  • Reusable skills — save step-by-step instructions that any LLM can find and follow
  • Domain-scoped storage — memories organized into identity, projects, code, general
  • Bearer token auth — API key protection on every tool call
  • Model-agnostic — works with any MCP client (Claude Desktop, Claude Code, Codex, etc.)

---

Architecture

MCP Client (Claude / Codex / etc.)
        │
        │  MCP (Streamable HTTP)
        ▼
 context-mcp server  ←─── FastMCP 3.x + Python
        │
        │  Qdrant client
        ▼
   Qdrant (vector DB)

---

Project Structure

context-intelligence/
│
├── server/                        # ── Core Server ──
│   ├── main.py                    # MCP server entry point, tool definitions, auth setup
│   ├── qdrant_store.py            # Qdrant CRUD — store, search, delete operations
│   ├── schemas.py                 # Pydantic models (MemoryEntry, SkillEntry)
│   └── embeddings.py              # FastEmbed wrapper (all-MiniLM-L6-v2, 384 dims)
│
├── setup/                         # ── Setup & Config ──
│   └── init_collections.py        # One-time script to create Qdrant collections
│
├── docs/                          # ── Documentation ──
│   └── SYSTEM_PROMPT.md           # Drop-in system prompt for LLM clients
│
├── Dockerfile                     # Container build for the MCP server
├── requirements.txt               # Python dependencies
├── README.md                      # You are here
├── LICENSE                        # MIT
└── .gitignore

---

MCP Tools

| Tool | Description | |------|-------------| | store_memory_tool | Store a memory in a domain collection | | search_memory_tool | Semantic search across memories | | delete_memory_tool | Delete a memory by ID | | store_skill_tool | Save a reusable skill with instructions | | find_skill_tool | Find relevant skills by intent | | list_skills_tool | List all stored skills |

---

Quick Start

Prerequisites

  • Docker + Docker Compose

1. Clone and build the image

git clone https://github.com/myselfvivek17/context-intelligence.git
cd context-intelligence
docker build -t context-mcp:latest .

2. Create docker-compose.yml

services:
  qdrant:
    image: qdrant/qdrant
    network_mode: host
    volumes:
      - /data/qdrant:/qdrant/storage
    environment:
      - QDRANT__SERVICE__API_KEY=your-qdrant-key
    restart: unless-stopped

  context-mcp:
    image: context-mcp:latest
    network_mode: host
    environment:
      - QDRANT_URL=http://localhost:6333
      - QDRANT_API_KEY=your-qdrant-key
      - FASTMCP_HOST=0.0.0.0
      - FASTMCP_PORT=8083
      - MCP_API_KEY=your-mcp-api-key
      - MAX_SEARCH_LIMIT=50
    restart: unless-stopped

Note: Replace your-qdrant-key and your-mcp-api-key with your own random strings — these are secrets you create, not values you get from anywhere. Use a password generator or something like openssl rand -base64 24.

3. Start the stack

docker compose up -d

4. Initialize Qdrant collections (run once)

Wait a few seconds for Qdrant to start, then:

With Docker: ``bash docker run --rm --network host \ -e QDRANT_URL=http://localhost:6333 \ -e QDRANT_API_KEY=your-qdrant-key \ context-mcp:latest \ python setup/init_collections.py ``

With Python (if installed locally): ``bash pip install qdrant-client QDRANT_URL=http://your-server:6333 QDRANT_API_KEY=your-qdrant-key python init_collections.py ``

This creates the 5 required Qdrant collections:

| Collection | Purpose | |------------|---------| | memory_identity | User preferences, personal facts, who the user is | | memory_projects | Ongoing work, goals, decisions, project context | | memory_code | Languages, frameworks, coding patterns, conventions | | memory_general | Everything else that doesn't fit above | | skills | Reusable step-by-step instructions for the LLM to follow |

---

Configuration

| Environment Variable | Default | Description | |----------------------|---------|-------------| | QDRANT_URL | http://localhost:6333 | Qdrant server URL | | QDRANT_API_KEY | _(none)_ | Qdrant API key | | MCP_API_KEY | _(none)_ | Bearer token for MCP auth | | FASTMCP_HOST | 0.0.0.0 | Server bind host | | FASTMCP_PORT | 8083 | Server port | | MAX_SEARCH_LIMIT | 50 | Max results per search query |

---

Connecting MCP Clients

Claude Code (.mcp.json)

{
  "mcpServers": {
    "context-intelligence": {
      "command": "npx",
      "args": [
        "--yes", "mcp-remote",
        "http://your-server:8083/mcp",
        "--allow-http",
        "--header", "Authorization: Bearer your-mcp-api-key"
      ]
    }
  }
}

Claude Desktop — Windows (claude_desktop_config.json)

{
  "mcpServers": {
    "context-intelligence": {
      "command": "cmd",
      "args": [
        "/c", "npx", "--yes", "mcp-remote",
        "http://your-server:8083/mcp",
        "--allow-http",
        "--header", "Authorization: Bearer your-mcp-api-key"
      ]
    }
  }
}

Codex (~/.codex/config.toml)

[[mcp_servers]]
name = "context-intelligence"
command = "npx"
args = ["--yes", "mcp-remote", "http://your-server:8083/mcp", "--allow-http", "--header", "Authorization: Bearer your-mcp-api-key"]

---

System Prompt

To enable automatic memory behavior in your AI client, see SYSTEM_PROMPT.md. It instructs the model to proactively search and store memories without being asked.

---

Memory Domains

| Domain | Use for | |--------|---------| | identity | User preferences, personal facts | | projects | Ongoing work, goals, decisions | | code | Languages, patterns, tools, conventions | | general | Everything else |

---

Tech Stack

  • FastMCP — MCP server framework
  • Qdrant — Vector database
  • FastEmbed — Local embeddings (all-MiniLM-L6-v2, 384 dims)
  • mcp-remote — stdio-to-HTTP bridge for MCP clients

---

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.