
The Anytype MCP Server converts Anytype's OpenAPI specification into MCP tools, enabling AI assistants to interact with Anytype's knowledge management platform through natural language commands. It provides capabilities for searching spaces and objects, managing members, creating and organizing objects and lists, and handling properties, tags, types, and templates within Anytype workspaces. The server solves the problem of programmatic access to Anytype's features by allowing users to manage their knowledge base through conversational AI interfaces like Claude, Cursor, and other MCP-compatible clients.
Public tool metadata for what this MCP can expose to an agent.
get_spacesRetrieves all available Anytype spaces for the current user. This tool returns a list of spaces with their IDs, names, and other metadata. Use this tool to get an overview of all spaces or to find a specific space ID for use with other tools. No parameters are required.Retrieves all available Anytype spaces for the current user. This tool returns a list of spaces with their IDs, names, and other metadata. Use this tool to get an overview of all spaces or to find a specific space ID for use with other tools. No parameters are required.
No parameter schema in public metadata yet.
get_objectsSearches for and retrieves objects within a specified Anytype space. This tool allows you to list all objects or filter them using a search query. Results are paginated for better performance with large spaces. Use this tool to discover objects within a space, find specific ob...5 paramsSearches for and retrieves objects within a specified Anytype space. This tool allows you to list all objects or filter them using a search query. Results are paginated for better performance with large spaces. Use this tool to discover objects within a space, find specific ob...
full_responsebooleaninclude_textbooleanlimitnumberoffsetnumberspace_idstringget_object_contentRetrieves detailed content and metadata for a specific object in an Anytype space. This tool provides comprehensive information about an object including its properties, relations, and content. Use this tool when you need to examine a specific object's details after discoverin...3 paramsRetrieves detailed content and metadata for a specific object in an Anytype space. This tool provides comprehensive information about an object including its properties, relations, and content. Use this tool when you need to examine a specific object's details after discoverin...
include_textbooleanobject_idstringspace_idstringcreate_spaceCreates a new Anytype space with the specified name. This tool allows you to set up a fresh workspace for organizing objects and collaborating with others. Use this tool when you need to establish a new organizational container for your Anytype content.1 paramsCreates a new Anytype space with the specified name. This tool allows you to set up a fresh workspace for organizing objects and collaborating with others. Use this tool when you need to establish a new organizational container for your Anytype content.
namestringcreate_objectCreates a new object within a specified Anytype space. This tool allows you to add various types of content (pages, notes, tasks, etc.) to your spaces. You can specify the object's name, type, description, icon, and content. Optionally, you can use a template to create pre-str...8 paramsCreates a new object within a specified Anytype space. This tool allows you to add various types of content (pages, notes, tasks, etc.) to your spaces. You can specify the object's name, type, description, icon, and content. Optionally, you can use a template to create pre-str...
bodystringdescriptionstringiconobjectnamestringsourcestringspace_idstringtemplate_idstringtype_keystringdelete_objectPermanently removes an object from a specified Anytype space. This tool deletes the object and all its content. Use this tool with caution as deleted objects cannot be recovered. Always verify the object ID before deletion to avoid removing important content.2 paramsPermanently removes an object from a specified Anytype space. This tool deletes the object and all its content. Use this tool with caution as deleted objects cannot be recovered. Always verify the object ID before deletion to avoid removing important content.
object_idstringspace_idstringexport_objectExports an Anytype object in Markdown format. This tool allows you to extract content from Anytype for use in other applications or for backup purposes. Markdown format is human-readable and suitable for documentation. Use this tool when you need to share Anytype content with...3 paramsExports an Anytype object in Markdown format. This tool allows you to extract content from Anytype for use in other applications or for backup purposes. Markdown format is human-readable and suitable for documentation. Use this tool when you need to share Anytype content with...
formatstringobject_idstringspace_idstringget_space_membersRetrieves a list of all members who have access to a specified Anytype space. This tool provides information about each member including their ID, name, and access level. Results are paginated for spaces with many members. Use this tool when you need to understand who has acce...3 paramsRetrieves a list of all members who have access to a specified Anytype space. This tool provides information about each member including their ID, name, and access level. Results are paginated for spaces with many members. Use this tool when you need to understand who has acce...
limitnumberoffsetnumberspace_idstringget_typesRetrieves all object types available in a specified Anytype space. This tool provides information about the different types of objects that can be created in the space, including their IDs, names, and metadata. Results are paginated for spaces with many types. Use this tool wh...3 paramsRetrieves all object types available in a specified Anytype space. This tool provides information about the different types of objects that can be created in the space, including their IDs, names, and metadata. Results are paginated for spaces with many types. Use this tool wh...
limitnumberoffsetnumberspace_idstringget_type_detailsRetrieves detailed information about a specific object type in an Anytype space. This tool provides comprehensive details about the type's structure, including its relations, views, and configuration options. Use this tool when you need to understand the structure of a particu...2 paramsRetrieves detailed information about a specific object type in an Anytype space. This tool provides comprehensive details about the type's structure, including its relations, views, and configuration options. Use this tool when you need to understand the structure of a particu...
space_idstringtype_idstringget_templatesRetrieves all available templates for a specific object type in an Anytype space. Templates provide pre-configured structures and content for creating new objects. This tool returns a list of templates with their IDs, names, and metadata. Results are paginated for types with m...4 paramsRetrieves all available templates for a specific object type in an Anytype space. Templates provide pre-configured structures and content for creating new objects. This tool returns a list of templates with their IDs, names, and metadata. Results are paginated for types with m...
limitnumberoffsetnumberspace_idstringtype_idstringget_template_detailsRetrieves detailed information about a specific template in an Anytype space. This tool provides comprehensive details about the template's structure, content, and configuration. Use this tool when you need to examine a template's properties before using it to create new objec...3 paramsRetrieves detailed information about a specific template in an Anytype space. This tool provides comprehensive details about the template's structure, content, and configuration. Use this tool when you need to examine a template's properties before using it to create new objec...
space_idstringtemplate_idstringtype_idstringget_list_viewsRetrieves views configured for a specific list in a space. Views define how objects in the list are filtered and sorted.4 paramsRetrieves views configured for a specific list in a space. Views define how objects in the list are filtered and sorted.
limitnumberlist_idstringoffsetnumberspace_idstringget_list_view_objectsRetrieves objects from a specific list view with applied filters and sorting.5 paramsRetrieves objects from a specific list view with applied filters and sorting.
limitnumberlist_idstringoffsetnumberspace_idstringview_idstringadd_objects_to_listAdds one or more objects to a specific list in a space.3 paramsAdds one or more objects to a specific list in a space.
list_idstringobject_idsarrayspace_idstringremove_object_from_listRemoves an object from a specific list in a space.3 paramsRemoves an object from a specific list in a space.
list_idstringobject_idstringspace_idstringglobal_searchExecutes a search across all spaces the user has access to, with options for filtering by type and sorting.7 paramsExecutes a search across all spaces the user has access to, with options for filtering by type and sorting.
include_textbooleanlimitnumberoffsetnumberquerystringsort_directionstringasc · descdefault: descsort_propertystringcreated_date · last_modified_date · last_opened_date · namedefault: last_modified_datetypesarraysearch_spaceExecutes a search within a specific space, with options for filtering by type and sorting.9 paramsExecutes a search within a specific space, with options for filtering by type and sorting.
full_responsebooleaninclude_textbooleanlimitnumberoffsetnumberquerystringsort_directionstringasc · descdefault: descsort_propertystringcreated_date · last_modified_date · last_opened_date · namedefault: last_modified_datespace_idstringtypesarrayThe Anytype MCP Server is a Model Context Protocol (MCP) server enabling AI assistants to seamlessly interact with Anytype's API through natural language.
It bridges the gap between AI and Anytype's powerful features by converting Anytype's OpenAPI specification into MCP tools, allowing you to manage your knowledge base through conversation.
Create new buttonYou can also get your API key using the command line:
npx -y @anyproto/anytype-mcp get-key
Add the following configuration to your MCP client settings after replacing <YOUR_API_KEY> with your actual API key:
{
"mcpServers": {
"anytype": {
"command": "npx",
"args": ["-y", "@anyproto/anytype-mcp"],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer <YOUR_API_KEY>\", \"Anytype-Version\":\"2025-11-08\"}"
}
}
}
}
Tip: After creating an API key in Anytype, you can copy that ready-to-use configuration snippet with your API key already filled in from the API Keys section.
Run this command to add the Anytype MCP server after replacing <YOUR_API_KEY> with your actual API key:
claude mcp add anytype -e OPENAPI_MCP_HEADERS='{"Authorization":"Bearer <YOUR_API_KEY>", "Anytype-Version":"2025-11-08"}' -s user -- npx -y @anyproto/anytype-mcp
If you prefer to install the package globally:
npm install -g @anyproto/anytype-mcp
{
"mcpServers": {
"anytype": {
"command": "anytype-mcp",
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer <YOUR_API_KEY>\", \"Anytype-Version\":\"2025-11-08\"}"
}
}
}
}
By default, the server connects to http://127.0.0.1:31009. For anytype-cli (port 31012) or other custom base URLs, set ANYTYPE_API_BASE_URL:
MCP Client (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"anytype": {
"command": "npx",
"args": ["-y", "@anyproto/anytype-mcp"],
"env": {
"ANYTYPE_API_BASE_URL": "http://localhost:31012",
"OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer <YOUR_API_KEY>\", \"Anytype-Version\":\"2025-11-08\"}"
}
}
}
}
Claude Code (CLI):
claude mcp add anytype \
-e ANYTYPE_API_BASE_URL='http://localhost:31012' \
-e OPENAPI_MCP_HEADERS='{"Authorization":"Bearer <YOUR_API_KEY>", "Anytype-Version":"2025-11-08"}' \
-s user -- npx -y @anyproto/anytype-mcp
Here are some examples of how you can interact with your Anytype:
The server loads one OpenAPI document at startup. With the standard configuration it tries /v2/docs/openapi.json first. If that endpoint returns 404 or 410, it falls back to /docs/openapi.json on the same server, where older apps serve v1. This selects v2 whenever available while supporting apps that only have the legacy API:
"args": ["-y", "@anyproto/anytype-mcp"]
To explicitly use the legacy v1 API, select its versioned spec:
"args": ["-y", "@anyproto/anytype-mcp", "run", "http://127.0.0.1:31009/v1/docs/openapi.json"]
The versioned /v2/docs/openapi.json URL also remains available for explicitly selecting v2.
Explicit spec URLs and local files are used exactly as supplied, without fallback. Authentication failures, server errors, connection failures, and malformed JSON also fail startup instead of selecting another API. The wrapper uses the routes declared in the selected document without rewriting their version prefixes.
Discovery runs once per MCP process. Tool calls reuse the parsed specification and HTTP client without fetching OpenAPI again. Restart the MCP server after updating Anytype to discover a newly available API version; no persistent spec cache is used.
Tool descriptions contain operation guidance; API errors are returned when calls fail, with isError: true, HTTP status when available, and the API's code, message, issues, and hints.
Successful v1 object creation, updates, deletion, and chat creation return a compact object receipt with its ID, space ID, name, archive state, and type identity when available. The wrapper omits echoed markdown, snippets, property values, icons, and full type definitions. It preserves warnings, generated IDs, and etag/retry metadata. Read the object to retrieve its content when needed. v2 already returns compact create/edit receipts, which are passed through unchanged; reads, searches, and errors also keep their full API responses.
The shared tool policy controls inputs and request routing:
Authorization and Anytype-Version come from OPENAPI_MCP_HEADERS.expected_etag maps to If-Match. Use the etag from a previous read to prevent overwriting a changed object. The wrapper does not retry a failed precondition or remove it. Response etags are returned in a separate request_metadata text block when available.request_key maps to Idempotency-Key on endpoints that declare that header. Omit it for a new write; the wrapper generates a unique key and returns it in request_metadata or an error's request_key. Reuse it only to retry the same write. Separate calls get different generated keys, even with identical documents. There are no automatic retries. A global Idempotency-Key in OPENAPI_MCP_HEADERS is rejected.If-Match and Idempotency-Key argument names. They are not advertised alongside the new names. Conflicting alias values are rejected.dry_run, create_missing_options, and schema discovery remain available.auth_whoami remains available for inspecting the current credential's permissions; its response does not contain the bearer token.path, filename, media_type, and size. The path is local to the machine/container running MCP. Successful files remain there until removed or cleaned up by the operating system; interrupted downloads are removed. Range and cache headers are not model inputs.Known inputs with HTTP meanings are matched by parameter location, so a document's own fields are preserved. Open-ended JSON documents use the body argument. Objects with declared fields use flat arguments. The existing omission of flattened filters fields and the FilterExpression schema fallback remain separate limitations; this cleanup does not restore filter-schema support.
Duplicate final tool names fail startup with both routes identified. Select separate v1/v2 specs instead of merging operations with overlapping names.
Set ANYTYPE_MCP_DEBUG=1 for concise operation names, response status, and timing on stderr. Arguments, authorization headers, payloads, and entire operation tables are not logged.
bun run measure-tools
# Or inspect a different local OpenAPI document:
bun run measure-tools ./path/to/openapi.json
The default command compares fixed v1 and v2 fixtures. It reports tool count, serialized characters, and UTF-8 bytes, not model-specific token counts.
git clone https://github.com/anyproto/anytype-mcp.git
cd anytype-mcp
bun install
bun run build
bun link
Thank you for your desire to develop Anytype together!
❤️ This project and everyone involved in it is governed by the Code of Conduct.
🧑💻 Check out our contributing guide to learn about asking questions, creating issues, or submitting pull requests.
🫢 For security findings, please email security@anytype.io and refer to our security guide for more information.
🤝 Follow us on Github and join the Contributors Community.
Made by Any — a Swiss association 🇨🇭
Licensed under MIT.
OPENAPI_MCP_HEADERS*secretJSON string of headers for Anytype API. Example: {"Authorization":"Bearer <YOUR_API_KEY>", "Anytype-Version":"2025-05-20"}