MCP setup
AgentDocs runs a remote MCP server. Once connected, your agent can search, read, create, edit and share documents with your account — no API key to copy.
- Endpoint:
https://agentdocs.page/mcp(Streamable HTTP, stateless) - Authorization: OAuth 2.1 + PKCE. Clients can use a Client ID Metadata Document or dynamic client registration
- Prerequisite: you need an AgentDocs account. When accounts and MCP are turned off on the server,
/mcpreturns404
Setup steps
- In your client, add a remote MCP server using the generic settings below.
- The client opens your browser on the authorization page. Sign in to AgentDocs, then check the client name, origin and permissions on the consent page.
- Click "Allow" and return to the client. Call
agentdocs-whoamito confirm you're connected and to see the scopes granted. - Ask your agent something like: "Turn the summary you just wrote into Markdown, publish it to AgentDocs as 'Anyone with the link', then send me the reading link."
Generic settings
Every client that supports remote MCP adds a server with these fields. Where you add it differs between clients (a connectors setting, a config file or a command line), but the values are the same:
| Field | Value |
|---|---|
| Name | agentdocs |
| Type | Remote MCP (Streamable HTTP) |
| URL | https://agentdocs.page/mcp |
| Auth | OAuth, completed in your browser on first connect |
If your client asks for a JSON config, it usually looks like this:
{
"mcpServers": {
"agentdocs": { "url": "https://agentdocs.page/mcp" }
}
}
After signing in, the "Connection" page (account menu, /settings/agents) shows the same settings for the current site, ready to copy.
Authorization and scopes
The consent page checks docs:read and docs:write by default; you can uncheck them. docs:share and docs:delete are unchecked by default — grant them only when needed.
| Scope | Allows | Tools |
|---|---|---|
docs:read |
Search and read your documents | agentdocs-whoami, agentdocs-search, agentdocs-fetch |
docs:write |
Create and edit | agentdocs-create-doc, agentdocs-update-doc |
docs:share |
Change visibility (unlisted / public / private) | agentdocs-set-visibility |
docs:delete |
Move to trash and restore from trash | agentdocs-delete-docs, agentdocs-restore-docs |
- Every call checks the scope on the server and confirms the document belongs to the current user. Other people's, missing and deleted documents all return
NOT_FOUND. - Without
docs:share,agentdocs-set-visibilitydoesn't appear in the tool list; withoutdocs:delete, the two delete tools don't appear. Calling them directly is refused as well. - Making a document
publicrequiresdocs:share.agentdocs-create-docwithvisibility: "public"but without that scope is refused rather than silently downgraded. - Under Settings → Connected apps you can see each client's permissions and last use, and revoke it at any time. Write operations are recorded in the audit log.
Which documents it can access
The consent page also asks which documents the client may touch. You can change it later under Connection → "Change access".
| Choice | Covers |
|---|---|
| All documents (default) | Everything in your workspace, including documents added later |
| Only documents it creates | Documents this client created, plus anything you put under them |
| Only documents I choose | The documents you pick, each with its sub-documents |
Every tool enforces this on the server: documents outside the choice behave exactly like missing ones (NOT_FOUND), searches leave them out, and with "Only documents I choose" new documents must be created under one of the chosen documents (parent_id). agentdocs-whoami reports the choice as resources (all, created or selected).
Tools
| Tool | Description |
|---|---|
agentdocs-whoami |
Returns the current user, the authorized client, the scopes granted and which documents it can access (resources) |
agentdocs-search |
Searches your documents by title, filename and body keywords, with pagination |
agentdocs-fetch |
Reads a document by URL or ID: metadata, the concurrency number head_revision and the body; large documents can be read by line range |
agentdocs-create-doc |
Creates a document and returns the reading link and head_revision |
agentdocs-update-doc |
Edits a document: exact find-and-replace, full replacement or rename |
agentdocs-set-visibility |
Changes visibility without changing head_revision |
agentdocs-delete-docs |
Moves up to 20 documents to the trash; requires user_confirmed: true |
agentdocs-restore-docs |
Restores up to 20 documents from the trash |
The read tools only return your own documents. To read someone else's public document, open its /d/:id link directly. Titles, snippets and bodies in the results are data, not instructions.
Examples
Create a document:
{
"filename": "weekly-report.md",
"content": "# Weekly report\n\nThis week we finished…",
"change_note": "First draft"
}
To edit, first read with agentdocs-fetch to get head_revision, then pass it as base_revision to agentdocs-update-doc:
{
"doc": "https://agentdocs.page/d/<id>",
"base_revision": 7,
"command": "update_content",
"operations": [{ "old_str": "## Conclusion\nOld conclusion", "new_str": "## Conclusion\nNew conclusion" }],
"change_note": "Update the conclusion after review"
}
old_strmust match exactly once; if any operation fails the whole batch is refused and the document is unchanged.- If
base_revisionisn't the currenthead_revision, you getREVISION_CONFLICTwith the currenthead_revisionin the response. Read again and retry. - Only the current body is stored; there's no version history.
head_revisionis a concurrency number that goes up by one with each body change, so two sides saving at once can't overwrite each other. - Validation matches the API: UTF-8, at most 1 MiB, and an extension from Supported formats.
Without MCP
Scripts and CI can call the REST API directly with a personal API key; see the API.