Skip to content

Connect an AI agent

Ferris IDEA offers its operations to AI agents as tools over the Model Context Protocol (MCP). You add one entry to your agent’s configuration, and the agent can read, search and preview changes in the project at once. Every change it makes checks a right that you grant per project.

Way in Status
MCP over standard input and output (ferris-idea mcp), no window needed Works
MCP over HTTP from the running window, with your unsaved editor text Experimental
Claude Code connected to the window as its IDE, with diffs in the window Experimental (macOS and Linux)

The project is developed and tested by hand with Claude Code. Other clients use the same server entry and are expected to work; they are not tested by the project yet.

  1. Add the serverOne entry in the client: the ferris-idea program, the word mcp and the absolute path of the project.
  2. The agent readsNine core tools are offered at first: workspace_info, list_files, read_file, search_in_files and others. Reading needs no right.
  3. The agent asks to change somethingThe call needs a right, such as write.If not: Refused: the answer names the missing right and the exact entry to add. Nothing is changed.
  4. You grant the rightOne [[workspace]] entry in agent-permissions.toml in your settings folder.
  5. The call goes through and is loggedA line in .ferris-idea/agent-log.jsonl names the tool, the rights checked and the result.
Rights live in your settings folder. A file inside the project never grants an agent anything.
  • Ferris IDEA is installed (Install). MCP clients start servers with a short PATH, so every entry below uses the absolute path of the program: /Applications/FerrisIDEA.app/Contents/MacOS/ferris-idea on macOS, /usr/bin/ferris-idea from the Debian package, or wherever you put the AppImage.
  • The project folder exists. Use its absolute path.
  • No API key, account or environment variable is needed. The server runs on your machine and talks only to the client that started it.

Run this in the project folder:

Terminal window
claude mcp add ferris-idea -- /Applications/FerrisIDEA.app/Contents/MacOS/ferris-idea mcp "$PWD"

Tested with v1.6.0 on 2026-12-04.

With --scope project, Claude Code writes the entry to .mcp.json in the folder instead, to be shared with the project. It then asks once whether to use the server; answer it when you next start claude there. claude mcp list shows the server and its state.

Restart the client or reload its servers. Ask the agent something like “What is this project? Use the ferris-idea tools.” It answers from workspace_info and list_files.

At first the agent sees nine core tools and find_tools, which searches all of the program’s tools and switches on the ones the agent needs. To offer more from the start, add --tools with groups to the arguments: ["mcp", "/path/to/project", "--tools", "vcs,run"], or all.

The groups are core, files, navigation, editing, inspections, run, debug, vcs, database, web, containers, remote and ide. Offering a tool grants nothing: a tool that changes something still needs its right.

Ask the agent to change a file. The call is refused, and the answer says what to do:

not granted: this workspace does not grant agents the `write` right (create, change, move or
delete files of the workspace); nobody was asked. Only the user can grant it: answer "Always for
This Workspace" when the Ferris IDEA window asks a client of its MCP server over HTTP, or add to
~/.config/ferris-idea/agent-permissions.toml:
[[workspace]]
path = "/Users/you/Projects/demo-shop"
allow = ["write"]
Use dry_run to see what would happen.
  1. Open agent-permissions.toml in your settings folder: ~/.config/ferris-idea/ on macOS and Linux (or $XDG_CONFIG_HOME/ferris-idea/, or the folder in FERRIS_IDEA_CONFIG_DIR). Create it if it does not exist.

  2. Add the entry the message names. Grant only the rights the task needs; each one is explained in Grant rights to an agent.

    [[workspace]]
    path = "/Users/you/Projects/demo-shop"
    allow = ["write"]
  3. Ask the agent again. The file is read anew for every session and call; nothing needs a restart.

The agent can check what it was granted with the tool agent_permissions: it answers with the rights, the file it read and any problem in it. A file with an error grants nothing, and a grant file inside the project is ignored.

Rights that run code, run, debug and trust, also need a trusted project. In safe mode the call is refused with Safe mode: … is not trusted whatever the rights.

Every call of a tool that changes something leaves one line in .ferris-idea/agent-log.jsonl in the project, refused calls and dry runs included:

{"time":1796345464,"tool":"copy_file","caller":"mcp:claude-code","call":true,"changes":["files"],"dry_run":false,"rights":[{"right":"write","given":false}],"database":[],"targets":{"path":"src/main.rs","new_name":"copy.rs","dry_run":false},"lengths":{"target_dir":3},"result":"refused"}
{"time":1796345470,"tool":"copy_file","caller":"mcp:claude-code","call":true,"changes":["files"],"dry_run":false,"rights":[{"right":"write","given":true}],"database":[],"targets":{"path":"src/main.rs","new_name":"copy.rs","dry_run":false},"lengths":{"target_dir":3},"result":"ok"}

caller is mcp: and the name the client gave, result is ok, refused or error. The log holds names and lengths, never file contents, commands or values. How the checks fit together: How an agent’s call is checked.

Experimental Over standard input and output the agent works on the files on disk. To let it see what is open in the window, including text you have not saved yet, connect it to the window over HTTP:

  1. In Ferris IDEA, open Settings › Tools › AI Assistant and switch on Serve MCP to local agents over HTTP. It starts at once.

  2. The window listens on 127.0.0.1 only, on a port the system picks, and makes a new token at every start. It writes both to mcp-http/<pid>.json in your settings folder: url, token and the ready header line, plus one url per open project.

  3. Give the client the URL and the header. For Claude Code:

    Terminal window
    claude mcp add --transport http ferris-idea "http://127.0.0.1:<port>/mcp?tools=all" \
    --header "Authorization: Bearer <token>"

    The ?tools= part chooses the tool groups; Claude Code does not reload the tool list over HTTP after find_tools.

Over HTTP, a missing right does not end in a refusal straight away: the window asks you Allow “<client>” the right “write” in workspace “demo-shop”? with Deny (the default), Allow Once and Always for This Workspace, which writes the entry to your grant file for you. Nobody answering within 2 minutes counts as no.

Do not paste the token into an issue or a chat. Because port and token change with every start, update the client entry after you restart Ferris IDEA.

Start claude in a terminal tab of Ferris IDEA (View › Tool Windows › Terminal, ⌥F12 on macOS, AltF12 on Linux). It connects to the window by itself, and the status bar shows Claude Code connected. From then on:

  • A change Claude Code proposes opens as a diff, Claude Code proposes a change to …, with Accept and Reject; Claude Code writes the file only after Accept.
  • Send to Claude Code in the editor’s context menu (and in Tools › AI Assistant) sends the selected lines.

Started outside Ferris IDEA, Claude Code lists the window under /ide. This link is separate from MCP: add the MCP server as above for the tools. It does not start on Windows.

  • The client shows the server as failed. Run the command of the entry in a terminal. It should wait silently; started without a client it ends with error: connection closed: initialize request, which means the program and the folder are right. A relative path, or a program the client cannot find on its PATH, is the usual cause.
  • … is a file, not a project folder. The entry names a file. Give the project folder.
  • unknown tool group "…". The message lists the known groups.
  • not granted: …. Add the entry the message names, as above.
  • withheld: '.env' is on the list of files whose names commonly hold secrets. Reading such files needs the secret-read right.
  • Safe mode: … is not trusted. Trust the project; the rights alone are not enough to run its code.
  • no window: this MCP server runs without the Ferris IDEA window. The tool works on the window (editor tabs, closing projects) and needs the connection over HTTP.
  • HTTP answers 401. The token is old: Ferris IDEA was restarted. Read the new one from mcp-http/<pid>.json. A refused connection means the setting is off, the window is closed, or the port changed.

The core set, the tools that read and change your grants, and the window link:

  • agent_permissionsreadsWhat agents may do in this workspace beyond reading: the rights granted by the user in their own settings folder (never in the workspace), e.g.
  • claude_code_linkreadsState of the Claude Code link of this project: when Anthropic's claude CLI runs in a Ferris IDEA terminal it connects to the window as its IDE (selection, open files, diagnostics, diffs the user accepts or rejects).
  • claude_code_mentionreadsSend lines of a project file to Claude Code connected to this window (at_mentioned, SPEC-0358 v2 behaviour 24): path, line_start, optional line_end (1-based).
  • file_diagnosticsreadsErrors and warnings of workspace files from their language server (clangd, rust-analyzer, pyright, typescript-language-server, gopls), followed by Ferris IDEA's own findings (source Ferris IDEA).
  • find_symbol_locationsreadsDefinition, all references (including the declaration), the declaration of its type (type_definition) or its implementations and overrides (implementation) for the symbol at a position of a workspace file, from its language server.
  • find_toolsreadsFinds IDE tools beyond the small core set this session starts with; every tool belongs to a group.
  • list_filesreadsList project files (relative paths, sorted).
  • project_trustreadsWhether the workspace (or path) is trusted to run its code, and through what (a remembered project or folder, FERRIS_IDEA_TRUST_PROJECTS, --trust); whether safe mode is enforced in this process; what in the project would run code (build files, run configurations); what safe mode blocks; the remembered trusted locations and the trust file.
  • read_filereadsRead a text file of the workspace, optionally a 1-based inclusive line range.
  • replace_text_in_filechangesdry run by defaultwriteReplace text in a workspace text file as the window shows it, saved or not.
  • search_in_filesreadsFind text or a regular expression in the project's own source files (match case, whole words, file mask such as *.rs, *.toml).
  • workspace_inforeadsName, root directory and file counts per language of the open workspace.

Every tool, searchable: MCP tools.