# anytype-mcp

Wires an AI assistant into the Anytype API: search, objects, properties, tags and templates, all from a conversation.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 537
- Author: anyproto
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/anyproto/anytype-mcp
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/anytype-mcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `OPENAPI_MCP_HEADERS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add anytype-mcp -e OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> -- npx -y @anyproto/anytype-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add anytype-mcp --env OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> -- npx -y @anyproto/anytype-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "anytype-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@anyproto/anytype-mcp"
            ],
            "env": {
                "OPENAPI_MCP_HEADERS": "<OPENAPI_MCP_HEADERS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "anytype-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@anyproto/anytype-mcp"
            ],
            "env": {
                "OPENAPI_MCP_HEADERS": "<OPENAPI_MCP_HEADERS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e OPENAPI_MCP_HEADERS=<OPENAPI_MCP_HEADERS> anytype-mcp npx -y @anyproto/anytype-mcp
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [knowledge-synthesis](https://affpapa.org/en/nevibecode/skills/knowledge-synthesis.md) — skill · 6400 installs
- [llm-wiki](https://affpapa.org/en/nevibecode/skills/ar9av-llm-wiki.md) — skill · 4100 installs
- [wiki-query](https://affpapa.org/en/nevibecode/skills/wiki-query.md) — skill · 3600 installs
- [second-brain](https://affpapa.org/en/nevibecode/skills/second-brain.md) — skill · 2800 installs
- [second-brain-query](https://affpapa.org/en/nevibecode/skills/second-brain-query.md) — skill · 2500 installs
- [ima-copilot](https://affpapa.org/en/nevibecode/skills/ima-copilot.md) — skill · 1600 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
