Skip to content

Moki in the IDE

github-actions[bot] edited this page Nov 21, 2026 · 30 revisions

Generated from docs/ide.md: edit it there, changes made in the wiki are replaced. Em português: Moki na IDE.

Moki in the IDE (VS Code)

The Moki extension for VS Code (Moki light) brings a project's knowledge and tools to the AI you already use in the editor. It does not replace that AI and it does not need the desktop app to be open: it gives Claude Code or Copilot Chat the project's context, agents, skills and MCP servers, and lets you start activities and multi-agent operations from a side panel.

This guide covers installing it, configuring it, every way to use it, and what to do when something does not work. The short reference for the extension itself is ide/vscode/README.md; MCP servers are managed as described in mcp-servers.md.

What you get

Three separate pieces arrive in the IDE. Knowing which is which explains most of what follows.

Piece What it is What it is for
The Moki panel A side bar with the app's look: Activities, Agents, Context, Operations, Runs Start an activity or an operation, choose what the AI reads, follow runs
Moki's MCP server A read-only server bound to one project (ide/mcp/server.ts) The IDE's AI reads the project's confirmed context, notes, shared context, agents and skills while you work
The project's MCP servers The servers registered in the app's MCP Manager (Playwright, Azure DevOps, Jira…) that apply to the project and are on The IDE's AI uses the same external tools as the app and the operations, configured once
Moki app ── Settings › MCP servers ──┐
                                     ├──> IDE's AI (Claude Code, Copilot Chat)
Moki project (context, notes, agents)┘        ▲
          └── Moki's MCP server (read-only) ──┘

Registering a tool in Moki instead of directly in the IDE means the agents, the operations and the IDE all get it, with credentials kept as ${VARIABLE}. A server added only to the IDE works only there, and the IDE's AI still knows nothing about the project.

Requirements

  • VS Code 1.101 or newer.
  • A Moki project in the active workspace. Create project in the panel creates a blank project and links the folder chosen in the native dialog.
  • Automatic chat launch requires VS Code 1.147+ and an available native new-session command for the selected AI. Installing a standalone vendor extension does not guarantee this command is available.
  • For the terminal alternative and operations: an AI tool that runs in a terminal (Claude Code, Codex, Gemini CLI, Antigravity CLI or Cursor Agent) installed on the computer.
  • To build the extension yourself: Node.js 22.18 or newer.

Install

From the desktop app. The cat icon above New note on the fixed rail opens Moki in your IDE. Choose an installed editor and press Open: Moki installs or updates its extension only when needed, checks that the editor really lists it, then opens the project’s linked folder (or the framework folder) and shows Moki’s view there with that project chosen (vscode://orsi88.moki/open?project=<id>, cursor://… in Cursor). A window of the editor that was already open loads a newly installed extension only after Developer: Reload Window; the dialog says so. Close with the X. The same installer is available in Settings › My AIs › Install the Moki extension and open on the VS Code card installs the extension of the app's version (downloaded from its release and checked by SHA-256) and opens VS Code on the project's linked folder. The Cursor card does the same, marked Not verified. VS Code opens a folder you have not trusted yet in Restricted Mode, where the Moki extension stays off: answer "Yes, I trust the authors" (or run Workspaces: Manage Workspace Trust) and the Moki icon appears in the Activity Bar.

From the release. Download moki-0.7.6.vsix, then:

code --install-extension moki-0.7.6.vsix --force

From the source. From the repository root:

npm install
npm run vscode:package                                   # release/moki-<version>.vsix
code --install-extension release/moki-<version>.vsix --force

Then run Developer: Reload Window in VS Code. Reinstall the same way after each new build; a window that is not reloaded keeps the old version.

Without installing (development). npm run vscode:build, then code --extensionDevelopmentPath="$PWD/ide/vscode". In this mode the extension uses the repository itself instead of <Documents>/Moki.

What happens on the first start. The extension and the desktop app share the installed framework and workspaces. The framework normally lives in <Documents>/Moki or the QA_ROOT override. If that location is in a Git checkout, installed framework files go to the user's application data directory and the workspaces stay at their original paths. The extension opens the workspace that is active in the app; a window that is already open follows it when it receives a request from the app or on Refresh. A Moki icon (the cat) appears in the activity bar and Moki: … in the status bar.

Configure

1. Connect the folder to a project

The extension finds the project of the folder open in VS Code:

Situation What it does
You chose a project for this VS Code workspace before Uses it while it exists
The folder (or a folder above it) is linked to exactly one project Uses that project
It is linked to more than one Status bar: Moki: choose a project
It is linked to none Status bar: Moki: no project

To link a folder for good, open the project in the desktop app and use the link button of the ribbon (the chain): every VS Code window on that folder then opens the project by itself. To pick a project for this VS Code workspace only, click the status bar item, the project selector at the top of the panel, or run Moki: Choose Project. A folder linked from the app is listed first, as Linked to this folder.

2. Choose the AI and check its connections

Choose your AI under the project selector; the choice is kept per Moki project in this IDE workspace. Connections in the footer shows the target folder, configuration state, missing environment variables, authentication reminders and Test for each MCP, including Moki's own server.

Connect MCPs writes the chosen client's settings after confirmation: Claude Code uses .mcp.json, Cursor .cursor/mcp.json, and Codex .codex/config.toml (trusted projects only). Your entries stay and the previous file is backed up. A project or folder change while confirmation is open cancels the write. Copilot receives definitions automatically.

A successful test means initialization and tool discovery worked from Moki's environment. It does not prove that another AI client authenticated or enabled those tools. Sign in through that AI when needed. Configure environment variables where the IDE and its AI run; never paste credentials into Moki.

The existing commands remain available:

How you use the AI What to do
Copilot Chat Nothing. The extension registers Moki and the project's servers by itself (MCP: List Servers shows them)
Claude Code opened from the panel in a terminal Nothing. It starts with --mcp-config for the project, as in the app
Claude Code opened by you (the Claude Code chat, or claude typed in a terminal) Connections › Connect MCPs with Claude selected, or Moki: Connect Claude Code
Cursor opened on the project's linked folder Moki: Sync MCP Servers to Cursor
Only the panel Nothing. The panel works without MCP

Connect Claude Code writes Moki's server and the project's servers that are on to the folder's .mcp.json after you confirm. Only Moki's entries (moki, moki-*) change and yours stay; the current file is backed up to .moki-backup/ first; a new .mcp.json is kept out of Git (.git/info/exclude), and you are warned when the file is already versioned. It writes a copy: after turning servers on or off in the app, or switching project, connect again. Copilot follows those changes by itself.

3. Choose what the AI may read

In Activities, Agents and Operations the panel lists only the starred items (the same stars as in the app) and the 5 most used ones, counted when you start something from the panel. A search box finds the others. With no star or use yet, the first 5 show.

In Context, the project is listed by folder, one row each with a checkbox, its number of files and roughly how many tokens it gives the AI, with the total on top: project context, notes, the inbox, your own folders (marked your folder), loose files, Deliveries (the outputs/ of each run, titled by the request) and files shared by tags. Checked, a folder goes to the requests and to what the AI can read through Moki's MCP server; unchecked, it stays out of both. Your folders, a new one included, start checked; Deliveries and shared files start unchecked. Open a folder to leave one file out or let one in (the folder shows as partly checked, 2 left out) and to star a file: the AI gets it first, with its text, in the context pack. Moki's working files never show: temporary/, logs/, and a run's state.json, inputs, logs and work/. The choices are kept per project in workspace/projects/<id>/companion.json.

The panel

Tab What you do
Activities Pick an activity, inbox files, an agent, a note and the language, then Start in a new chat; terminal and copy are under Other ways to start
Agents The agents enabled in the project and what each one does; pick one to work with it
Context Check the folders the AI gets; open one for a file's exception or to star the files it should read first
Operations Start an operation with an AI selected for each step
Runs Resume activities and follow operations step by step

The footer has Connections and Refresh. Connection details open on demand. The title menu keeps the connection and read-history commands.

Ways to use it

Ask the IDE's AI about the project

While you code or write tests, ask in plain language: "which business rules apply to free shipping?", "what does the checkout flow say about coupons?". With Moki's server connected (automatic in Copilot; Connect Claude Code for the Claude Code chat), the AI answers from the project's confirmed context instead of guessing. It can call:

Tool Returns
moki_get_project Name, description, deliverable language, tags, agents, skills and MCP servers
moki_get_context A context pack for a task: starred files with their text (within about 24,000 characters), then references to the most related files
moki_search_knowledge Matching lines across the files it may read
moki_list_resources / moki_get_resource References, and the text of one project file (context first, then the other folders; a PDF as its text), note, shared file, agent or skill
moki_get_agent An agent's instructions (reading them does not run the agent)
moki_record_learning, moki_list_learnings, moki_get_evolution, moki_propose_version What you taught an agent, skill or activity, and Mycroft's proposals (Mycroft). The only tools that write, and only to Moki's evolution registry: a proposal waits for your approval in the app

Start an activity in a separate chat

In Activities, choose one (Review user stories, Design tests, Review, then design tests, Failure pre-analysis, Build test evidence, Project context…), the inbox files it needs, optionally an agent and a note, and the language. Then:

  • Start in a new chat asks the selected native integration to create an editor tab and send directly to its new session. Existing conversations and drafts stay intact. The action is disabled when that integration has no supported command. VS Code's integrated Claude/Codex agents and standalone vendor extensions are different integrations.
  • Other ways to start contains the terminal and clipboard routes. Copying never focuses or fills another chat. A terminal starts the selected supported CLI, or explicitly names Claude Code when no matching CLI is selected.

A chat URI identifies a destination, not task completion. Follow execution in its tab; inspect the chat before retrying uncertain delivery. Repeated launch messages join the original attempt. No run is created solely to track a chat launch.

From a file's context menu, Moki: Start Activity with This File offers activities that need no inbox files. The linked-folder file passes through the existing context validation; a selection supplies line numbers. Save when prompted. Files outside the linked folder are refused.

The request is the one the desktop app builds: it names the project, the activity's skill, the files you chose and the files you switched off in Context. The skills stop at their approval points exactly as in the app.

Work as one of the project's agents

In Agents, pick an agent and start from there, or choose it in an activity. In a chat already open, "act as the test-designer agent of this project" also works: the AI reads the agent's instructions through moki_get_agent.

Resume an activity

Runs › Activities to resume lists runs that stopped at an approval point or waiting for input. Pick one to open the AI with the run, so it continues from its state.json.

Run a multi-agent operation

An operation linked to the project in the app starts from Operations: pick it, choose the AI of each step, fill what the agents need (text and inbox files) and what you want, then Start the operation. Follow it in Runs.

  • Each step opens in its own VS Code terminal (Moki · ). A step is done when it writes its summary (handoff/<slot>.md) and its outputs; the next one starts by itself, even with the panel closed.
  • Open the run to answer a step's question (typed into its terminal when it is open, otherwise the step reopens with your answer), approve, send back with notes or end a step waiting for approval, try again a failed step with the same or another AI, choose the path when no arrow fits a result or a step would run too many times, pause, cancel (its terminal closes) and show its terminal.
  • Runs are the same as in the app (same engine and run folder), so a run started in the IDE can be followed in the app and the other way round. Creating and editing operations, and linking them to a project, stay in the app.

Automate tests with the project's context

Register the Playwright MCP server in the app (Settings › MCP servers) as global or for the project, then in the IDE ask the AI to automate a scenario: it reads the rules and flows through Moki's server and drives the browser through Playwright while it writes and checks the test. The same works for any tool registered in Moki: Azure DevOps or Jira to read a work item while investigating a failure, Figma to compare a screen with its design.

Bring tools you already have in the IDE into Moki

Servers configured directly in Claude Code, Cursor or VS Code show in the app under Settings › MCP servers › Found in the AI tools. Import into Moki adds one to the catalog, so agents and operations can use it too; a credential written in it becomes a ${VARIABLE}.

See what the AI read

Moki: Show What the AI Read opens workspace/projects/<id>/logs/companion.log: each read through Moki's server, with the tool and what was asked.

Other AI tools and editors

Any tool that speaks MCP over stdio can use Moki's server: npm run mcp -- --project <id> from the repository (or --folder <path> to find the project of a folder). Cursor opened on the project's linked folder gets the servers through Moki: Sync MCP Servers to Cursor.

App or IDE: where each thing is

Task App IDE
Create a blank project and link a chosen folder Yes Yes
Prepare project context with an activity Yes Yes
Register MCP servers and choose their projects Yes No (the IDE uses them)
Create and edit agents and operations; link operations to a project Yes No
Start activities and agents Yes Yes
Choose the context the AI reads Yes (per activity) Yes (per project, companion.json)
Start and follow operations Yes Yes
The AI reads the project while you code No Yes (Moki's MCP server)

Exceptions and troubleshooting

What you see Why What to do
The panel shows a loading error and Try again The extension could not read its initial state or refresh it, or did not answer within 30 seconds Read the error, address the reported cause and choose Try again. A failed initial read replaces Loading…; a failed refresh keeps the last loaded project visible
Status bar Moki: no project; panel This folder is not linked to a Moki project The open folder is not linked to any project Choose a project in the panel, or link the folder in the app (Choose my folder)
Moki: choose a project The folder is linked to more than one project Choose one; the choice is kept for this VS Code workspace
There are no projects in the active workspace The workspace active in the app has no projects, or another workspace was active Use Create project in the panel, or make the right workspace active in the app and run Refresh
The projects listed are from another workspace The window follows the workspace active in the app when it receives a request or on Refresh Switch the workspace in the app, then run Refresh
Choose the Moki project of this folder first. A command was run with no project chosen Choose the project, then run it again
Open a folder in the IDE first. (Connect Claude Code) VS Code has no folder open, so there is no place for .mcp.json Open the system's folder
The Claude Code chat does not see Moki .mcp.json was never written, or was written before the servers changed Connect Claude Code, then start a new Claude Code session
Copilot does not list a server Its ${VARIABLE} is not set on this computer (it is left out), or it is off or not for this project in the app Set the variable and restart VS Code; check the server in the app
Connection needed or Update connection Client settings are missing or differ from the current catalog Check the folder in Connections, then Connect MCPs
Start in a new chat is disabled The IDE version or AI integration has no supported native command Read its explanation; enable the native agent integration or use a terminal/clipboard route
The panel asks for the project's folder in its own window Multiple roots are open, or the selected project has no matching open folder Open that folder in a dedicated IDE window; native session creation has no verified root-targeting argument
This project has no linked folder on this computer (Sync to Cursor) The project's folder was never linked on this computer Link it in the app (the link button of the ribbon)
project.json does not allow writing to … The project sets writeAllowed: false for its folder Write the file yourself, or allow writing in project.json
… is not installed on this computer (command "…" not found). The AI tool chosen (for the request or for a step) is not installed or not on the PATH Install it, or choose another AI (in the desktop app, Settings › My AIs › Install, or a terminal tab of the missing AI, installs it after you type y). A step that cannot start fails once and waits: Try again offers the installed AIs
The terminal of this step is not open in VS Code. The step's terminal was closed, or VS Code was restarted Answer the step in the panel (it reopens with your answer) or Reopen the step
A step shows Failed Its terminal closed before it wrote its summary, or its AI could not open Try again, with the same or another AI; what it delivered stays in its folder
No AI tool that runs in a terminal is installed Operations need a terminal AI (Claude Code, Codex, Gemini CLI, Antigravity CLI, Cursor Agent) Install one
{agent} uses the MCP server {mcp}, which is not configured for {ai} The step's agent needs a server its chosen AI does not get Choose another AI for that step, or make the server available
The panel looks like an older version after a rebuild The installed package is older than the build, or the window was not reloaded Reinstall the .vsix with --force and Reload Window
This workspace has no operations yet No operation exists in the workspace Create one in the app (Settings › Operations) and link it to the project

Security and privacy

  • Moki's MCP server is read-only and bound to one project when it starts; no tool can change the project or reach another one. Files of other projects are reachable only through a shared tag, and only once you switch them on.
  • Files that look secret (.env*, keys and certificates, credentials*, secrets*, SSH keys) are never listed or read.
  • The panel runs in a webview with its own Content-Security-Policy (scripts only with the page's nonce, no network) and talks only to a closed list of calls that always use the project VS Code is connected to.
  • AI tools start as a command plus arguments, never through a shell.
  • MCP credentials are ${VARIABLE} references read from this computer's environment; Moki never stores their values.
  • The project's MCP servers do what they do: a server marked executes waits for your approval in operations, but inside the IDE's own chat the IDE's AI decides when to call it.

Files the extension writes

File When
workspace/projects/<id>/companion.json You check or uncheck folders, set a file exception or star files
workspace/projects/<id>/logs/companion.log The AI reads something through Moki's server
<folder>/.mcp.json and <folder>/.moki-backup/ Connect Claude Code, after you confirm
<folder>/.cursor/mcp.json and .moki-backup/ Connect MCPs for Cursor or the palette command, after confirmation
<folder>/.codex/config.toml and .moki-backup/ Connect MCPs for Codex, after confirmation; variables stay references
VS Code workspace state Chosen AI and folder, scoped to the Moki project
workspace/library/usage.json You start an activity, agent or operation from the panel (the count behind "most used")
workspace/projects/<id>/runs/… Activities and operations started from the panel, as in the app
<Documents>/Moki The framework copy, refreshed when a new version of the extension starts

Limits

  • One project per VS Code window at a time. Automatic chat launch needs a single matching open folder; multi-root windows keep the terminal and copy routes.
  • MCP servers, agents and operations are created and edited in the app; the IDE uses them. Blank projects can also be created in the IDE.
  • Native automatic chat launch is capability-checked on VS Code 1.147+. Cursor prompt links require manual confirmation; standalone vendor extensions without the native command use the explicit alternatives.
  • The workspace is the one active in the app; an open window follows it on a request from the app or on Refresh.
  • .mcp.json is a snapshot: connect again after changing servers or project.
  • The extension is built and tested for VS Code. Editors based on VS Code (Cursor and others) may install it, but that has not been verified.

Clone this wiki locally