# Sitedrive MCP
Connect Sitedrive to your AI assistant using the [Model Context Protocol](https://modelcontextprotocol.io).
The Sitedrive MCP server provides secure access to Sitedrive tools and reference material
through your existing Sitedrive account.
## Set up Sitedrive MCP
### Server URL
```
https://api.app.sitedrive.com/mcp
```
Add this URL as a remote **Streamable HTTP** MCP server. For the recommended OAuth setup, do not
configure an API key, bearer token, client ID or client secret. Your client discovers Sitedrive OAuth
and opens the sign-in flow automatically.
### Request limits
A JSON-RPC batch may contain at most 100 messages. Larger batches receive HTTP 400 with
JSON-RPC error code `-32600`; split them into requests of at most 100 messages.
This limit counts protocol messages, not the tasks or rows returned by a tool.
### Choose your client
#### Claude.ai and Claude Desktop
For an individual plan:
1. Open **Customize → Connectors**.
2. Select **+ → Add custom connector**.
3. Enter `https://api.app.sitedrive.com/mcp` as the remote MCP server URL. Leave OAuth Client ID and Client Secret empty.
4. Add the connector, sign in to Sitedrive and approve access.
For Team and Enterprise, an Owner first adds the URL under **Organization settings → Connectors**;
members then connect it from **Customize → Connectors**. Hosted Claude connects from Anthropic's
cloud, so use a deployed HTTPS endpoint rather than a local `localhost` URL.
#### Claude Code
```bash
claude mcp add --transport http sitedrive https://api.app.sitedrive.com/mcp
claude mcp login sitedrive
```
You can also open `/mcp` in Claude Code and select Sitedrive to authenticate.
#### OpenAI Codex
Codex CLI, the IDE extension and Codex in the ChatGPT desktop app share MCP configuration:
```bash
codex mcp add sitedrive --url https://api.app.sitedrive.com/mcp --oauth-resource https://api.app.sitedrive.com/mcp
codex mcp login sitedrive --scopes mcp
```
Open `/mcp` in a new Codex session to inspect the connection and available tools.
#### ChatGPT
ChatGPT receives third-party MCP connections through plugins. Once the Sitedrive plugin is
published or added to your workspace marketplace, install it from **Plugins**, connect Sitedrive
when prompted and start a new chat. Pasting the raw MCP URL into a normal ChatGPT conversation does
not install a connector.
#### Other MCP clients
Choose **remote MCP** or **Streamable HTTP**, enter `https://api.app.sitedrive.com/mcp`, and leave custom headers empty.
For clients that accept the common `mcpServers` JSON shape:
```json
{
"mcpServers": {
"sitedrive": {
"type": "streamable-http",
"url": "https://api.app.sitedrive.com/mcp"
}
}
}
```
Some clients call the same transport `http`. Follow the client's schema if it differs. Clients that
only support local stdio servers can use the third-party compatibility bridge:
```bash
npx -y mcp-remote https://api.app.sitedrive.com/mcp
```
Native Streamable HTTP is preferred because it removes the local bridge and lets the client manage
OAuth directly.
### Confirm the connection
Ask the assistant:
> Call `sitedrive_whoami` and show the structured result.
The result should contain `"authenticated_via": "oauth"` and the Sitedrive accounts the user can
currently access. Then ask it to call `sitedrive_search_projects` with a known project or site name to verify a read-only tool. Do not test a write tool against a production account unless you
intend to keep the result.
## Authentication and permissions
Connecting opens Sitedrive in your browser. Sign in and approve the connection; your password is
never shared with the MCP client. The client receives short-lived access tokens and manages renewal
through OAuth.
MCP operations run as the signed-in user and remain limited by that user's current account, site and
project permissions. Account API-key and Sitedrive-hosted AI settings do not change these personal
permissions. Account-scoped tools ask for an account ID or derive it from the selected site or project.
## Available capabilities
### Tools
For an existing schedule, start with `sitedrive_search_projects` using a project, site or account name. Its account ID filter is optional. Use `sitedrive_whoami` when you need the signed-in identity, not as a prerequisite to finding a project.
| Tool | What it does |
|---|---|
| `sitedrive_list_skills` | Discover focused Sitedrive skills before an unfamiliar multi-tool task. Returns metadata only; use sitedrive_get_skill with an item ID to load instructions. Filter by domain (for example scheduling) or a literal substring in its ID or description. Follow next_cursor until null when browsing the complete catalog. |
| `sitedrive_get_skill` | Load one focused skill by ID from sitedrive_list_skills or a tool description. Returns the server-owned SKILL.md and its content revision; the identical document is available at its resource URI. Read move-scheduled-work for package/phase/location/void moves and proportional resize. Instructions guide tool use and do not expand user authorization. |
| `sitedrive_whoami` | Returns the authenticated Sitedrive user and their accounts, including a link to each account in the app and whether MCP tools are enabled on it. Use for identity, authentication or access questions, e.g. when a tool says MCP is not enabled. To find a schedule, call sitedrive_search_projects directly; its search does not need an account ID. |
| `sitedrive_search_projects` | First step for finding a schedule: search project, site or account names directly, without calling sitedrive_whoami. A site can contain several schedules with unrelated names; show candidates and ask which one when ambiguous. Search is required and literal, case-insensitive. Narrow by account_id only when already known. Results include names, IDs, timezone, match source and a project link. Only readable active projects appear. has_more means refine the name or account. A known project ID from a schedule URL can go directly to a project-scoped tool. |
| `sitedrive_search_locations` | Resolve a named floor, room or work area within a known project. By default search covers both physical spaces and work areas, regardless of space_type: older floors may be typed ZONE. Work areas include generated leaf-space areas when the project has no default location breakdown; their breakdown ID is the project ID. Supply a non-empty name search. Names and ancestor paths disambiguate matches; do not choose the first duplicate. For a physical floor or room, use the space result as space_id; use a work_area result as work_area_id only when the user means that schedule breakdown. Same-named spaces and work areas can contain different work, so ask which scope when unclear. A selected work area may extend beyond the named floor. has_more means narrow the search. |
| `sitedrive_search_teams` | Find a crew by name on a known project site, or resolve returned team_ids in one bounded IDs lookup. Supply a name or IDs. Use returned IDs in project-scoped team filters. has_more means narrow the name or IDs. |
| `sitedrive_list_work_package_summaries` | Browse current schedule packages/phases and their whole-package planned/actual dates, weighted progress and planned working duration. Use parent_id=null for a top-level overview or a package ID for a focused phase summary. Returns package IDs, parent IDs and names in structural order. Request a parent by its ID only when additional hierarchy context is needed. No location summaries. Use sitedrive_list_work_package_location_summaries for work on a floor, personal/team assignments or date filters. Use returned IDs to narrow follow-up requests. Never average displayed child progress to obtain parent totals. Working duration is planned calendar span, not labor effort. Returns a bounded answer; has_more means narrow search or package scope. Use REST summary resources for full extraction. |
| `sitedrive_list_work_package_location_summaries` | Find current schedule work by floor/location, person, team, dates or package. First resolve the project with sitedrive_search_projects, a physical floor with sitedrive_search_locations, and a named crew with sitedrive_search_teams when needed. For “what is unfinished on Level 3?”, use the physical space ID as space_id and completion=incomplete. Returns one complete package/location aggregate per item, not nested package totals. Filters select complete package–location summaries; their progress includes all contributing tasks. Includes package and location names. Use package summaries for additional package hierarchy context. Use assigned_user_id=me for my work. A floor match may include a work area extending beyond that floor. Returns a bounded answer; has_more means narrow the question. Do not interpret a bounded result as an exact total. Never enumerate the whole schedule through repeated calls. Use REST summary resources for full extraction. Use response timezone and explicit offsets for calendar weeks. Starts next week: planned_start_from/planned_start_before. Use completion for task-state selection, overdue_as_of for unfinished work past planned end, and sort_by=progress with limit=10 for least-complete locations. These are location results, not whole-package overdue totals. Do not infer readiness, delay causes, forecasts or historical progress. Working duration is planned calendar span, not labor effort. |
| `sitedrive_set_work_package_progress` | Set current reported progress for the TASK work in a package or phase. First find the project and package, then use location summaries if the user named a specific work area. Omit location_id to update every descendant leaf and location; pass one exact location_id for that work area, or null for unplaced work. This is a real schedule mutation and may affect actual dates; ask the user before calling when intent is ambiguous. Every selected TASK instance receives the same percentage, while displayed package progress remains weighted. At 100%, legacy prerequisite tasks are completed too. Never retry automatically after a timeout; read the current summary first. |
| `sitedrive_move_work_packages_by` | Shift selected scheduled work by signed working_seconds using the project working calendar, preserving durations and relative spacing. Negative seconds move earlier. Accepts up to 100 non-overlapping selections; repeat a package ID for distinct work_area_id occurrences, including null for void work. Duplicate selections and overlapping affected work are rejected. Never automatically retry a relative move after a lost response: it may have committed. For discovery, scope, calendar interpretation and read-back verification, load sitedrive_get_skill with id move-scheduled-work. Find package IDs using package summaries. Omit work_area_id to affect a whole package or phase, including descendants; use work_area_id from location summaries for one occurrence, or null for void work. Requires project admin update rights; schedule planners are not supported for this release. Unknown, deleted, foreign-schedule, or unmatched occurrence IDs make the entire selection a no-op; read the result and verify IDs if nothing changed. After a lost response, read current dates before deciding whether to retry. Sequence and parallelization are not supported. |
| `sitedrive_move_work_package_to` | Move one scheduled package, phase or location occurrence to planned_start using the project working calendar, preserving its working duration. Use an explicit timezone offset and a valid working-calendar start. For discovery, scope, calendar interpretation and read-back verification, load sitedrive_get_skill with id move-scheduled-work. Find package IDs using package summaries. Omit work_area_id to affect a whole package or phase, including descendants; use work_area_id from location summaries for one occurrence, or null for void work. Requires project admin update rights; schedule planners are not supported for this release. Unknown, deleted, foreign-schedule, or unmatched occurrence IDs make the entire selection a no-op; read the result and verify IDs if nothing changed. After a lost response, read current dates before deciding whether to retry. Sequence and parallelization are not supported. |
| `sitedrive_resize_work_package_start` | Proportionally resize one scheduled package, phase or location occurrence to planned_start while keeping its planned finish fixed. Uses the project working calendar. Use an explicit timezone offset and a valid working-calendar start. For discovery, scope, calendar interpretation and read-back verification, load sitedrive_get_skill with id move-scheduled-work. Find package IDs using package summaries. Omit work_area_id to affect a whole package or phase, including descendants; use work_area_id from location summaries for one occurrence, or null for void work. Requires project admin update rights; schedule planners are not supported for this release. Unknown, deleted, foreign-schedule, or unmatched occurrence IDs make the entire selection a no-op; read the result and verify IDs if nothing changed. After a lost response, read current dates before deciding whether to retry. Sequence and parallelization are not supported. |
| `sitedrive_resize_work_package_end` | Proportionally resize one scheduled package, phase or location occurrence to planned_end while keeping its planned start fixed. Uses the project working calendar. Use an explicit timezone offset and a valid working-calendar finish. For discovery, scope, calendar interpretation and read-back verification, load sitedrive_get_skill with id move-scheduled-work. Find package IDs using package summaries. Omit work_area_id to affect a whole package or phase, including descendants; use work_area_id from location summaries for one occurrence, or null for void work. Requires project admin update rights; schedule planners are not supported for this release. Unknown, deleted, foreign-schedule, or unmatched occurrence IDs make the entire selection a no-op; read the result and verify IDs if nothing changed. After a lost response, read current dates before deciding whether to retry. Sequence and parallelization are not supported. |
| `sitedrive_create_work_packages` | Create up to 100 ordinary packages with at most 1000 scheduled locations in total. Discover work_area_id with location summaries/search; use null for unplaced work. Package responsible_manager_ids set owners; location team_id and responsible_manager_ids set the team and assignees. User IDs must be available on the project site; teams must belong to it. Each package needs a name and at least one location with offset-qualified planned_start and planned_end. Unplaced work cannot be mixed with placed locations. New packages always follow the project default location breakdown, including children of parents using another breakdown. Every placed location must belong to the project default breakdown, or the discovered space-fallback breakdown when no default is configured. Placed areas must map to schedulable spaces; parent areas without their own mapping and empty areas reject the whole batch. Use null for unplaced work; the NIL UUID is rejected. Optional parent_id must belong to this project; adding children to a leaf parent replaces its scheduled tasks with child work. Optional order_number sets package order among siblings (finite decimals or null); omission leaves it unset. UI sorting can rewrite sibling orders. No schedule view is required. Returns package and task-definition IDs in request order; save these for later updates. external_id is a customer mapping field, not a uniqueness or retry key. Never automatically retry after a lost response: creation may have committed. Read package summaries before deciding whether to retry. Uses existing project write permissions. Changes are broadcast to open schedules. |
| `sitedrive_update_work_package_metadata` | Update name, description, abbreviation, hex_color, order_number, work_section_id and external_id for up to 100 project packages atomically. Supply each id and at least one field. Omitted fields stay unchanged; null clears nullable fields. name cannot be null or blank. Does not change dates, progress, hierarchy or location assignments: use the dedicated date/progress tools for those. Uses existing project write permissions. Changes are broadcast to open schedules. |
| `sitedrive_remove_work_packages` | Remove up to 100 whole project packages and ALL their scheduled locations. Destructive operation using existing soft-deletion/history behavior. Every selected ID must be an existing project package without children; unknown, deleted, foreign IDs and parents reject the entire batch without partial deletion. Selecting a parent together with its children is also rejected. Locked packages cannot be removed. Returns removed IDs. A repeated successful removal is rejected because the IDs are already deleted. Uses existing project write permissions. Changes are broadcast to open schedules. |
| `sitedrive_list_work_section_namespaces` | List the work section libraries (WORK_SECTION namespaces) of one account, the classifications work packages are tagged with: id, name, description, is_default, locked, archived and read_only. Get account_id from sitedrive_whoami. Sitedrive system templates are not listed. Any account member can read. Write tools require system_config access as well as admin rights on the library's account; a write to another account gets access_denied. Locked libraries and Sitedrive system templates are read-only for everyone (namespace_read_only); unlock a library in the Sitedrive UI first. |
| `sitedrive_get_work_sections` | Read one work section library as a tree: every section with code, name, description, parent_code, order_number and depth, in display order (depth-first, siblings by order_number). Codes are unique within a library and are how the write tools address sections. read_only is true for locked libraries and Sitedrive system templates. Any account member can read. Write tools require system_config access as well as admin rights on the library's account; a write to another account gets access_denied. Locked libraries and Sitedrive system templates are read-only for everyone (namespace_read_only); unlock a library in the Sitedrive UI first. |
| `sitedrive_submit_mcp_feedback` | When Sitedrive MCP cannot meet a user goal after trying the relevant tools, explain the gap and offer to submit feedback. Call this tool only if the user explicitly asks you to submit it or accepts your offer. Do not submit for missing permissions, a transient error, or a legitimate empty result. The short feedback text is stored in Sitedrive logs and analytics for product review. Never include secrets or a full chat transcript. |
Moving and resizing use four dedicated tools. Clients using the former
`sitedrive_move_work_packages` tool must refresh their tool catalog and select the appropriate
operation above. Pass `working_seconds`, `planned_start`, or `planned_end` at the top level;
the MCP tools no longer accept a `change` selector. The REST move endpoint retains its existing
`targets` and `change` request format.
### Skills
Use `sitedrive_list_skills` to discover focused skills by domain or a literal search, then
`sitedrive_get_skill` to load one by ID. Discovery returns metadata and an exclusive `next_cursor`;
pass it as `after` with the same filters until null. Instruction bodies are loaded only when needed.
The first scheduling skill, `move-scheduled-work`, covers moving and proportionally resizing
existing work. It does not represent every scheduling capability.
Each skill has one canonical `SKILL.md` under `backend/ai/src/mcp/skills/<id>/`. Its frontmatter
defines the ID (`name`), description, and `metadata.domain`. Add a reviewed file and explicit import
to `skills/catalog.ts` to extend the catalog; IDs and domains are not hard-coded schema enums.
The retrieval tool and `skill://<id>/SKILL.md` resource serve identical bytes with a SHA-256 revision
in the tool result. The build bundles these files, so serving skills requires no runtime filesystem
or GitHub access. The plugin repository needs no copy of their instructions.
These are ordinary MCP tools and resources. This server does not advertise the newer Skills over MCP
extension: its installed SDK and protocol do not implement that extension's discovery methods. Clients
can load the guidance through `sitedrive_get_skill` without native skill-extension support.
### Reference resources
Project creation and schedule-template tools and bootstrap prompts have been removed. Use Sitedrive’s file-import flow for project creation. Existing MCP clients should refresh their tool catalog to pick up the `search_*` and `list_*` names.
The server registers its reference documents as MCP resources at `sitedrive://reference/<slug>`.
Clients with resource support list them automatically, and the assistant can fetch them on demand.
| Slug | Topic |
|---|---|
| `skill-move-scheduled-work` | move-scheduled-work |
| `design-principles` | Design principles for a good Sitedrive WBS |
| `intake-checklist` | What to know about a project before drafting WBS / Space Model |
| `location-breakdowns-and-space-tags` | The distinction between location_level (UI management view) and property_type (physical zone matching) |
| `project-types` | Catalogue of project archetypes and per-archetype Space Model conventions |
| `schedule-questions` | How to scope schedule questions and interpret Gantt measures |
| `zone-sizing` | Per-archetype zone sizing heuristics and location_level guidance |
## Troubleshooting
**The browser does not open** — Remove any manually configured authorization header, then reconnect
using only the MCP URL.
**A hosted client cannot connect to a local URL** — Claude.ai, ChatGPT and other hosted clients make
requests from their own cloud. Use the deployed HTTPS MCP URL. Local URLs work only with clients
running on the same machine, such as Claude Code or Codex CLI.
**Authorization request expired** — Start the connection again from the MCP client.
**Authentication is required again** — Let the client refresh first. If it cannot, clear the stored
authentication and reconnect. A revoked grant requires new consent.
**Tool calls return `Forbidden`** — Your Sitedrive role does not allow the operation on the target
account, site or project.
**The server is connected but no tools appear** — Reconnect or restart the client so it refreshes
the MCP tool catalog.
---
## Protocol support
### Discovery smoke test
```bash
curl -s https://api.app.sitedrive.com/.well-known/oauth-protected-resource/mcp
```
The response should name `https://api.app.sitedrive.com/mcp` as the resource and contain an HTTPS authorization-server
URL. Use a real MCP client for the authorization flow; OAuth access tokens are intentionally managed
by the client rather than copied into shell commands.
- Transport: **Streamable HTTP** ([implemented protocol revision](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports))
- Stateless — no `Mcp-Session-Id` tracking. Every `POST` to the endpoint is a fresh transaction.
- OAuth discovery, Authorization Code with PKCE, Dynamic Client Registration, Client ID Metadata
Documents, refresh-token rotation and revocation are supported for public clients
(`token_endpoint_auth_method=none`) and for confidential clients such as Microsoft Copilot Studio
(`client_secret_basic` or `client_secret_post`) and clients that sign with their own key, such
as ChatGPT (`private_key_jwt`). PKCE is required for every client.
Client references: [Claude remote MCP](https://code.claude.com/docs/en/mcp),
[Claude custom connectors](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp),
[OpenAI Codex MCP](https://developers.openai.com/codex/mcp/).
## Create, patch and remove work packages
Use `sitedrive_create_work_packages`, `sitedrive_update_work_package_metadata`, and
`sitedrive_remove_work_packages` with a `project_id` and a batch. Creation uses `locations` with
`work_area_id`, `planned_start`, and `planned_end`; save the returned package/task-definition IDs.
Metadata omission preserves a field and null clears nullable fields. Removal deletes all locations
of existing leaf packages; a parent or invalid ID rejects the entire batch. Creation is not retry-safe
after a lost response. Create and remove accept 1–100 packages; creation accepts at most 1,000 total
locations. Unplaced work (`work_area_id: null`) cannot be mixed with placed locations in one package.
Placed locations within a package must share one location breakdown, which creation infers and preserves.
Dates require an explicit time zone offset. Team assignment and hierarchy editing are outside this subset.
Example creation arguments:
```json
{
"project_id": "<project-id>",
"work_packages": [{
"name": "Install ventilation",
"external_id": "msproject:12345",
"locations": [{
"work_area_id": null,
"planned_start": "2026-11-02T08:00:00+02:00",
"planned_end": "2026-11-03T16:00:00+02:00"
}]
}]
}
```
Patch metadata with `{"project_id":"<project-id>","work_packages":[{"id":"<returned-id>","description":null}]}`.
Remove with `{"project_id":"<project-id>","work_package_ids":["<returned-id>"]}`.
Metadata supports name, description, abbreviation, hex_color, order_number, work_section_id and external_id;
name cannot be null or blank. Removed IDs must be live in the project with no children. Selecting a
parent and all its children still fails without partial deletion. Repeating a successful removal fails
because those IDs are already deleted. Existing project permissions apply to every write.