Documentation

MCP server

Connect AI assistants to your projects through the Model Context Protocol. Browse, read, search, and edit with the same conflict checks as the editor.

An assistant starts the IWE Code MCP server with --mcp and communicates through standard streams. Deployment read tools can connect to configured servers.

How it works

  • The assistant launches the IWE Code binary with the --mcp flag. The process serves the Model Context Protocol over its standard streams.
  • The server reads the same workspace file as the application. Projects you add or select in IWE Code appear to the assistant right away.
  • Tools cover browsing, reading, searching, and editing. Git tools report branches, changed files, and recent commits.
  • Editing requires a revision token from the latest read. The write fails when the file changed after that read, so nothing is overwritten blindly.

Connect an assistant

Point the client at the application binary and add the --mcp flag. The binary path depends on your installation method.

Claude Code accepts one command:

claude mcp add iwe -- /path/to/iwe --mcp

Claude Desktop, Cursor, and other clients read an mcpServers configuration:

{
  "mcpServers": {
    "iwe": {
      "command": "/path/to/iwe",
      "args": ["--mcp"]
    }
  }
}

Tools

MCP provides eleven tools. Only write_file changes an existing local text file. The tools/list request returns the input schemas.

list_projects
List spaces and projects, with the selected project marked.
list_files
List files and folders at one level of a project.
read_file
Read a text file. The response includes a revision token for editing.
write_file
Replace the content of an existing text file using its revision token.
search_files
Find files by fuzzy name and path search.
git_status
Show the current branch and the changed files.
git_log
Show recent commits with authors, dates, and refs.
list_deployments
List deployment connections, registered SSH keys, and profiles. Results omit secrets.
resolve_deployment_path
Pass profile and exactly one of local or remote. Returns the mapped paths without connecting.
deployment_read_remote
Pass profile and an absolute remote path. Reads one UTF-8 file up to 512 KiB.
deployment_compare
Pass profile and a project-relative path. Returns localText, remoteText, and identical. Each file can be up to 512 KiB.

The editing flow

  1. Read the file. The response includes the content and a revision token.
  2. Send the changed content back with the same token.
  3. The server checks the file against the token before writing. It refuses the write when the file changed after your read.
  4. Read the file again and repeat when a write is refused.

Security

  • Local file tools use projects from your workspace. Project paths must stay inside the project.
  • MCP uses saved credentials for remote reads. Tool results omit credentials.
  • Workspace metadata and remote files stay unchanged. Use the CLI to manage deployments and transfer files.
  • The server rejects incoming JSON-RPC lines over 1 MiB. The remote file tools limit each text to 512 KiB.

Build from source

Use the installed application binary, or build from source:

cargo build --release
# The binary lands in target/release/iwe

Developer documentation

The developer documentation describes the protocol, the tools, and their limits in detail.