Skip to main content
Glama
jan-terminal-mcp
by Trigodil

jan-terminal-mcp

Jan AI has no native terminal or code execution. This gives it that.

An MCP server that gives your local Jan model real hands on your machine - run shell commands, execute code in 14 languages, read/write files, and use git. All locally, all private.

Includes a fine-tuned 4B model trained specifically to call these tools reliably instead of just describing what it would do.

Tools

Tool

Description

run_shell

Run any PowerShell command

git

Run git commands in any repo

read_file

Read any file's contents

write_file

Write or overwrite a file

list_dir

List files and folders in a directory

edit_file

Replace a specific substring in a file - smarter than rewriting the whole thing

run_python

Execute Python code directly and return output

run_cpp

Compile and run C++ code (g++), returns errors + output

run_code

Execute code in any language - Python, JavaScript, TypeScript, Java, C++, C#, Go, Rust, Ruby, PHP, R, Kotlin, Swift, MATLAB

Related MCP server: machine-root-mcp

Fine-tuned model

AItrainer1/jancoder-4b-gguf, a 4B model fine-tuned via QLoRA on tool-use conversations generated specifically for this tool schema.

Stock models at this size tend to describe what they'd do rather than actually calling tools. This model was trained to call them correctly and consistently.

Drop the GGUF into Jan and it works out of the box with this MCP server.

The Kaggle training notebook is at kaggle_finetune.ipynb.

Install

pip install jan-terminal-mcp

Setup in Jan AI

  1. Open Jan, Settings, MCP Servers

  2. Click Add and paste this config:

{
  "jan-terminal": {
    "command": "jan-terminal-mcp",
    "args": [],
    "env": {},
    "active": true
  }
}

Or edit %APPDATA%\Jan\data\mcp_config.json directly and add the block above inside "mcpServers".

  1. Restart Jan - the server appears as Jan-Terminal with a green dot.

Requirements

  • Windows (PowerShell required for run_shell)

  • Python 3.10+

  • Jan AI v0.7.9+

  • pip install mcp>=2.0.0

Bugs

Report bugs and stuff to ISSUE

License

MIT

Available Tools

10 tools
edit_fileA

Edit a file by replacing old_text with new_text. Use this to fix errors instead of rewriting the whole file.

Inputs: path (required), new_text (required), old_text (required). Returns: result

gitA

Run a git command. args = e.g. 'status', 'log --oneline -10', 'commit -m "fix bug"'

Inputs: args (required), cwd. Returns: result

list_dirB

List files and folders in a directory.

Inputs: path (required). Returns: result

read_fileC

Read the contents of a file on the user's machine.

Inputs: path (required). Returns: result

run_codeA

Execute a code snippet directly without saving to disk. Use for quick one-off runs. If you already wrote the code with write_file, use run_file instead to avoid writing twice. Supported: python, javascript, typescript, java, cpp, csharp, go, rust, ruby, php, r, kotlin, swift, matlab

Inputs: code (required), language (required), cwd. Returns: result

run_cppA

Compile and run C++ code. Returns compiler errors or program output.

Inputs: code (required), cwd. Returns: result

run_fileA

Run an already-existing file. Use this after write_file — avoids writing the code twice. Language is auto-detected from extension if not provided.

Inputs: path (required), language. Returns: result

run_pythonB

Execute Python code directly and return the output.

Inputs: code (required), cwd. Returns: result

run_shellC

Run a PowerShell command on the user's machine.

Inputs: command (required), cwd. Returns: result

write_fileB

Write or overwrite a file on the user's machine. After writing code, use run_file to execute it — do NOT also call run_code with the same code.

Inputs: path (required), content (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 10 tools

    Disambiguation2/5

    The run_* family is heavily overlapping: run_code, run_python, and run_cpp all execute code, with run_python and run_cpp being subsets of run_code. run_file and run_shell also blur boundaries, making it easy to select the wrong tool.

    Naming Consistency4/5

    Most tools follow a clear verb_noun pattern (read_file, write_file, list_dir, edit_file, run_code, etc.). The single exception is 'git' (a plain command name) and to a lesser extent 'run_shell' which still matches the pattern, so only a minor deviation.

    Tool Count4/5

    10 tools is within the ideal range, but the redundancy of run_python and run_cpp with run_code makes the set feel slightly over-scoped. Still, the count is reasonable for a terminal/file server.

    Completeness4/5

    The tool surface covers git, shell, file read/write/edit/list, and code execution, which is solid for a terminal. Minor gaps include no delete_file or rename operation, but these can be worked around with run_shell.

    Related MCP Connectors

    Related MCP Servers