@anyproto/anytype-mcp 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +27 -0
- package/.github/workflows/ci.yml +8 -8
- package/README.md +33 -0
- package/bin/cli.mjs +68 -68
- package/package.json +13 -13
- package/scripts/start-server.ts +2 -1
- package/src/init-server.ts +2 -1
- package/src/mcp/__tests__/proxy.test.ts +96 -147
- package/src/mcp/proxy.ts +2 -1
- package/src/utils/__tests__/base-url.test.ts +136 -0
- package/src/utils/base-url.ts +67 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
open-pull-requests-limit: 1
|
|
8
|
+
groups:
|
|
9
|
+
github-actions:
|
|
10
|
+
patterns:
|
|
11
|
+
- "*"
|
|
12
|
+
ignore:
|
|
13
|
+
- dependency-name: "*"
|
|
14
|
+
update-types: ["version-update:semver-patch"]
|
|
15
|
+
|
|
16
|
+
- package-ecosystem: "npm"
|
|
17
|
+
directory: "/"
|
|
18
|
+
schedule:
|
|
19
|
+
interval: "weekly"
|
|
20
|
+
open-pull-requests-limit: 1
|
|
21
|
+
groups:
|
|
22
|
+
npm-dependencies:
|
|
23
|
+
patterns:
|
|
24
|
+
- "*"
|
|
25
|
+
ignore:
|
|
26
|
+
- dependency-name: "*"
|
|
27
|
+
update-types: ["version-update:semver-patch"]
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -17,10 +17,10 @@ jobs:
|
|
|
17
17
|
|
|
18
18
|
steps:
|
|
19
19
|
- name: Checkout code
|
|
20
|
-
uses: actions/checkout@
|
|
20
|
+
uses: actions/checkout@v6
|
|
21
21
|
|
|
22
22
|
- name: Set up Node.js
|
|
23
|
-
uses: actions/setup-node@
|
|
23
|
+
uses: actions/setup-node@v6
|
|
24
24
|
with:
|
|
25
25
|
node-version: "22"
|
|
26
26
|
|
|
@@ -35,10 +35,10 @@ jobs:
|
|
|
35
35
|
|
|
36
36
|
steps:
|
|
37
37
|
- name: Checkout code
|
|
38
|
-
uses: actions/checkout@
|
|
38
|
+
uses: actions/checkout@v6
|
|
39
39
|
|
|
40
40
|
- name: Set up Node.js
|
|
41
|
-
uses: actions/setup-node@
|
|
41
|
+
uses: actions/setup-node@v6
|
|
42
42
|
with:
|
|
43
43
|
node-version: "22"
|
|
44
44
|
|
|
@@ -53,10 +53,10 @@ jobs:
|
|
|
53
53
|
|
|
54
54
|
steps:
|
|
55
55
|
- name: Checkout code
|
|
56
|
-
uses: actions/checkout@
|
|
56
|
+
uses: actions/checkout@v6
|
|
57
57
|
|
|
58
58
|
- name: Set up Node.js
|
|
59
|
-
uses: actions/setup-node@
|
|
59
|
+
uses: actions/setup-node@v6
|
|
60
60
|
with:
|
|
61
61
|
node-version: "22"
|
|
62
62
|
|
|
@@ -71,10 +71,10 @@ jobs:
|
|
|
71
71
|
|
|
72
72
|
steps:
|
|
73
73
|
- name: Checkout code
|
|
74
|
-
uses: actions/checkout@
|
|
74
|
+
uses: actions/checkout@v6
|
|
75
75
|
|
|
76
76
|
- name: Set up Node.js
|
|
77
|
-
uses: actions/setup-node@
|
|
77
|
+
uses: actions/setup-node@v6
|
|
78
78
|
with:
|
|
79
79
|
node-version: "22"
|
|
80
80
|
|
package/README.md
CHANGED
|
@@ -94,6 +94,39 @@ npm install -g @anyproto/anytype-mcp
|
|
|
94
94
|
|
|
95
95
|
</details>
|
|
96
96
|
|
|
97
|
+
### Custom API Base URL
|
|
98
|
+
|
|
99
|
+
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`:
|
|
100
|
+
|
|
101
|
+
<details>
|
|
102
|
+
<summary>Example Configuration</summary>
|
|
103
|
+
|
|
104
|
+
**MCP Client (Claude Desktop, Cursor, etc.):**
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"mcpServers": {
|
|
108
|
+
"anytype": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["-y", "@anyproto/anytype-mcp"],
|
|
111
|
+
"env": {
|
|
112
|
+
"ANYTYPE_API_BASE_URL": "http://localhost:31012",
|
|
113
|
+
"OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer <YOUR_API_KEY>\", \"Anytype-Version\":\"2025-11-08\"}"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Claude Code (CLI):**
|
|
121
|
+
```bash
|
|
122
|
+
claude mcp add anytype \
|
|
123
|
+
-e ANYTYPE_API_BASE_URL='http://localhost:31012' \
|
|
124
|
+
-e OPENAPI_MCP_HEADERS='{"Authorization":"Bearer <YOUR_API_KEY>", "Anytype-Version":"2025-11-08"}' \
|
|
125
|
+
-s user -- npx -y @anyproto/anytype-mcp
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
97
130
|
## Example Interactions
|
|
98
131
|
|
|
99
132
|
Here are some examples of how you can interact with your Anytype:
|