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.
- Add the serverOne entry in the client: the ferris-idea program, the word mcp and the absolute path of the project.
- The agent readsNine core tools are offered at first: workspace_info, list_files, read_file, search_in_files and others. Reading needs no right.
- 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.
- You grant the rightOne [[workspace]] entry in agent-permissions.toml in your settings folder.
- The call goes through and is loggedA line in .ferris-idea/agent-log.jsonl names the tool, the rights checked and the result.
Before you start
Section titled “Before you start”- 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-ideaon macOS,/usr/bin/ferris-ideafrom 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.
Add the server to your client
Section titled “Add the server to your client”Run this in the project folder:
claude mcp add ferris-idea -- /Applications/FerrisIDEA.app/Contents/MacOS/ferris-idea mcp "$PWD"claude mcp add ferris-idea -- /usr/bin/ferris-idea mcp "$PWD"claude mcp add ferris-idea -- docker run -i --rm -v "$PWD:/workspace" ghcr.io/damiendrash/ferris-ideaTested 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.
Put this in .cursor/mcp.json in the project, or in ~/.cursor/mcp.json for every project:
{ "mcpServers": { "ferris-idea": { "command": "/Applications/FerrisIDEA.app/Contents/MacOS/ferris-idea", "args": ["mcp", "/absolute/path/to/project"] } }}On Linux, command is /usr/bin/ferris-idea. This is Cursor’s own format; the project has not
tested Cursor yet.
Download ferris-idea-mcp-<version>.mcpb from the
latest release and open it. Claude
Desktop installs the extension and asks for the Project folder. The bundle holds no copy of
Ferris IDEA; it starts the one you installed. If Ferris IDEA is somewhere else, set
Ferris IDEA program in the extension’s settings.
If you prefer a configuration file, the mcpServers entry of the Cursor tab goes into
claude_desktop_config.json (on macOS in ~/Library/Application Support/Claude/); restart Claude
Desktop afterwards.
VS Code reads .vscode/mcp.json in the workspace, with servers as its key:
{ "servers": { "ferris-idea": { "type": "stdio", "command": "/Applications/FerrisIDEA.app/Contents/MacOS/ferris-idea", "args": ["mcp", "${workspaceFolder}"] } }}This is VS Code’s own format; the project has not tested VS Code yet.
Any MCP client that starts a server over standard input and output works with this entry:
{ "mcpServers": { "ferris-idea": { "command": "/absolute/path/to/ferris-idea", "args": ["mcp", "/absolute/path/to/project"] } }}Without Ferris IDEA installed, the container does the same for the mounted folder (no window, and none of the programs Git, compilers or language servers inside):
{ "mcpServers": { "ferris-idea": { "command": "docker", "args": ["run", "-i", "--rm", "-v", "/absolute/path/to/project:/workspace", "ghcr.io/damiendrash/ferris-idea"] } }}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.
More tools than the first nine
Section titled “More tools than the first nine”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.
The first refused call, and the grant
Section titled “The first refused call, and the grant”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 ordelete files of the workspace); nobody was asked. Only the user can grant it: answer "Always forThis 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.-
Open
agent-permissions.tomlin your settings folder:~/.config/ferris-idea/on macOS and Linux (or$XDG_CONFIG_HOME/ferris-idea/, or the folder inFERRIS_IDEA_CONFIG_DIR). Create it if it does not exist. -
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"] -
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.
Read the log
Section titled “Read the log”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.
Connect over HTTP, with the window
Section titled “Connect over HTTP, with the window”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:
-
In Ferris IDEA, open Settings › Tools › AI Assistant and switch on Serve MCP to local agents over HTTP. It starts at once.
-
The window listens on
127.0.0.1only, on a port the system picks, and makes a new token at every start. It writes both tomcp-http/<pid>.jsonin your settings folder:url,tokenand the readyheaderline, plus oneurlper open project. -
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 afterfind_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.
Claude Code in the Ferris IDEA terminal
Section titled “Claude Code in the Ferris IDEA terminal”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.
When it does not work
Section titled “When it does not work”- 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 itsPATH, 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 thesecret-readright.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.
For agents
Section titled “For agents”The core set, the tools that read and change your grants, and the window link:
agent_permissionsWhat 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_linkState of the Claude Code link of this project: when Anthropic'sclaudeCLI 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_mentionSend lines of a project file to Claude Code connected to this window (at_mentioned, SPEC-0358 v2 behaviour 24):path,line_start, optionalline_end(1-based).file_diagnosticsErrors and warnings of workspace files from their language server (clangd, rust-analyzer, pyright, typescript-language-server, gopls), followed by Ferris IDEA's own findings (sourceFerris IDEA).find_symbol_locationsDefinition, 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_toolsFinds IDE tools beyond the small core set this session starts with; every tool belongs to a group.list_filesList project files (relative paths, sorted).project_trustWhether the workspace (orpath) 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_fileRead a text file of the workspace, optionally a 1-based inclusive line range.replace_text_in_fileReplace text in a workspace text file as the window shows it, saved or not.search_in_filesFind text or a regular expression in the project's own source files (match case, whole words, file mask such as*.rs, *.toml).workspace_infoName, root directory and file counts per language of the open workspace.
No tool matches. Try fewer words, or .
Every tool, searchable: MCP tools.