From fb61eeefcabdd5bd3724124eb2bec6f08306f943 Mon Sep 17 00:00:00 2001 From: Vadym Milichev Date: Fri, 20 Mar 2026 13:21:56 +0200 Subject: [PATCH] chore: added missing parts in package.json, .npmignore added, minor addendum in readme, openapi.json updated --- .gitignore | 4 ++++ .npmignore | 27 +++++++++++++++++++++++++++ README.md | 6 ++++++ package.json | 12 ++++++++++++ scripts/openapi.json | 29 ++++++----------------------- 5 files changed, 55 insertions(+), 23 deletions(-) create mode 100644 .npmignore diff --git a/.gitignore b/.gitignore index b101def..173236e 100644 --- a/.gitignore +++ b/.gitignore @@ -159,6 +159,10 @@ bin .vscode-test +# VSCode local settings + +.vscode + # yarn v2 .yarn/cache diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..f3c56da --- /dev/null +++ b/.npmignore @@ -0,0 +1,27 @@ +# Source & Config +src/ +cli/ +scripts/ +tsconfig.json +vitest.config.ts +eslint.config.js +.vscode/ + +# Tests & Maps +**/__tests__ +**/*.test.ts +**/*.test.js +**/*.map +build/tsconfig.tsbuildinfo + +# Assets & Docs +CLAUDE.md +instructions.md +Dockerfile-multi-stage +*.tgz +server.json +tools.json + +# Local Environment +node_modules/ +.DS_Store diff --git a/README.md b/README.md index bd65934..59ec179 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,12 @@ claude mcp add anytype \ -s user -- npx -y @anyproto/anytype-mcp ``` +**MCP Server in a container:** +Sometimes, Anytype MCP Server runs in a Docker container, f.x. in [ToolHive](https://docs.stacklok.com/toolhive/guides-ui/run-mcp-servers). In this case, `ANYTYPE_API_BASE_URL` must point to the host machine, where Anytype API runs: +```bash +ANYTYPE_API_BASE_URL=http://host.docker.internal:31009 +``` + ## Example Interactions diff --git a/package.json b/package.json index 73a3231..ea8c7c4 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,18 @@ "bin": { "anytype-mcp": "bin/cli.mjs" }, + "files": [ + "bin", + "README.md", + "LICENSE.md" + ], + "main": "bin/cli.mjs", + "exports": { + ".": "./bin/cli.mjs" + }, + "publishConfig": { + "access": "public" + }, "dependencies": { "@modelcontextprotocol/sdk": "1.27.1", "axios": "1.13.6", diff --git a/scripts/openapi.json b/scripts/openapi.json index 1819ea9..b09e171 100644 --- a/scripts/openapi.json +++ b/scripts/openapi.json @@ -551,25 +551,7 @@ }, "FilterCondition": { "description": "The filter condition", - "enum": [ - "equal", - "not_equal", - "greater", - "less", - "greater_or_equal", - "less_or _equal", - "like", - "not_like", - "in", - "not_in", - "empty", - "not_empty", - "all_in", - "not_all_in", - "exact_in", - "not_exact_in", - "exists" - ], + "enum": ["eq", "ne", "gt", "gte", "lt", "lte", "contains", "ncontains", "in", "nin", "all", "empty", "nempty"], "example": "empty", "type": "string", "x-enum-comments": { @@ -604,7 +586,7 @@ ] }, "FilterExpression": { - "description": "Expression filter with nested AND/OR conditions", + "description": "Expression filter with nested AND/OR conditions. Supports recursive nesting for complex queries. The 'filters' array can contain nested FilterExpression objects, creating a tree structure for complex logic. Example: (status=\"done\" AND priority=\"high\") OR (created_date > \"2024-01-01\") ``` { \"operator\": \"or\", \"filters\": [ { \"operator\": \"and\", \"conditions\": [ {\"property_key\": \"status\", \"condition\": \"eq\", \"select\": \"done_tag_id\"}, {\"property_key\": \"priority\", \"condition\": \"eq\", \"select\": \"high_tag_id\"} ] }, { \"operator\": \"and\", \"conditions\": [ {\"property_key\": \"created_date\", \"condition\": \"gt\", \"date\": \"2024-01-01\"} ] } ] } ```", "properties": { "conditions": { "description": "List of format-specific filter conditions", @@ -629,6 +611,7 @@ "type": "object" }, "FilterItem": { + "description": "A filter condition that matches a specific property format (text, number, select, date, etc.). Each filter item contains a property_key, condition, and a value field specific to the property format.", "oneOf": [ { "$ref": "#/components/schemas/TextFilterItem" @@ -2183,7 +2166,7 @@ "type": "string" }, "select": { - "description": "Tag Id - for eq/ne conditions (single selection)", + "description": "Tag Id - for eq/ne/in conditions (single selection)", "example": "tag_id", "type": "string" } @@ -2716,7 +2699,7 @@ }, "layout": { "description": "The layout of the view", - "enum": ["grid", "table"], + "enum": ["grid", "list", "gallery", "kanban", "calendar", "graph"], "example": "grid", "type": "string" }, @@ -4560,7 +4543,7 @@ "in": "query", "name": "format", "schema": { - "default": "\"md\"", + "default": "md", "enum": ["md"], "type": "string" }