AgentREPL.jl
STDIO-based MCP server for persistent Julia REPL sessions, eliminating TTFX overhead for AI coding assistants
claude mcp add --transport stdio samtalki-agentrepl.jl uvx AgentREPL.jl \ --env JULIA_REPL_PROJECT="The path to the Julia project/environment to use for AgentREPL. Optional; set to point to your AgentREPL.jl workspace if needed."
How to use
AgentREPL.jl provides a persistent Julia REPL that executes code via the MCP STDIO transport. This lets AI agents accumulate state, loaded packages, and definitions across calls, dramatically reducing the time spent on startup, package loading, and JIT compilation. You can interact with the REPL through the MCP tools exposed by the Claude Code plugin or via a manual MCP configuration. Core capabilities include eval to run Julia code in the persistent session, reset to perform a true hard reset of the worker, and info to inspect the current session. Package management commands (activate, pkg, develop, free, test) operate against the active Julia environment, preserving state between calls and enabling robust development workflows. The workflow mirrors typical Julia development but now persists across agent interactions, enabling faster iteration for agents that rely on Julia code and libraries.
Once configured, Claude Code can automatically start AgentREPL.jl when a Julia-related action is requested. The provided tools include: eval for executing arbitrary Julia expressions and multi-line blocks, reset to restart the worker while preserving the environment, info to view the active worker and project, activate to switch projects, pkg to manage dependencies (add, status, develop, free, test, etc.), and log_viewer to monitor Julia output in real time. This setup supports modern Julia workflows such as Pkg.test and Pkg.develop without losing previously loaded packages or definitions.
How to install
Prerequisites:
- Julia installed on the host (compatible with AgentREPL.jl requirements)
- Access to install Julia packages (Pkg) and, optionally, permissions to modify environment variables
Option 1: Install from GitHub (stable usage)
- Open Julia REPL or run a Julia script
- Add the package:
using Pkg
Pkg.add(url="https://github.com/samtalki/AgentREPL.jl")
- For development/build from source:
using Pkg
Pkg.dev("https://github.com/samtalki/AgentREPL.jl")
Option 2: Install via MCP (recommended for Claude Code integration)
- Ensure Julia is installed and accessible from your PATH
- Create or update MCP configuration to start AgentREPL.jl via the MCP transport (see mcp_config)
- Start Claude Code and enable the AgentREPL.jl MCP server as configured
Optional CLI usage for Julia REPL helpers inside your project:
# Activate a project and install dependencies as needed
julia -e 'using Pkg; Pkg.activate("/path/to/AgentREPL.jl"); Pkg.instantiate()'
Notes:
- If you use a dedicated Julia project/environment, you can switch with activate(path="/path/to/your/project") and then run pkg(action="instantiate").
- To enable persistent state across sessions, rely on the AgentREPL.jl worker model and avoid hard process restarts unless you need a true reset.
Additional notes
Tips and caveats:
- The first call to a new Julia environment may incur a brief delay due to JIT compilation and loading packages.
- Use reset to perform a true hard reset of the worker, which clears all variables and types while preserving the activated environment for subsequent loads.
- If you encounter issues with environment selection, set JULIA_REPL_PROJECT to point to your desired project before starting AgentREPL.jl.
- The MCP transport for AgentREPL.jl uses STDIO with no network port exposed, improving security compared to TCP/HTTP-based transports.
- If using the Claude Code plugin, the plugin provides an auto-configured MCP server and convenient slash commands like /julia-reset, /julia-info, /julia-pkg, and /julia-activate to manage the REPL session.
- For debugging, enable log_viewer to monitor Julia output in real time and diagnose issues with code execution or package loading.
Related MCP Servers
buildwithclaude
A single hub to find Claude Skills, Agents, Commands, Hooks, Plugins, and Marketplace collections to extend Claude Code, Claude Desktop, Agent SDK and OpenClaw
ollama
An MCP Server for Ollama
mem0
✨ mem0 MCP Server: A memory system using mem0 for AI applications with model context protocl (MCP) integration. Enables long-term memory for AI agents as a drop-in MCP server.
xc
XCode CLI MCP: Convenience wrapper for Xcode CLI tools & iOS Simulator. Progressive disclosure of tool responses to reduce context usage. Use --mini param for build-only with tiny context footprint.
solana
solana mcp sever to enable solana rpc methods
skrills
Coordinate skills between Codex, Copilot, and Claude Code. Validates, analyzes, and syncs skills, subagents, commands, and configuration between multiple CLIs.