Skip to main content
Glama

samskriti-shared-layer

License: MIT Python MCP

A local MCP server that lets multiple AI coding tools share structured project state — decisions, tasks, bugs — so they coordinate without re-explaining.

   Claude Code      Cursor        Codex
       │              │             │
       │  read/write  │  read/write │
       └──────────────┼─────────────┘
                      ▼
            ┌───────────────────────┐
            │   samskriti-shared-layer   │   (local MCP server, stdio)
            └───────────┬───────────┘
                        ▼
              ┌───────────────────┐
              │   SQLite store    │   ~/.samskriti/  (100% local)
              └───────────────────┘

The problem

You make a decision with one AI tool, then switch to another and have to re-explain everything from scratch. Each assistant starts cold, with no idea what was already decided, tried, or rejected. This server gives them a shared, structured ledger of your project so any tool can read what the others wrote.

Related MCP server: session-coord-mcp

Install

Install with pipx (recommended — this puts the samskriti-shared-layer command on your PATH so your AI tools can find it):

pipx install git+https://github.com/Escalate17/samskriti-shared-layer

Don't have pipx? Install it first: python3 -m pip install --user pipx && python3 -m pipx ensurepath (then restart your terminal).

To verify the install worked:

samskriti-shared-layer --help

If you see the help text, you're ready to connect it.

Connect

Easiest: let it configure your tool for you

samskriti-shared-layer setup          # Claude Code
samskriti-shared-layer setup --cursor # Cursor
samskriti-shared-layer setup --codex  # Codex
samskriti-shared-layer setup --all    # all three

This writes the MCP config block into the right file for you (backing up any existing config first), so you don't have to hand-edit JSON. Then fully quit and reopen your tool — MCP servers are loaded only when the tool starts, so a running session won't see it until you restart.

Or add it manually

Add the server to your AI tool's MCP config, then fully restart the tool.

Claude Code (~/.claude.json):

{
  "mcpServers": {
    "samskriti-shared-layer": {
      "command": "samskriti-shared-layer",
      "args": []
    }
  }
}

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "samskriti-shared-layer": {
      "command": "samskriti-shared-layer",
      "args": []
    }
  }
}

Codex (~/.codex/config.toml):

[mcp_servers.samskriti-shared-layer]
command = "samskriti-shared-layer"
args = []

If your tool can't find the command, it's a PATH issue — run which samskriti-shared-layer to get the full path, and use that full path as the command value instead.

Verify it's connected

In Claude Code, type /mcp — you should see samskriti-shared-layer listed with its 8 tools. (Cursor and Codex have similar MCP status indicators in their settings.)

Tools

  • record_project_entry — store an entry (goal, update, decision, convention, bug, task, rejected_idea).

  • get_project_state — read a readable summary, grouped by category.

  • search_project_state — keyword search across entries.

  • update_project_entry — edit an entry's title, content, or status.

  • list_projects — list all tracked projects.

Plus three shortcuts — catchup, open, and log — for the most common actions. See Helper commands below.

Already installed? Run pipx reinstall samskriti-shared-layer to pick up the new commands. If you installed an earlier build (it shows up as samskriti-shared-layer-local in pipx list), migrate once: pipx uninstall samskriti-shared-layer-local && pipx install git+https://github.com/Escalate17/samskriti-shared-layer.

Faster access: a /sam slash command

Typing "use the samskriti-shared-layer MCP …" every time is tedious. Both Claude Code and Cursor support custom slash commands — Markdown prompt files you drop in a folder. They don't bind directly to a tool, but they inject a prompt that tells the agent to use this server, so /sam <message> does the right thing. (Codex has no slash-command mechanism for MCP; just say "use samskriti-shared-layer to …" — the agent picks the tool.)

Claude Code — save slash-commands/claude-code/sam.md to one of:

  • ~/.claude/commands/sam.md (available in every project), or

  • <your-project>/.claude/commands/sam.md (that project only).

Then in Claude Code: /sam what's open or /sam log we're dropping the Redis cache. The $ARGUMENTS placeholder in the file receives everything you type after /sam.

Cursor (1.6+) — save slash-commands/cursor/sam.md to:

  • ~/.cursor/commands/sam.md (global), or

  • <your-project>/.cursor/commands/sam.md (that project only).

Then type / in Cursor's Agent box, pick sam, and add your message.

No true client feature binds a slash command straight to an MCP call yet — this command file is the closest supported equivalent, and it works today.

Helper commands

Three shortcuts wrap the most common actions. You never call them by tool name directly — you trigger them with /sam plus plain English, or just by asking in plain language.

Want to…

Tool

What it does

Catch up

catchup

Recap of the project — latest entries plus how many tasks are still open.

See what's open

open

Lists the active (open) tasks, each with its ID.

Log a decision

log

Records a decision fast; the title is auto-derived from the text if you omit it.

Two ways to invoke — both work:

  1. /sam slash command (Claude Code / Cursor, once you've added the command file above):

    /sam catch me up
    /sam what's open
    /sam log we're switching local storage to SQLite

    You type /sam followed by plain English. There is no standalone /catchup, /open, or /log command — it is always /sam plus what you want.

  2. Plain language (works in any MCP tool, including Codex):

    use samskriti-shared-layer to catch me up
    use samskriti-shared-layer to show what's open
    use samskriti-shared-layer to log: we're switching local storage to SQLite

Try it in 30 seconds

  1. In tool A (e.g. Claude Code): "Record a decision in project 'demo': we're using SQLite for local storage."

  2. In tool B (e.g. Cursor): "Get the project state for 'demo'."

Tool B reads back the decision tool A just wrote — no re-explaining.

Demo

Privacy

100% local. No cloud, no account, your data never leaves your machine. State is stored in a SQLite database under ~/.samskriti/ (override with the SAMSKRITI_HOME or SAMSKRITI_PROJECT_DB environment variable). Your AI client's own data and privacy policies still apply.

How this fits

This is one of three things I maintain under the name Samskriti, and they share a premise: the state that matters should be computed and stored explicitly, not reconstructed from a transcript every time.

  • samskriti — an engine that computes an agent's emotional and relational state from what it has experienced, deterministically, outside any language model. C++ with a Python SDK. (paper)

  • samskriti-luau — the same model for Roblox, where NPCs remember how a player treated them.

  • samskriti-shared-layer — this repo. The same idea applied to your project rather than a character: decisions, tasks, and rejected ideas live in a structured ledger that any tool can read, instead of being re-derived from context each session.

An AI assistant starting cold on your codebase and a game character forgetting you robbed it last week are the same failure. Both are asking a model to reconstruct state it was never given. This server is the unglamorous version of the fix, and the one I use every day.

Status

Early / validating. This is a working prototype being tested with real workflows. Bugs, rough edges, and missing features are expected — issues and feedback are very welcome.

License

MIT — see LICENSE.

Available Tools

5 tools
get_project_stateB

Returns a concise, readable summary of project state, grouped by category.

Inputs: project (required), category.

list_projectsA

Returns a list of all known projects tracked by Samskriti V1.

Inputs: no named parameters.

record_project_entryB

Stores a structured project-state entry (goal, update, decision, convention, bug, task, rejected_idea).

Inputs: project (required), category (required), title (required), content (required), +2 more.

search_project_stateB

Search the project state ledger using a simple keyword query.

Inputs: project (required), query (required).

update_project_entryA

Update an existing project entry's title, content, or status.

Inputs: id (required), title, content, status.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct purpose: summarizing state, listing projects, recording entries, searching, and updating. No overlapping functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., get_project_state, record_project_entry), ensuring predictability.

    Tool Count5/5

    With 5 tools, the server covers essential operations without being overwhelming or insufficient for project state management.

    Completeness4/5

    Covers core operations (list, get, record, search, update) but lacks explicit project creation and deletion, which may be minor gaps.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A portable MCP server that provides a shared persistent working state for AI coding agents, managing tasks, plans, notepads, memory, and project rules across different tools like Claude Code, OpenCode, and Cursor.
      6
      14 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server that enables AI coding agents to communicate, share state, and coordinate work in real time via MCP tools or REST API.
      84 npm
      10
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A self-hosted MCP server enabling multiple AI coding agents to share state, preserve context across sessions, and coordinate with each other.
      34 npm
      Apache 2.0