@anyproto/anytype-mcp 1.1.2 → 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/README.md +33 -0
- package/bin/cli.mjs +50 -50
- package/package.json +2 -2
- 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
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:
|