How waishnav/devspace works
DevSpace is a self-hosted MCP server that gives connected coding hosts scoped access to local projects. The main workflow is: a user configures allowed roots and credentials, starts the server, approves a host connection, opens a workspace, then invokes tools to inspect or change files and run commands. The server also provides Git-based change review and optional delegation to local coding agents. Edges reflect the documented workflow and sampled server/tool ownership; subsystem internals not shown in excerpts are represented at their exact source paths without speculative call chains.
Main entry points: server.ts MCP server · index.ts Tool surfaces · local-agent-manager.ts Agent manager · workspaces.ts Workspace registry
Components 24
Access and setup
- CLI
src/cli.ts - Onboarding
src/onboarding.ts - Configuration
src/config.ts - MCP server
src/server.ts - OAuth provider
src/oauth-provider.ts - Allowed roots
src/roots.ts
Workspace coding
- Workspace registry
src/workspaces.ts - Tool surfaces
src/tool-surfaces/index.ts - Command sessions
src/process-sessions.ts - Git worktrees
src/git-worktrees.ts - Project skills
src/skills.ts - Artifact exchange
src/artifact-tools.ts
Local agents
- Agent manager
src/local-agent-manager.ts - Agent daemon client
src/local-agent-client.ts - Agent daemon
src/local-agent-daemon.ts - Agent runtimes
src/local-agent-runtime.ts
Review and presentation
- Review checkpoints
src/review-checkpoints.ts - Change cards
src/ui/review-payload.tsx - Workspace app
src/ui/workspace-app.tsx
Persistent state
- Workspace sessions
src/workspace-store.ts - Agent sessions
src/local-agent-store.ts - SQLite state
src/db/client.ts
Other components
- User
- MCP host
Connections 26
- User → CLI: configures
- CLI → Onboarding: starts setup
- Onboarding → Configuration: writes settings
- User → MCP host: requests coding
- MCP host → MCP server: MCP requests
- MCP server → Configuration: loads settings
- MCP server → OAuth provider: authenticates
- MCP server → Allowed roots: checks scope
- MCP server → Workspace registry: opens workspace
- MCP server → Tool surfaces: registers tools
- Tool surfaces → Workspace registry: resolves workspace
- Tool surfaces → Command sessions: runs commands
- Tool surfaces → Git worktrees: manages worktrees
- Tool surfaces → Project skills: discovers skills
- Tool surfaces → Artifact exchange: handles artifacts
- MCP server → Review checkpoints: creates review manager
- Review checkpoints → Change cards: provides diff data
- MCP server → Workspace app: serves app resources
- MCP server → Agent manager: coordinates agents
- Agent manager → Agent daemon client: starts agent runs
- Agent daemon client → Agent daemon: sends requests
- Agent daemon → Agent runtimes: dispatches turns
- Agent manager → Agent sessions: persists turns
- Workspace registry → Workspace sessions: persists sessions
- Workspace sessions → SQLite state: uses SQLite
- Agent sessions → SQLite state: uses SQLite