anytype-mcp — Claude Code MCP server: talk to your Anytype space
Wires an AI assistant into the Anytype API: search, objects, properties, tags and templates, all from a conversation.
claude mcp add anytype-mcp -e OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> -- npx -y @anyproto/anytype-mcpWhat anytype-mcp does
anytype-mcp is the official MCP server from anyproto. It reads Anytype's OpenAPI specification and turns its operations into tools the assistant can call on its own. The npx wrapper loads one OpenAPI document at startup, then reuses the parsed spec and HTTP client instead of fetching it again on every call.
What you get: global and per-space search, spaces and members, objects and lists, properties and tags, types and templates. The server points at http://127.0.0.1:31009 by default; for anytype-cli (port 31012) or another host, set ANYTYPE_API_BASE_URL. An API key is required — create one in Anytype under API Keys, or run npx -y @anyproto/anytype-mcp get-key.
Spec discovery tries /v2/docs/openapi.json first and falls back to /docs/openapi.json on 404 or 410. Pass an explicit URL or a local file and there is no fallback: an auth failure, a connection error or malformed JSON stops startup. Restart the server after updating Anytype, or the new API version won't be picked up.
What it helps with
- find an object in Anytype without opening the app
- create a space and describe what it holds
- add a task with a due date and assignee
- build a collection from existing objects
- inspect properties and tags of a type
Example prompts for the agent
- Create a space called 'Project Ideas' with a description for storing ideas
- Add a Task object titled 'Research AI trends' to it
- Make a collection 'Tasks for this week' and put both tasks in it
How to install anytype-mcp
Platform CLI
claude mcp add anytype-mcp -e OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> -- npx -y @anyproto/anytype-mcpReplace <…> with your own values
Platform CLI
codex mcp add anytype-mcp --env OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> -- npx -y @anyproto/anytype-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"anytype-mcp": {
"command": "npx",
"args": [
"-y",
"@anyproto/anytype-mcp"
],
"env": {
"OPENAPI_MCP_HEADERS": "<OPENAPI_MCP_HEADERS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"anytype-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@anyproto/anytype-mcp"
],
"env": {
"OPENAPI_MCP_HEADERS": "<OPENAPI_MCP_HEADERS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> anytype-mcp npx -y @anyproto/anytype-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about anytype-mcp
How do I install anytype-mcp in Claude Code?
Run claude mcp add anytype-mcp -e OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> -- npx -y @anyproto/anytype-mcp, replacing the placeholder with your API key.
What does anytype-mcp do?
It gives the assistant tools for the Anytype API: search, spaces and members, objects and lists, properties, tags, types and templates.
What do I need to run anytype-mcp?
An API key from Anytype settings and the app running. The API base URL defaults to http://127.0.0.1:31009 and can be overridden with ANYTYPE_API_BASE_URL.