MCP ServerSTDIOOfficialv2.1.2

Lex MCP Server

Build episodic memory and architectural policy systems for AI agents using Frames, Atlas, and Policy primitives. For developers integrating persistent context and decision-making frameworks into agentic workflows.

dev.smartergpt/lex

Hosted URL

Local install

Transport

STDIO

Auth

No auth required

What the Lex MCP server does

How models use it and what it is built for.

Build episodic memory and architectural policy systems for AI agents using Frames, Atlas, and Policy primitives. For developers integrating persistent context and decision-making frameworks into agentic workflows.

Connect to Lex

Local install — runs as a subprocess.

npx @smartergpt/lex-mcp@2.1.2

Environment variables

Configuration this server reads at startup.

  • LEX_WORKSPACE_ROOT

    Root directory for the workspace. Defaults to current working directory.

  • LEX_MEMORY_DB

    Path to SQLite database file. Defaults to .smartergpt/lex/lex.db in workspace root.

  • LEX_DEBUG

    Set to any value to enable debug logging to stderr.

Resources

Where to find authoritative docs and source for Lex.

Example prompts for Lex

Paste any of these into Agent Studio after connecting Lex.

  • Show me the current frames stored in the Lex memory database
  • How do I configure LEX_WORKSPACE_ROOT to use a custom directory for agent memory
  • What schema does the SQLite database use for storing episodic memory
  • Enable debug logging and explain what policy evaluation looks like in the logs

Lex MCP server — FAQ

Common questions about connecting and running Lex.

  • What is Lex and what problem does it solve?

    Lex provides episodic memory and architectural policy for AI agents, letting you store and retrieve contextual frames and enforce decision-making policies. It's designed for developers building agents that need persistent, structured memory across conversations.

  • How do I set up Lex with a custom workspace directory?

    Set the LEX_WORKSPACE_ROOT environment variable to your desired directory path before running the MCP server. By default, it uses the current working directory and stores the SQLite database at .smartergpt/lex/lex.db.

  • Where does Lex store agent memory and can I inspect it?

    Lex stores episodic memory in a SQLite database (configurable via LEX_MEMORY_DB, defaults to .smartergpt/lex/lex.db). You can inspect the database directly using any SQLite client or enable LEX_DEBUG for detailed logging.

  • How do I enable debug logging to troubleshoot Lex?

    Set the LEX_DEBUG environment variable to any value before starting the MCP server. Debug output will be written to stderr and will show policy evaluation and memory operations.

  • What are Frames, Atlas, and Policy in Lex?

    The README does not detail these primitives. Refer to the @smartergpt/lex-mcp package documentation or repository for architectural specifics on how Frames, Atlas, and Policy components work together.

Skip the local setup — run MCP in your browser

MCP Playground runs 10,000+ hosted MCP servers — GitHub, Linear, Notion, Stripe, Sentry and more — across Claude, GPT, Gemini, DeepSeek and 30+ AI models. Compare model answers side-by-side, save agent presets, share runs. Zero install.

Open Agent Studio

Related servers

More on MCP Playground