Hacker News new | ask | show | jobs
by andreasronge 25 days ago
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...