Workspace MCP
Designed for SAP ADT and other virtual filesystems, providing access to workspace files through VS Code's FileSystemProvider with tools for listing directories, reading and editing live documents, saving, searching, and fetching diagnostics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Workspace MCPList the workspace roots and show me the active editor's content."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Workspace MCP
A small MCP server inside VS Code for virtual workspaces and live editors. MIT licensed. No telemetry. No shell tools. Independent of any AI client.
Initial preview. Designed for SAP ADT and other virtual filesystems. Synthetic VFS tests cannot establish compatibility with a real SAP backend; that acceptance test is still required. This project is not affiliated with SAP or OpenAI.
Why
A local filesystem MCP cannot read a VS Code FileSystemProvider. Workspace MCP
keeps resource identifiers as full URIs and uses workspace.fs,
workspace.openTextDocument and WorkspaceEdit. Unsaved editor content is the
source of truth. SAP's own ADT MCP server supplies complementary ABAP operations;
configure it separately in your client. This extension neither bundles SAP code
nor stores SAP credentials.
Related MCP server: lsp-mcp
Install and connect
Requires VS Code 1.137 or later. The extension uses VS Code's bundled Node.js runtime. The MCP client launches the bundled stdio adapter, so the client host also needs Node.js 24 or later.
Download the
workspace-mcp-vsixartifact from a successful GitHub Actions run, or build it below. In VS Code, run Extensions: Install from VSIX.Open and trust your workspace, then run Workspace MCP: Start. Nothing starts implicitly.
Run Workspace MCP: Show Connection Details and select your client.
Copy the displayed stdio configuration into your client's user settings. It launches the bundled adapter with Node.js 24 or later and contains a private token: never commit or share it. Restart/reconnect the client. No certificate installation or HTTP-client setup is needed.
Ask the agent to list workspace roots and inspect the active editor.
With the default
askwrite policy, startup offers session-only or persistent write access; closing the prompt leaves the bridge read-only. Theallowpolicy enables writes without a prompt;denykeeps the bridge read-only.
Turn Auto Save off for documents edited through MCP. Edits are refused while Auto Save is enabled so that editing cannot implicitly persist a change.
The adapter connects internally over authenticated TLS. It verifies the generated server certificate before transmitting credentials, so another local user cannot steal the token by occupying the stopped server's port.
The fixed internal loopback port defaults to 39117 (workspaceMcp.port in User settings).
The token stays in VS Code SecretStorage across restarts; Rotate Token is the
only command that replaces it. The server certificate/private key also remain in
SecretStorage; Rotate Server Identity replaces those separately. Either
rotation requires updated client configuration. Stop closes the session,
retaining credentials.
workspaceMcp.writePolicy is ask by default, with allow and deny alternatives.
Port collisions fail explicitly; use a different user port for another window.
Loopback belongs to the extension host,
which may differ from your desktop when using SSH, WSL or containers.
Client setup and optional Claude/Codex plugin.
Tools
Tool | Behavior |
| Full workspace-folder URIs |
| Scoped active editor, selection and open text tabs |
| Entries through |
| Live text, version and dirty state; optional line range |
| Bounded, case-sensitive literal search through the provider |
| Version-checked text edits; leaves the buffer unsaved |
| Separate version-checked save; may trigger provider dialogs |
| Diagnostics already available in VS Code |
| Reveal a document and optional selection; preserve focus by default |
| Query installed workspace symbol providers; only admitted targets |
| Bounded document structure through installed language providers |
| Compare two workspace documents or a versioned proposed text snapshot |
| Preview provider formatting edits; optionally apply without saving |
Positions are zero-based UTF-16; ranges are end-exclusive. Full URIs are required. No create/delete/rename, arbitrary commands, activation or terminal tools in v0.1. Search reports truncation/errors: it is not an exhaustive SAP repository index.
Development
Node.js 24 LTS (use the latest 24.x patch):
npm ci
npm run check
npm test
npm run test:vscode
npm run format:check
npm run packageLinux extension-host tests require a display: xvfb-run -a npm run test:vscode.
The test runner downloads VS Code 1.137.0 for both the synthetic non-file
FileSystemProvider suite and SAP ADT coexistence checks. Set VSCODE_VERSION to
test another supported release. Node.js types and the bundle target stay on 24;
VS Code API types match the minimum supported VS Code version.
The VSIX is written to artifacts/workspace-mcp.vsix. CI builds that artifact on
every PR; it does not publish a Marketplace release.
Use short-lived feat/, fix/, docs/ or chore/ branches and PRs into main.
Main requires PRs, passing verify CI and resolved review conversations; administrators cannot bypass
the rule. Codex cloud reviews are configured separately from workflow YAML.
Review and merge deliberately; no auto-merge. See design,
security and manual acceptance.
IDE and language tools
show_document loads and reveals a complete workspace URI, optionally selecting
selection: {start: {line, character}, end: {line, character}}. Coordinates are
zero-based UTF-16 and the end is exclusive. preserveFocus defaults to true;
set it to false to focus the editor. Reading and editing do not implicitly show
an editor.
workspace_symbols({query}) and document_symbols({uri}) call VS Code's fixed
public provider commands, supporting both native extensions and LSP-backed
providers. Results contain at most 100 symbols, inspect at most 1,000 nodes, and
report truncated and omitted. Names are capped at 1,000 characters. External,
unsafe, inaccessible and symlink targets are omitted. Empty results can mean no
matching symbols or no applicable provider; no ADT capability is assumed.
show_diff accepts uri and exactly one of otherUri or proposedText.
Proposals also require the current version from read_document. They use
immutable read-only content-provider URIs in memory, capped at 1 MiB each and
eight retained proposals per running bridge. Snapshots still opening are pinned;
when all eight are pending, another proposal fails with LIMIT_EXCEEDED until an
opening completes. Older completed proposals expire from the
provider; VS Code may retain already opened models until their tabs close.
Stopping the bridge releases the snapshot provider and its stored text. No
proposal is written to disk or applied. Comparing existing URIs opens VS Code's
normal diff editor; the user may manually edit its writable side.
format_document({uri, version}) previews bounded edits by default. Optional
range, tabSize (1–32) and insertSpaces control generic formatting. Otherwise
resource-scoped editor settings supply the indentation defaults. Provider
selection follows VS Code's execute-provider commands and does not promise the
same formatter-picker behavior as the interactive Format Document command.
Language-specific formatting remains the installed provider's responsibility.
apply: true uses the same version, write-approval, trust, Auto Save and
cancellation checks as edit_document; it never implicitly saves. Preview
validates edit ranges, overlap and size too. Empty edits may mean the text is
already formatted or no formatter is available. Provider availability and
behavior with SAP ADT require acceptance testing on an actual backend.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read and write shared BitsWeave context, projects, tasks, and work sessions through MCP.
Lean 4 MCP server: compile, prove theorems, and formalize math with Mathlib.
The official Svelte MCP server providing docs and autofixing tools for Svelte development
Browse and manage files in your Moxt AI workspace from any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceExposes VSCode's Language Server Protocol features through MCP, enabling AI assistants to perform language-aware operations like symbol navigation, reference tracking, safe renaming, type information retrieval, and hover documentation across codebases.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with VS Code's language server protocol features (definitions, references, diagnostics) and debugger (breakpoints, stepping, variable inspection) via an MCP server.6 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access live VS Code editor state, symbol navigation, diagnostics, and language-aware editing through MCP, bridging the gap between what the agent can infer from disk and what the editor actually knows.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to interact with a real Windows workspace by providing tools for file operations, code search, Git, command execution, and managing long-running development processes, all under the current user's context.1MIT