CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Cognos Session Memory

base76-research-lab/cognos-session-memory
1STDIOregistry active
Summary

This server maintains verified session context across Claude conversations using an epistemic trust scoring formula (C = p·(1−Ue−Ua)) that weighs prediction confidence against uncertainty before injecting context. It exposes two MCP tools: save_session to persist summaries with trust scores and load_session to retrieve verified context above a threshold. Under the hood it runs a FastAPI gateway with a /v1/plan endpoint that extracts structured fields from recent SQLite traces, computes trust scores, and either injects a system prompt or flags low-confidence context for review. Reach for this when you need audit trails of what context was injected into prompts or want to gate retrieval on confidence scores rather than dumping all prior session data indiscriminately.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

CognOS Session Memory

mcp-name: io.github.base76-research-lab/cognos-session-memory

Verified context injection via epistemic trust scoring for LLMs.

Solves session fragmentation by maintaining verified, high-confidence session context between conversations.

Problem

Large language models suffer from session fragmentation: each new conversation starts without verified context of previous work. This forces repeated explanations, loses decision history, and breaks long-running workflows.

Existing solutions (persistent memory systems, vector retrieval) either:

  • Lack trust scores before injection → hallucinations propagate
  • Don't audit which context was injected → compliance gaps
  • Treat all past information equally → noise overwhelms signal

Solution

A plan-mode gateway that:

  1. Extracts structured context from 3-5 recent traces
  2. Scores context quality via CognOS epistemic formula: C = p · (1 − Ue − Ua)
  3. Injects as system prompt only if C > threshold
  4. Flags for manual review if C < threshold
  5. Audits every context injection with trace IDs → EU AI Act compliance

Architecture

recent_traces (n=5)
    ↓
extract_context() → ContextField + coverage
    ↓
compute_trust_score(p, ue, ua) → C, R, decision
    ↓
if C > threshold:
    system_prompt ← inject
else:
    flagged_reason ← manual review

Core Formula

C = p · (1 − Ue − Ua)
R = 1 − C

where:
  p   = prediction confidence (coverage of required fields)
  Ue  = epistemic uncertainty (divergence between traces)
  Ua  = aleatoric uncertainty (mean risk in traces)

Action Gate

R < 0.25       → PASS      (inject without review)
0.25 ≤ R < 0.60 → REFINE   (inject with caution)
R ≥ 0.60       → ESCALATE  (flag for manual review)

API

POST /v1/plan

Extract and score context.

Request:

{
  "n": 5,
  "trust_threshold": 0.75,
  "mode": "auto"
}

Response (if injected):

{
  "status": "injected",
  "trust_score": 0.82,
  "confidence": 0.82,
  "risk": 0.18,
  "decision": "PASS",
  "context": {
    "active_project": "CognOS mHC research",
    "last_decision": "Verify P1 hypothesis",
    "open_questions": ["How does routing entropy scale?"],
    "current_output": "exp_008 complete",
    "recent_models": ["gpt-4", "claude-3", "mistral"]
  },
  "system_prompt": "## CognOS Context...",
  "trace_ids": ["uuid-1", "uuid-2", ...]
}

Response (if flagged):

{
  "status": "flagged",
  "trust_score": 0.45,
  "decision": "REFINE",
  "flagged_reason": "Trust score 0.45 below threshold 0.75. Manual review recommended.",
  "trace_ids": [...]
}

Modes

  • auto (default) — inject if trust_score ≥ threshold, else flag
  • force — always inject (for testing)
  • dry_run — compute score but never inject

Claude Code Integration

As a /compact replacement

# In any Claude Code session:
/save

Claude writes a structured summary, trust-scores it, and persists it to SQLite. Next session: automatically injected as SESSION_CONTEXT before your first prompt.

See docs/COMPACT_ALTERNATIVE.md for a full comparison.

As an MCP server

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "cognos-session-memory": {
      "command": "python3",
      "args": ["/path/to/cognos-session-memory/mcp_server.py"]
    }
  }
}

Tools exposed:

ToolDescription
save_session(summary, project?)Trust-score and persist a session summary
load_session(threshold?)Retrieve last verified context (default threshold: 0.45)

Quick Start

Installation

git clone https://github.com/base76-research-lab/cognos-session-memory
cd cognos-session-memory
pip install -e .

Run Gateway

python3 -m uvicorn --app-dir src main:app --port 8788

Test /v1/plan (dry_run)

curl -X POST http://127.0.0.1:8788/v1/plan \
  -H 'Content-Type: application/json' \
  -d '{"n": 5, "mode": "dry_run"}'

Test /v1/plan (auto)

curl -X POST http://127.0.0.1:8788/v1/plan \
  -H 'Content-Type: application/json' \
  -d '{"n": 5, "trust_threshold": 0.75, "mode": "auto"}'

Modules

  • trust.py — CognOS confidence formula, action gate, signal extractors
  • trace_store.py — SQLite persistence (write/read/purge)
  • plan.py — Context extraction, trust scoring, system prompt building
  • main.py — FastAPI gateway + middleware
  • mcp_server.py — MCP stdio server (save_session, load_session)

Testing

pytest tests/ -v --cov=src

Documentation

  • COMPACT_ALTERNATIVE.md — Why this beats /compact
  • PAPER.md — Research paper

Research Paper

See docs/PAPER.md — "Verified Context Injection: Epistemically Scored Session Memory for Large Language Models"

Status: Independent research — Base76 Research Lab, 2026 Authors: Björn André Wikström (Base76)

Citation

@software{wikstrom2026cognos,
  author = {Wikström, Björn André},
  title = {{CognOS Session Memory}: Verified Context Injection via Epistemic Trust Scoring},
  year = {2026},
  url = {https://github.com/base76-research-lab/cognos-session-memory}
}

License

MIT

Contact

  • Author: Björn André Wikström
  • Email: bjorn@base76.se
  • ORCID: 0009-0000-4015-2357
  • GitHub: base76-research-lab
Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Configuration

COGNOS_TRACE_DB

Path to SQLite trace database (default: data/traces.sqlite3)

Categories
AI & LLM ToolsMonitoring & Observability
Registryactive
Packagecognos-session-memory-mcp
TransportSTDIO
UpdatedMar 3, 2026
View on GitHub

Related AI & LLM Tools MCP Servers

View all →
SkillFM LLM Cost Optimizer

io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage

LLM cost optimizer for OpenAI, Anthropic, token usage, BYOK, and SkillFM Beacon audits.
Llm Orchestration Agent

io.github.mikerawsonnz/llm-orchestration-agent

Run a prompt through a LangChain (system + human) chain over Gemini on Vertex AI; optional LangSmith
Authenticated Llm Agent

io.github.mikerawsonnz/authenticated-llm-agent

JWT-gated LLM gateway: authenticate (bcrypt/JWT), then run a LangChain-on-Vertex Gemini completion.
Copilot Memory MCP

labforgedev/copilot-memory-mcp

Persistent semantic memory for AI agents using local ChromaDB vector search. No cloud required.
1
Agent Prompt Injection Firewall Mcp

csoai-org/agent-prompt-injection-firewall-mcp

The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Authenticated Multi Llm Agent

io.github.mikerawsonnz/authenticated-multi-llm-agent

Google-OAuth-gated LLM gateway: verify a Google ID token, then run a Gemini (Vertex AI) completion f