Get the FREE Ultimate OpenClaw Setup Guide →

cl

Common Lisp REPL Superpower for Agents

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio quasi-cl-mcp-server sbcl --load /path/to/cl-mcp-server/run-server.lisp \
  --env SBCL_HOME="path to SBCL home if needed" \
  --env CL_MCP_PORT="optional port for MCP transport if using network transport" \
  --env CL_MCP_TRANSPORT="stdio or other transport if applicable"

How to use

CL-MCP-Server provides a persistent Lisp REPL session exposed over the MCP protocol. It lets Claude or any MCP client evaluate Common Lisp expressions, inspect definitions, manage state across evaluations, and capture rich output including return values, stdout, stderr, warnings, and backtraces. The server implements a broad set of tools (36 in total) for evaluation, introspection, profiling, and error handling, all through structured JSON-RPC requests defined by the MCP canon. Typical usage involves starting the server (via an SBCL script), connecting with an MCP client, and issuing requests such as evaluate-lisp, describe-symbol, quickload, and reset-session to build up and explore a Lisp environment interactively. You can rely on the persistent session to retain definitions across commands, enabling iterative development and experimentation within Claude or any client.

To use it, point your MCP client at the lisp server defined in the configuration. The server accepts standard MCP JSON-RPC 2.0 requests over stdio (or a configured transport). You can evaluate expressions, load files, define functions, query symbol information, profile code, and manage session state. The tools are organized into categories such as Code Evaluation, Syntax & Validation, Code Introspection, CLOS Intelligence, Error Intelligence, ASDF/Quicklisp Management, Performance Profiling, Session Management, and Telos Integration. Each tool has a specific input/output contract documented in canon/features and the JSON schemas in the canon directory.

How to install

Prerequisites

  • SBCL (Steel Bank Common Lisp)
  • Quicklisp for dependency management
  • A compatible MCP client (e.g., Claude Code integration or CLI client)
  1. Clone the repository(s)
git clone https://github.com/quasi/cl-mcp.git
git clone https://github.com/quasi/cl-mcp-server.git
  1. Ensure Quicklisp can load the server as a local project (per Quicklisp guidance). In the cl-mcp-server project, load dependencies and start the server via SBCL:
cd cl-mcp-server

sbcl --load cl-mcp-server.asd \
     --eval "(ql:quickload :cl-mcp-server)" \
     --quit
  1. Start the MCP server (example run script):
# Path to your Lisp script that starts the MCP server
sbcl --script /path/to/cl-mcp-server/run-server.lisp
  1. Configure Claude Code or your MCP client to connect to the server. Example Claude Code command:
claude mcp add --scope user --transport stdio lisp -- sbcl --script /path/to/cl-mcp-server/run-server.lisp
  1. (Optional) Add server to other tooling configurations as shown in the README examples for Gemini, Opencode, or your own MCP client. For example, in Gemini you might reference the run-script path and description.

Additional notes

Tips and common issues:

  • Ensure SBCL is installed and accessible in your PATH. The server relies on SBCL for Lisp evaluation.
  • Quicklisp must be configured to automatically download dependencies used by the server; run Quicklisp's setup if you encounter missing packages.
  • The server uses a persistent REPL session; if you want a fresh environment, run the reset-session tool to clear state.
  • When wiring into Claude or other clients, use the provided mcpServers configuration blocks to ensure the correct command and arguments are passed.
  • If you encounter transport issues, verify that the MCP transport (stdio, network, etc.) matches between the server and client and adjust the command/args accordingly.
  • The server captures multiple outputs (return value, stdout, stderr, warnings). Use the appropriate tools (e.g., describe-symbol, list-definitions) to inspect state after evaluations.

Related MCP Servers

Sponsor this space

Reach thousands of developers