AJ

aplavin/julia-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

96 stars 18 forks 品質 73 トレンド 23MIT

aplavin/julia-mcp は [https://github.com/aplavin/julia-mcp.] からインポートされた MCP サーバー候補です

概要

aplavin/julia-mcp は [https://github.com/aplavin/julia-mcp.] からインポートされた MCP サーバー候補です

概要(AI 翻訳)

AIアシスタントがJuliaコードの効率的な実行にアクセスできるMCPサーバー。 Juliaのスタートアップとコンピレーションコストは、セッションを呼び出して生き続けることで回避します。そして、それらの間(変数、関数、ロードされたパッケージ)を主張します。

  • セッションは、コール間での需要、永続状態を開始し、クラッシュから回復 - マニュアル管理なし
  • 各プロジェクトディレクトリは、独自の分離されたジュリアプロセスを取得します
  • 純粋なstdioの輸送 — 開いた港かソケット無し

ツール

  • julia eval(code, env path?, timeout?) — 永続セッションでJuliaコードを実行します。 [[env_path]]はJuliaプロジェクトディレクトリ(一時的なセッションの省略)を設定します。 [[timeout]]]]] デフォルトは60秒で、 [Pkg 操作のために自動無効になります。 -julia restart(env path?) — セッションを再起動し、すべての状態をクリアします。 [env_pathを省略した場合は、仮セッションを再起動します。
  • julia list sessions — アクティブなセッションとステータスをリストする

要件

  • uv(既にインストールされている可能性があります)
  • Julia - 任意のバージョン、 julia] バイナリは [[PATH]にある必要があります
  • 推奨パッケージ - グローバル環境で利用可能な場合に自動的に使用されます。
  • Revise.jl - 再起動せずにコードの変更を拾う
  • TestEnv.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

julia-mcp

MCP server that gives AI assistants access to efficient Julia code execution. Avoids Julia’s startup and compilation costs by keeping sessions alive across calls, and persists state (variables, functions, loaded packages) between them — so each iteration is fast.

  • Sessions start on demand, persist state between calls, and recover from crashes — no manual management
  • Each project directory gets its own isolated Julia process
  • Pure stdio transport — no open ports or sockets

Tools

  • julia_eval(code, env_path?, timeout?) — execute Julia code in a persistent session. env_path sets the Julia project directory (omit for a temporary session). timeout defaults to 60s and is auto-disabled for Pkg operations.
  • julia_restart(env_path?) — restart a session, clearing all state. If env_path is omitted, restarts the temporary session.
  • julia_list_sessions — list active sessions and their status

Requirements

  • uv (you might already have it installed)
  • Julia – any version, julia binary must be in PATH
    • Recommended packages – used automatically if available in the global environment:
    • Revise.jl - to pick code changes up without restarting
    • TestEnv.jl — to properly activate test environment when env_path points to /test/

The server itself is written in Python since the Python MCP protocol implementation is very mature.

Usage

First, clone the repository:

cd /any_directory
git clone https://github.com/aplavin/julia-mcp.git

Then register the server with your client of choice (see below).

That’s it! Your AI assistant can now execute Julia code more efficiently, saving of TTFX.

Claude Code

User-wide (recommended — makes Julia available in all projects):

claude mcp add --scope user julia -- uv run --directory /any_directory/julia-mcp python server.py

Project-scoped (only available in the current project):

claude mcp add --scope project julia -- uv run --directory /any_directory/julia-mcp python server.py

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "julia": {
      "command": "uv",
      "args": ["run", "--directory", "/any_directory/julia-mcp", "python", "server.py"]
    }
  }
}

Append Julia flags after server.py to override the defaults (--startup-file=no --threads=auto):

{
  "mcpServers": {
    "julia": {
      "command": "uv",
GitHub で README 全文を見る

インストール

uvx --from git+https://github.com/aplavin/julia-mcp julia-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "julia": { "command": "uv", "args": ["run", "--directory", "/any_directory/julia-mcp", "python", "server.py"] } } }