@jclvsh/xmark 0.6.2 → 0.7.1
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 +15 -0
- package/dist/commands/usage.js +12 -0
- package/dist/tool-policy.js +8 -0
- package/dist/tools/usage.js +9 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -32,6 +32,19 @@ Optionally override the API host (default is `https://api.xmark.dev`):
|
|
|
32
32
|
export XMARK_API_URL=https://api.xmark.dev
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
## Hosted endpoint
|
|
36
|
+
|
|
37
|
+
Clients that connect to a remote MCP server can use the hosted endpoint instead of this package:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
https://api.xmark.dev/mcp
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- Transport: MCP streamable HTTP, `POST` only.
|
|
44
|
+
- Registry: listed in the [official MCP registry](https://registry.modelcontextprotocol.io) as `io.github.JCLVSH/xmark`.
|
|
45
|
+
- Auth: `Authorization: Bearer nt_live_...` (the same API key; its scopes apply). `initialize` and `tools/list` answer without a key, so a client can read the tool list before signing up; calling a tool needs the key.
|
|
46
|
+
- Tools: the class of each hosted tool is listed at https://www.xmark.dev/docs#mcp-hosted.
|
|
47
|
+
|
|
35
48
|
## Tools exposed via MCP
|
|
36
49
|
|
|
37
50
|
| Tool | What it does |
|
|
@@ -46,6 +59,7 @@ export XMARK_API_URL=https://api.xmark.dev
|
|
|
46
59
|
| `get_conversation_messages` | A conversation's message history. |
|
|
47
60
|
| `delete_conversation` | Permanently delete a conversation. |
|
|
48
61
|
| `get_usage` | Plan + quota usage (chat this month, syncs today, bookmark count). |
|
|
62
|
+
| `get_affiliate` | Affiliate status, link, sign-ups, and commission totals (stdio only). |
|
|
49
63
|
|
|
50
64
|
## CLI commands
|
|
51
65
|
|
|
@@ -60,6 +74,7 @@ xmark conversations
|
|
|
60
74
|
xmark messages <conversation-id>
|
|
61
75
|
xmark delete-conversation <conversation-id>
|
|
62
76
|
xmark usage
|
|
77
|
+
xmark affiliate
|
|
63
78
|
```
|
|
64
79
|
|
|
65
80
|
Global flags: `--format table` renders paginated lists as a table (default is `json`).
|
package/dist/commands/usage.js
CHANGED
|
@@ -12,4 +12,16 @@ export function registerUsageCommands(program, client) {
|
|
|
12
12
|
handleError(error);
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
+
program
|
|
16
|
+
.command("affiliate")
|
|
17
|
+
.description("Your affiliate status, link, sign-ups, and commission totals")
|
|
18
|
+
.action(async () => {
|
|
19
|
+
try {
|
|
20
|
+
const result = await client.get("/affiliate");
|
|
21
|
+
formatOutput(result, getFormat(program.opts()));
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
handleError(error);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
15
27
|
}
|
package/dist/tool-policy.js
CHANGED
|
@@ -5,6 +5,11 @@ const hosted = (category, toolClass) => ({
|
|
|
5
5
|
hosted: true,
|
|
6
6
|
category,
|
|
7
7
|
});
|
|
8
|
+
const localOnly = (category, toolClass) => ({
|
|
9
|
+
class: toolClass,
|
|
10
|
+
hosted: false,
|
|
11
|
+
category,
|
|
12
|
+
});
|
|
8
13
|
export const TOOL_POLICY = {
|
|
9
14
|
// bookmarks
|
|
10
15
|
list_bookmarks: hosted("bookmarks", "read"),
|
|
@@ -22,6 +27,9 @@ export const TOOL_POLICY = {
|
|
|
22
27
|
// usage
|
|
23
28
|
get_usage: hosted("usage", "read"),
|
|
24
29
|
get_changelog: hosted("usage", "read"),
|
|
30
|
+
// stdio only for now: the hosted tool set is pinned to what is under review at Meta
|
|
31
|
+
// (__tests__/server.test.ts). Read-only; applying and payouts stay in the app and with the admin.
|
|
32
|
+
get_affiliate: localOnly("usage", "read"),
|
|
25
33
|
};
|
|
26
34
|
export const toolPolicy = (name) => toolPolicyFor(TOOL_POLICY, name);
|
|
27
35
|
export const isToolEnabled = (name, profile) => isToolEnabledIn(TOOL_POLICY, name, profile);
|
package/dist/tools/usage.js
CHANGED
|
@@ -20,4 +20,13 @@ export function registerUsageTools(server, client) {
|
|
|
20
20
|
return formatMcpError(error);
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
+
server.tool("get_affiliate", 'the user\'s affiliate status ("none" if they have not applied), code and link, sign-up count, commission totals in US cents (in the hold, payable, paid out), and the program terms. read-only; applying is done in the app at /settings/affiliate.', {}, async () => {
|
|
24
|
+
try {
|
|
25
|
+
const result = await client.get("/affiliate");
|
|
26
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return formatMcpError(error);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
23
32
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jclvsh/xmark",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"mcpName": "io.github.JCLVSH/xmark",
|
|
5
|
-
"description": "MCP server and CLI for the xmark API — chat with your X bookmarks from inside Claude Code, Cursor, or any MCP client.",
|
|
5
|
+
"description": "MCP server and CLI for the xmark API — chat with your X bookmarks from inside Claude Code, Cursor, or any MCP client. mcprush.com-96d886039c6c0d0a2ae90602",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|