Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ bin

.vscode-test

# VSCode local settings

.vscode

# yarn v2

.yarn/cache
Expand Down
27 changes: 27 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

</details>

## Example Interactions
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
29 changes: 6 additions & 23 deletions scripts/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand All @@ -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"
Expand Down Expand Up @@ -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"
}
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -4560,7 +4543,7 @@
"in": "query",
"name": "format",
"schema": {
"default": "\"md\"",
"default": "md",
"enum": ["md"],
"type": "string"
}
Expand Down