Lex MCP Server

Episodic memory and architectural policy for AI agents. Frames, Atlas, and Policy.

Local serverstdioTypeScript

What is the Lex MCP server?

Episodic memory and architectural policy for AI agents. Frames, Atlas, and Policy. Exposed over MCP by the lex mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

Your agent can read the code. Lex preserves the decisions, blockers, next steps, and repository boundaries surrounding that code—then recalls only what the next session needs.

Adding it to your client

The server ships on npm as @smartergpt/lex, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Its toolset

Everything the assistant can do here goes through one of these:

  • Project — Responsibility
  • Lex — Durable work context, repository policy, optional neighborhood context, instructions, and scoped Frame storage

Configuration

You will need 4 environment variables: LEX_DB_PATH, LEX_POLICY_PATH, LEX_DB_KEY, LEX_DATABASE_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the lex mcp server does with a few real requests.

When to reach for it

This sits in the file and storage access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Lex's toolset — Project, Lex — is a fair guide to whether it matches your workflow. It is maintained by dev.smartergpt; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
ProjectResponsibility
LexDurable work context, repository policy, optional neighborhood context, instructions, and scoped Frame storage

How to install the Lex MCP server

{
  "mcpServers": {
    "lex": {
      "command": "npx",
      "args": ["-y", "@smartergpt/lex"],
      "env": {
        "LEX_DB_PATH": "your-value",
        "LEX_POLICY_PATH": "your-value",
        "LEX_DB_KEY": "your-value",
        "LEX_DATABASE_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
LEX_DB_PATHFilesystem location the server is allowed to use.Optional
LEX_POLICY_PATHFilesystem location the server is allowed to use.Optional
LEX_DB_KEYCredential the server authenticates with.Yes
LEX_DATABASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Lex to Project.
  • Use Lex to Lex.

Frequently asked questions

It connects Lex to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (Project, Lex) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Lex directly.