Lex MCP Server
by smartergptdev.smartergpt/lexv4.4.1
Episodic memory, Frames, Policy Neighborhoods, and policy enforcement for AI agents.
context tax
queued
security
queued
cold start
queued
freshness
Active18d ago
Install Lex MCP server
Install in Claude Code
claude mcp add lex-smartergpt -e LEX_DATABASE_URL='<lex-database-url>' -e LEX_POSTGRES_PASSWORD='<lex-postgres-password>' -- npx -y @smartergpt/lex-mcpInstall in Cursor
{
"mcpServers": {
"lex-smartergpt": {
"command": "npx",
"args": [
"-y",
"@smartergpt/lex-mcp"
],
"env": {
"LEX_DATABASE_URL": "<lex-database-url>",
"LEX_POSTGRES_PASSWORD": "<lex-postgres-password>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"lex-smartergpt": {
"command": "npx",
"args": [
"-y",
"@smartergpt/lex-mcp"
],
"env": {
"LEX_DATABASE_URL": "<lex-database-url>",
"LEX_POSTGRES_PASSWORD": "<lex-postgres-password>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"lex-smartergpt": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@smartergpt/lex-mcp"
],
"env": {
"LEX_DATABASE_URL": "<lex-database-url>",
"LEX_POSTGRES_PASSWORD": "<lex-postgres-password>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"lex-smartergpt": {
"command": "npx",
"args": [
"-y",
"@smartergpt/lex-mcp"
],
"env": {
"LEX_DATABASE_URL": "<lex-database-url>",
"LEX_POSTGRES_PASSWORD": "<lex-postgres-password>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| LEX_WORKSPACE_ROOT | — | — | Project root directory for Lex runtime discovery. Defaults to current working directory. |
| LEX_STORE | — | — | Frame-store backend: sqlite or postgres. Defaults to sqlite unless LEX_DATABASE_URL selects PostgreSQL. |
| LEX_DB_PATH | — | — | Path to SQLite database file. Defaults to .smartergpt/lex/memory.db under the project root. |
| LEX_MEMORY_DB | — | — | Alias for LEX_DB_PATH (backwards compatibility). Same behavior. |
| LEX_DATABASE_URL | — | yes | PostgreSQL connection URL for the compatibility adapter. Treat as secret because it may contain credentials. |
| LEX_POSTGRES_PASSWORD | — | yes | PostgreSQL password supplied separately when LEX_DATABASE_URL omits one. |
| LEX_POSTGRES_POOL_MAX | — | — | Maximum PostgreSQL compatibility-adapter pool size. Defaults to 10. |
| LEX_DEBUG | — | — | Set to any value to enable debug logging to stderr. |
Freshness
Active — last maintenance signal 18d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-09-22 · 18d ago · GitHub
Latest release
2026-09-18 · 22d ago · GitHub · v4.4.1
Package published
no data · npm/PyPI
Registry entry updated
2026-09-18 · 22d ago · official registry · v4.4.1
FAQ
›How do I install the Lex MCP server in Claude Code?
Run: claude mcp add lex-smartergpt -e LEX_DATABASE_URL='<lex-database-url>' -e LEX_POSTGRES_PASSWORD='<lex-postgres-password>' -- npx -y @smartergpt/lex-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Lex require an API key?
Yes. It expects LEX_DATABASE_URL, LEX_POSTGRES_PASSWORD, of which 2 are secrets.
›Can I use Lex as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Lex in the official MCP registry?
Yes, as dev.smartergpt/lex.
Alternatives to Lex
Other memory MCP servers.