Anytypeのロゴ

Anytype

組織
anyproto

An MCP server enabling AI assistants to interact with Anytype - your encrypted, local and collaborative wiki - to organize objects, lists, and more through natural language.

公開者anyproto
リポジトリanytype-mcp
言語TypeScript
フォーク
59
スター
525
利用可能なツール
29
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Anytypeは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 29個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには525件のスターと59件のフォークがあります。

Anytype MCP Server

The 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.

Features

  • Global & Space Search
  • Spaces & Members
  • Objects & Lists
  • Properties & Tags
  • Types & Templates

Quick Start

1. Get Your API Key

  1. Open Anytype
  2. Go to App Settings
  3. Navigate to API Keys section
  4. Click on Create new button

You can also get your API key using the command line:

bash
npx -y @anyproto/anytype-mcp get-key

2. Configure Your MCP Client

Claude Desktop, Cursor, Windsurf, Raycast, etc.

Add the following configuration to your MCP client settings after replacing <YOUR_API_KEY> with your actual API key:

json
{
  "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.

Claude Code (CLI)

Run this command to add the Anytype MCP server after replacing <YOUR_API_KEY> with your actual API key:

bash
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:

  1. Install the package:
bash
npm install -g @anyproto/anytype-mcp
  1. Update your MCP client configuration to use the global installation:
json
{
  "mcpServers": {
    "anytype": {
      "command": "anytype-mcp",
      "env": {
        "OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer <YOUR_API_KEY>\", \"Anytype-Version\":\"2025-11-08\"}"
      }
    }
  }
}

Custom API Base URL

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.):

json
{
  "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):

bash
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

Example Interactions

Here are some examples of how you can interact with your Anytype:

  • "Create a new space called 'Project Ideas' with description 'A space for storing project ideas'"
  • "Add a new object of type 'Task' with title 'Research AI trends' to the 'Project Ideas' space"
  • "Create a second one with title 'Dive deep into LLMs' with due date in 3 days and assign it to me"
  • "Now create a collection with the title "Tasks for this week" and add the two tasks to that list. Set due date of the first one to 10 days from now"

Tool behavior and API versions

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:

json
"args": ["-y", "@anyproto/anytype-mcp"]

To explicitly use the legacy v1 API, select its versioned spec:

json
"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.

The server names its own operations by OpenAPI operationId in the prose it serves. In the MCP tool listing and in the field descriptions of a get_schema or get_op_schema response, those names are re-spelled as this wrapper's tool names (list_properties becomes API-list-properties). A repair hint is different: the server spells each operation it names as a REST route and lists it as a typed see_also reference, so the wrapper replaces that route text with the tool name and arguments, and annotates the reference with tool and args. Literal values are never rewritten: enum and example values, op names, endpoint strings and output schemas keep the server's spelling, and so do the OpenAI and Anthropic tool exports, which name tools by operationId.

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 apart from their warnings, whose hints are re-spelled and whose references gain tool and args; 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.
  • Existing callers can still use the exact legacy If-Match and Idempotency-Key argument names. They are not advertised alongside the new names. Conflicting alias values are rejected.
  • Pagination, field selection, dry_run, create_missing_options, and schema discovery remain available.
  • Pairing and API-key management are excluded. v2 auth_whoami remains available for inspecting the current credential's permissions; its response does not contain the bearer token.
  • Event-stream tools are excluded because they do not produce a bounded tool result. Use message-listing tools to retrieve chat messages.
  • File downloads are supported through a binary adapter. The tool streams bytes to a private temporary directory and returns 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.

Measuring tool definitions

bash
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.

Development

Installation from Source

  1. Clone the repository:
bash
git clone https://github.com/anyproto/anytype-mcp.git
cd anytype-mcp
  1. Install dependencies (requires Bun):
bash
bun install
  1. Build the project:
bash
bun run build
  1. Link the package globally (optional):
bash
bun link

Contribution

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.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "anytype": {
      "command": "npx",
      "args": [
        "-y",
        "@anyproto/anytype-mcp"
      ],
      "env": {
        "OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer <YOUR_API_KEY>\", \"Anytype-Version\":\"2025-05-20\"}"
      }
    }
  }
}

利用可能なツール

  • API-search-global

    Search objects across all spaces Error Responses: 401: Unauthorized 500: Internal server error

  • API-list-spaces

    List spaces Error Responses: 401: Unauthorized 500: Internal server error

  • API-create-space

    Create space Error Responses: 400: Bad request 401: Unauthorized 429: Rate limit exceeded 500: Internal server error

  • API-get-space

    Get space Error Responses: 401: Unauthorized 404: Space not found 500: Internal server error

  • API-update-space

    Update space Error Responses: 400: Bad request 401: Unauthorized 403: Forbidden 404: Space not found 429: Rate limit exceeded 500: Internal server error

  • API-add-list-objects

    Add objects to list Error Responses: 400: Bad request 401: Unauthorized 404: Not found 429: Rate limit exceeded 500: Internal server error

  • API-get-list-views

    Get list views Error Responses: 401: Unauthorized 404: Not found 500: Internal server error

  • API-get-list-objects

    Get objects in list Error Responses: 401: Unauthorized 404: Not found 500: Internal server error

  • API-list-members

    List members Error Responses: 401: Unauthorized 500: Internal server error

  • API-get-member

    Get member Error Responses: 401: Unauthorized 404: Member not found 500: Internal server error

  • API-list-objects

    List objects Error Responses: 401: Unauthorized 500: Internal server error

  • API-create-object

    Create object Error Responses: 400: Bad request 401: Unauthorized 429: Rate limit exceeded 500: Internal server error

  • API-get-object

    Get object Error Responses: 401: Unauthorized 404: Resource not found 410: Resource deleted 500: Internal server error

  • API-update-object

    Update object Error Responses: 400: Bad request 401: Unauthorized 404: Resource not found 410: Resource deleted 429: Rate limit exceeded 500: Internal server error

  • API-list-properties

    List properties Error Responses: 401: Unauthorized 500: Internal server error

  • API-create-property

    Create property Error Responses: 400: Bad request 401: Unauthorized 429: Rate limit exceeded 500: Internal server error

  • API-get-property

    Get property Error Responses: 401: Unauthorized 404: Resource not found 410: Resource deleted 500: Internal server error

  • API-update-property

    Update property Error Responses: 400: Bad request 401: Unauthorized 403: Forbidden 404: Resource not found 410: Resource deleted 429: Rate limit exceeded 500: Internal server error

  • API-list-tags

    List tags Error Responses: 401: Unauthorized 404: Property not found 500: Internal server error

  • API-create-tag

    Create tag Error Responses: 400: Bad request 401: Unauthorized 429: Rate limit exceeded 500: Internal server error

  • API-get-tag

    Get tag Error Responses: 401: Unauthorized 404: Resource not found 410: Resource deleted 500: Internal server error

  • API-update-tag

    Update tag Error Responses: 400: Bad request 401: Unauthorized 403: Forbidden 404: Resource not found 410: Resource deleted 429: Rate limit exceeded 500: Internal server error

  • API-search-space

    Search objects within a space Error Responses: 401: Unauthorized 500: Internal server error

  • API-list-types

    List types Error Responses: 401: Unauthorized 500: Internal server error

  • API-create-type

    Create type Error Responses: 400: Bad request 401: Unauthorized 429: Rate limit exceeded 500: Internal server error

  • API-get-type

    Get type Error Responses: 401: Unauthorized 404: Resource not found 410: Resource deleted 500: Internal server error

  • API-update-type

    Update type Error Responses: 400: Bad request 401: Unauthorized 404: Resource not found 410: Resource deleted 429: Rate limit exceeded 500: Internal server error

  • API-list-templates

    List templates Error Responses: 401: Unauthorized 500: Internal server error

  • API-get-template

    Get template Error Responses: 401: Unauthorized 404: Resource not found 410: Resource deleted 500: Internal server error

AnytypeのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Anytypeに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Anytypeをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. AnytypeのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "anytype": {
      "command": "npx",
      "args": [
        "-y",
        "@anyproto/anytype-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてAnytypeのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. AnytypeのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Anytypeを使ってこのタスクを手伝ってもらえますか?
Anytype
はい、読みました。
Anytypeで調べた結果をお伝えします。

よくある質問

Anytype MCPサーバーは何に使いますか?

Anytypeは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでAnytype MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでAnytypeを利用できます。

TypingMindでAnytype MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Anytypeを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Anytype MCPをTypingMindに接続するにはどうすればよいですか?

AnytypeはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでAnytype MCPのどのようなツールを利用できますか?

Anytypeは29個のMCPツールを提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Anytype MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Anytypeで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇