What the Stuga MCP server does
The Stuga MCP server gives Claude Code, Codex, and other MCP clients access to documents and databases hosted in a Stuga workspace. Agents can read workspace content, work with document text, and interact with database data through the MCP connection. Writes are handled as agent changes rather than silently replacing existing content.
By default, a person must review each proposed change in the affected document or table. They can accept or reject changes individually. Workspace administrators and document or database owners can instead allow AI edits to apply immediately. Directly applied changes remain attributed, recorded, and revertible.
Stuga is designed for shared workspaces. Other collaborators can continue editing while agent proposals are pending, and the agent’s later reads include its own pending changes. Documents support real-time collaboration, comments, mentions, and version history. Databases provide typed tables, saved views, row pages, CSV import, and separate SQLite storage for each database.
How it works
Install a Stuga node, create an account and workspace, then connect an MCP client from the AI agents settings. The node runs as a Node.js process with Postgres, pgvector, and pg_search. People use the node in a browser, while agents connect through MCP using the node address supplied during setup.
Most clients authenticate in a browser. During authorization, an administrator or user selects the workspaces the client may access and chooses either read-only access or permission to read and suggest changes. Clients that cannot use browser sign-in can use an API key restricted to selected folders, limited to reads, or given an expiry.
Each agent session is recorded as a run with the agent, acting person, client, reported model, and changes. MCP calls, including reads, appear in the workspace audit log. An event feed and signed webhooks can report changes.
Setup and configuration
Stuga runs on Apple silicon Macs using macOS 15 or later, or through Docker on x86-64 and arm64 systems such as Linux servers and NAS devices. The Mac package includes Postgres and Node.js. The Docker installer starts Postgres and the node with Compose.
After installation, create the first account and workspace, then use Settings → Your AI agents to configure a supported client. The README names Claude Code, Claude Desktop, Codex, Antigravity, Cursor, VS Code, Kiro, Goose, LM Studio, DeepSeek Harness, and Pi as clients with setup information. Other MCP clients can use the node’s MCP URL.
No AI provider key is required by the node for agent connections because each agent supplies its own model. Built-in AI features are separate and disabled until configured. Stuga can use providers including OpenAI, Anthropic, Gemini, and DeepSeek, as well as Ollama.
Tools and capabilities
The Stuga MCP server supports agent access to:
- Documents with collaborative editing and tracked agent changes.
- Databases with typed tables and SQL-backed data.
- Permission-aware keyword and semantic search.
- Queries about which passages agents wrote and whether people accepted them.
- Workspace, folder, document, and database instructions for agents.
- Audit records for MCP reads and writes.
Agents are limited to changing document and database content. People retain control over renaming, moving, deleting, sharing, and changing the review policy.
Limitations and notes
Stuga is self-hosted, so deployment and node administration are part of using it. The documented Mac installation requires Apple silicon and macOS 15 or later; Docker supports x86-64 and arm64. The README does not specify individual MCP tool names or a list of environment variables.
The node sends no telemetry by default. Outbound requests occur for features being used, such as configured AI providers, and the node checks GitHub daily for release information unless an administrator disables that check. Remote access must be enabled by a node administrator before data is sent to Stuga remotely.
The main project uses the AGPL-3.0-only license. The integrations directory has a separate MIT license.