HackerTrans
TopNewTrendsCommentsPastAskShowJobs

andreasronge

no profile record

Submissions

An MCP server that gives agents a sandboxed Lisp REPL

andreasronge.github.io
2 points·by andreasronge·2 माह पहले·1 comments

I Built a Lisp for AI Agents

andreasronge.github.io
17 points·by andreasronge·4 माह पहले·3 comments

comments

andreasronge
·2 माह पहले·discuss
I’ve been working on an open source MCP server that gives AI agents (or coding assistants) a stateful, sandboxed REPL using a small Clojure-like language.

The main idea is that an agent should be able to explore MCP tools more like a developer explores an API from a REPL, instead of having every schema, tool response, and intermediate result pushed into the model context.

Example (done over multiple REPL sessions):

  (mcp/servers)
  (dir 'github)
  (doc 'github/search_issues)
  (apropos "calendar")

  (let [r (tool/mcp-call {:server "fs"
                          :tool "read_text_file"
                         :args {:path "/tmp/sandbox/notes.md"}})]
      (if (:ok r)
        (count (split-lines (:value r)))
        (fail (:message r))))
The reason I built a small custom Clojure-like language instead of using Python/JS is so I can fit the needs of the LLM: easy to sandbox, give good feedback to LLM as well as operational (handle many concurrent low latency stateful connections)

https://github.com/andreasronge/ptc_runner/blob/main/mcp_ser...
andreasronge
·4 माह पहले·discuss
[dead]
andreasronge
·4 माह पहले·discuss
Interesting, I'm not familiar with that paper, but I guess the performance gain comes from raising the abstraction level (hiding solver boilerplate). PTC-Lisp could achieve the same thing by defining constraint-building functions as tools, and the LLM writes high-level PTC-Lisp that calls a solver. In fact, Lisp has a natural advantage here: instead of building a separate DSL with its own compiler (as I guess Logic.py did), Lisp can extend itself with macros — code is data, data is code - however this is not impl. yet in ptc-lisp.