View all files | ||||
English | 中文
Workspace Viewer is a read-only local workspace viewer for ChatGPT Apps and MCP.
It lets ChatGPT inspect user-approved local workspaces through a local Agent, without giving the cloud service direct access to the user's filesystem.
The first version focuses on a conservative safety model: discover registered workspaces, list file trees, inspect text files, search paths or file contents, and batch multiple read-only checks. It does not execute shell commands, write files, delete files, or access directories that the user has not explicitly registered.
Website: https://workspace-viewer.slhaf.work
ChatGPT is useful for code understanding, debugging, documentation, and refactoring discussions, but it usually cannot inspect a user's local project directly.
Workspace Viewer provides a narrow bridge:
This keeps local filesystem access under the user's control while still making project inspection available to ChatGPT.
Workspace Viewer is intentionally limited.
It can:
It cannot:
The local Agent is the final filesystem boundary. It validates workspace IDs, normalizes paths, rejects path traversal, applies ignore rules, and limits output size.
Workspace Viewer uses a hosted Worker plus a local Agent.
Main components:
The Worker does not mount, sync, or directly access local files. Actual filesystem reads happen only inside the local Agent process.
The v1 MCP tool set includes:
| listWorkspaces | List registered workspaces available to the current user. |
| describeWorkspace | Return a lightweight overview of a workspace. |
| listTree | List a directory tree inside a workspace. |
| inspectFile | Read a text file or line range. |
| searchFile | Search by path or text content. |
| batchExec | Execute multiple read-only workspace checks in one call. |
| createAgentPairingCode | Create a pairing code for connecting a local Agent. |
Install dependencies and build all packages:
Run type checks and tests:
Run the Worker locally:
Run the Agent locally:
For local-only development without OAuth, set DEV_AUTH_BYPASS_ENABLED=true in a local Wrangler environment. Do not enable this in production.
The Agent stores local configuration under:
Example shape:
Workspace root paths are stored locally. The hosted Worker stores only workspace metadata needed for routing and discovery.
The normal flow is:
Example commands:
To revoke local Agent credentials while keeping local workspace entries:
Production deployments require OAuth and Cloudflare resources.
Required Worker secrets:
Optional reviewer login for ChatGPT Apps review:
REVIEW_PASSWORD_HASH should be formatted as:
Do not commit real secrets, real reviewer credentials, or production-only tokens.
Development seed SQL, if present, is kept outside the production migration path.
Do not apply development seed data to production D1 databases. In particular, avoid fixed development Agent IDs, workspace IDs, or tokens in any production environment.
Workspace Viewer is currently an early version intended for ChatGPT Apps / MCP publishing and review.
Implemented:
Planned or possible future work:
Licensed under the Apache License 2.0. See LICENSE.