# pdrive > Markdown document publishing platform that turns your docs into clean, readable URLs with version control, team collaboration, and programmatic access via MCP and JSON API. pdrive lets teams publish, version, and collaborate on markdown documents. Every document gets a permanent URL, full version history, and automatic rendering to HTML. Projects can be public (visible to anyone) or private (restricted to team members). Access is controlled through account and project memberships with role-based permissions (viewer, editor, manager, admin, owner). Built for engineering docs, RFCs, ADRs, runbooks, API references, AI-generated specs, onboarding guides, and any technical writing that benefits from version control and clean URLs. For the full version with all documentation content inlined, see [llms-full.txt](/llms-full.txt). ## API Access - [JSON API Documentation](/docs/api): RESTful API for reading and publishing documents, including API key authentication - [MCP Server](/docs/mcp): Model Context Protocol server for LLM tool integration ## Documentation - [Getting Started](/docs/getting-started): Quick start guide - [Features](/features): Platform capabilities overview - [Security](/security): Security practices and policies - [Changelog](/changelog): Recent updates and changes ## Key Concepts - **Accounts**: Organizations or individuals with a unique namespace (e.g., `acme`) - **Projects**: Collections of documents within an account (e.g., `docs`, `blog`) - **Documents**: Markdown files with full version history, identified by filename - **Versions**: Immutable snapshots created on each upload, with optional tags and messages ## MCP Tools The MCP server at `/mcp` authenticates via OAuth 2.0 (authorization code flow with PKCE). Discovery endpoint: `/.well-known/oauth-authorization-server`. API keys can also be used as Bearer tokens. - `create_project`: Creates a new project in an account. Requires write scope. - `diff_versions`: Compares two versions of a document and returns a line-level diff. Defaults to comparing the previous version with the latest. Each line has a type (eq, ins, del) and the text content. Also returns addition and deletion counts. - `get_account`: Gets detailed information about an account including stats and permissions. - `get_document`: Reads the latest version of a document. Returns resource_uri for use with subscriptions. - `get_project`: Gets detailed information about a project including stats and last activity. - `get_table_of_contents`: Returns the heading outline of a document. Defaults to the latest version; pass a version number to get a specific version's outline. Each entry has slug, text, level (raw HTML heading level), and display_level (normalized indent for TOC rendering). Useful for understanding document structure without reading the full content. - `get_version`: Reads a specific version of a document. Returns both resource_uri and version_resource_uri. - `list_accounts`: Call this first. Returns the authenticated user and their accounts needed for other pdrive operations. - `list_documents`: Lists documents in a project. Each document includes a resource_uri for use with MCP resource subscriptions. - `list_projects`: Lists projects in an account. Each project includes a resource_uri for use with MCP resource subscriptions. - `list_versions`: Lists all versions of a document. Each version includes a version_resource_uri. - `publish_document`: Publishes a document. Creates it if it doesn't exist, updates it if it does. Returns resource_uri for the document.