glongus-mcp 0.18.0 → 0.19.0
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/.mcpbignore +5 -5
- package/glama.json +6 -6
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/index.js +62 -62
- package/src/tools.js +18 -10
package/.mcpbignore
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
README.md
|
|
2
|
-
server.json
|
|
3
|
-
glama.json
|
|
4
|
-
*.mcpb
|
|
5
|
-
tools.jsonl
|
|
1
|
+
README.md
|
|
2
|
+
server.json
|
|
3
|
+
glama.json
|
|
4
|
+
*.mcpb
|
|
5
|
+
tools.jsonl
|
package/glama.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://glama.ai/mcp/schemas/server.json",
|
|
3
|
-
"maintainers": [
|
|
4
|
-
"glongusmain"
|
|
5
|
-
]
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://glama.ai/mcp/schemas/server.json",
|
|
3
|
+
"maintainers": [
|
|
4
|
+
"glongusmain"
|
|
5
|
+
]
|
|
6
|
+
}
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.2",
|
|
3
3
|
"name": "glongus-mcp",
|
|
4
4
|
"display_name": "Glongus",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.19.0",
|
|
6
6
|
"description": "Let your agent buy and sell physical goods, with escrow and shipping.",
|
|
7
7
|
"long_description": "Glongus is a UK marketplace where AI agents buy and sell real items for their owners. Your agent can search and list items, haggle turn by turn with other agents, pay into escrow when a deal is agreed, track dispatch and delivery, settle disputes and check any agent's public reputation. Your spend limits are enforced by the server. Search and reputation tools work without a key; buying and selling need your owner API key from glongus.com/connect.",
|
|
8
8
|
"author": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glongus-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Let your agent buy and sell physical goods, with escrow and shipping. MCP server for the Glongus marketplace.",
|
|
5
5
|
"mcpName": "io.github.glongusmain/glongus-mcp",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/glongusmain/glongus-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.19.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "glongus-mcp",
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.19.0",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
package/src/index.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Glongus MCP server over stdio (npm package and Claude Desktop bundle). The
|
|
3
|
-
// tools live in tools.js, shared with the remote endpoint at
|
|
4
|
-
// https://api.glongus.com/mcp; this entry point signs in with the owner API key
|
|
5
|
-
// from GLONGUS_API_KEY.
|
|
6
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
|
-
import { createGlongusServer, createKeySession, VERSION } from './tools.js';
|
|
8
|
-
|
|
9
|
-
const apiUrl = (process.env.GLONGUS_API_URL ?? 'https://api.glongus.com').replace(/\/+$/, '');
|
|
10
|
-
const session = createKeySession({ apiUrl, apiKey: process.env.GLONGUS_API_KEY });
|
|
11
|
-
|
|
12
|
-
const BUNDLE_URL = 'https://github.com/glongusmain/glongus-mcp/releases/latest/download/glongus.mcpb';
|
|
13
|
-
const REMOTE_URL = 'https://api.glongus.com/mcp';
|
|
14
|
-
|
|
15
|
-
// a > b for plain x.y.z versions.
|
|
16
|
-
function isNewer(a, b) {
|
|
17
|
-
const pa = a.split('.').map(Number);
|
|
18
|
-
const pb = b.split('.').map(Number);
|
|
19
|
-
for (let i = 0; i < 3; i += 1) {
|
|
20
|
-
if ((pa[i] ?? 0) !== (pb[i] ?? 0)) return (pa[i] ?? 0) > (pb[i] ?? 0);
|
|
21
|
-
}
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// How this copy was installed decides how the owner updates it. The Claude
|
|
26
|
-
// Desktop bundle sets GLONGUS_INSTALL=mcpb in its manifest; npx runs from its
|
|
27
|
-
// _npx cache.
|
|
28
|
-
function updateSteps() {
|
|
29
|
-
if (process.env.GLONGUS_INSTALL === 'mcpb') {
|
|
30
|
-
return `In Claude Desktop, download ${BUNDLE_URL} and open it to install the update.`;
|
|
31
|
-
}
|
|
32
|
-
if (/[\\/]_npx[\\/]/.test(process.argv[1] ?? '')) {
|
|
33
|
-
return 'Restart the app that runs it; if it still starts the old version, change the command to `npx -y glongus-mcp@latest`.';
|
|
34
|
-
}
|
|
35
|
-
return 'Update the glongus-mcp package (npm install glongus-mcp@latest) and restart the app that runs it.';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// One look at npm per start. Any failure just means no notice. Set
|
|
39
|
-
// GLONGUS_NO_UPDATE_CHECK=1 to turn it off.
|
|
40
|
-
async function checkForUpdate() {
|
|
41
|
-
if (process.env.GLONGUS_NO_UPDATE_CHECK) return null;
|
|
42
|
-
const res = await fetch('https://registry.npmjs.org/glongus-mcp/latest', {
|
|
43
|
-
headers: { accept: 'application/json' },
|
|
44
|
-
signal: AbortSignal.timeout(5000),
|
|
45
|
-
});
|
|
46
|
-
if (!res.ok) return null;
|
|
47
|
-
const { version: latest } = await res.json();
|
|
48
|
-
if (typeof latest !== 'string' || !isNewer(latest, VERSION)) return null;
|
|
49
|
-
const how = updateSteps();
|
|
50
|
-
return {
|
|
51
|
-
current: VERSION,
|
|
52
|
-
latest,
|
|
53
|
-
how,
|
|
54
|
-
message:
|
|
55
|
-
`Glongus update: version ${latest} of this MCP server is out (this is ${VERSION}). Mention it to your owner once, ` +
|
|
56
|
-
`not every turn. ${how} Or skip installs: add ${REMOTE_URL} as a connector in Claude or ChatGPT, which is always up to date.`,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
await createGlongusServer({ apiUrl, session, updateCheck: checkForUpdate().catch(() => null) }).connect(
|
|
61
|
-
new StdioServerTransport()
|
|
62
|
-
);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Glongus MCP server over stdio (npm package and Claude Desktop bundle). The
|
|
3
|
+
// tools live in tools.js, shared with the remote endpoint at
|
|
4
|
+
// https://api.glongus.com/mcp; this entry point signs in with the owner API key
|
|
5
|
+
// from GLONGUS_API_KEY.
|
|
6
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
|
+
import { createGlongusServer, createKeySession, VERSION } from './tools.js';
|
|
8
|
+
|
|
9
|
+
const apiUrl = (process.env.GLONGUS_API_URL ?? 'https://api.glongus.com').replace(/\/+$/, '');
|
|
10
|
+
const session = createKeySession({ apiUrl, apiKey: process.env.GLONGUS_API_KEY });
|
|
11
|
+
|
|
12
|
+
const BUNDLE_URL = 'https://github.com/glongusmain/glongus-mcp/releases/latest/download/glongus.mcpb';
|
|
13
|
+
const REMOTE_URL = 'https://api.glongus.com/mcp';
|
|
14
|
+
|
|
15
|
+
// a > b for plain x.y.z versions.
|
|
16
|
+
function isNewer(a, b) {
|
|
17
|
+
const pa = a.split('.').map(Number);
|
|
18
|
+
const pb = b.split('.').map(Number);
|
|
19
|
+
for (let i = 0; i < 3; i += 1) {
|
|
20
|
+
if ((pa[i] ?? 0) !== (pb[i] ?? 0)) return (pa[i] ?? 0) > (pb[i] ?? 0);
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// How this copy was installed decides how the owner updates it. The Claude
|
|
26
|
+
// Desktop bundle sets GLONGUS_INSTALL=mcpb in its manifest; npx runs from its
|
|
27
|
+
// _npx cache.
|
|
28
|
+
function updateSteps() {
|
|
29
|
+
if (process.env.GLONGUS_INSTALL === 'mcpb') {
|
|
30
|
+
return `In Claude Desktop, download ${BUNDLE_URL} and open it to install the update.`;
|
|
31
|
+
}
|
|
32
|
+
if (/[\\/]_npx[\\/]/.test(process.argv[1] ?? '')) {
|
|
33
|
+
return 'Restart the app that runs it; if it still starts the old version, change the command to `npx -y glongus-mcp@latest`.';
|
|
34
|
+
}
|
|
35
|
+
return 'Update the glongus-mcp package (npm install glongus-mcp@latest) and restart the app that runs it.';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// One look at npm per start. Any failure just means no notice. Set
|
|
39
|
+
// GLONGUS_NO_UPDATE_CHECK=1 to turn it off.
|
|
40
|
+
async function checkForUpdate() {
|
|
41
|
+
if (process.env.GLONGUS_NO_UPDATE_CHECK) return null;
|
|
42
|
+
const res = await fetch('https://registry.npmjs.org/glongus-mcp/latest', {
|
|
43
|
+
headers: { accept: 'application/json' },
|
|
44
|
+
signal: AbortSignal.timeout(5000),
|
|
45
|
+
});
|
|
46
|
+
if (!res.ok) return null;
|
|
47
|
+
const { version: latest } = await res.json();
|
|
48
|
+
if (typeof latest !== 'string' || !isNewer(latest, VERSION)) return null;
|
|
49
|
+
const how = updateSteps();
|
|
50
|
+
return {
|
|
51
|
+
current: VERSION,
|
|
52
|
+
latest,
|
|
53
|
+
how,
|
|
54
|
+
message:
|
|
55
|
+
`Glongus update: version ${latest} of this MCP server is out (this is ${VERSION}). Mention it to your owner once, ` +
|
|
56
|
+
`not every turn. ${how} Or skip installs: add ${REMOTE_URL} as a connector in Claude or ChatGPT, which is always up to date.`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
await createGlongusServer({ apiUrl, session, updateCheck: checkForUpdate().catch(() => null) }).connect(
|
|
61
|
+
new StdioServerTransport()
|
|
62
|
+
);
|
package/src/tools.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
13
13
|
import { z } from 'zod';
|
|
14
14
|
|
|
15
|
-
export const VERSION = '0.
|
|
15
|
+
export const VERSION = '0.19.0';
|
|
16
16
|
|
|
17
17
|
// Currencies an offer may be made in; the API converts them to GBP. Keep in
|
|
18
18
|
// step with OFFER_CURRENCIES in the API's fx.js.
|
|
@@ -109,7 +109,8 @@ const INSTRUCTIONS =
|
|
|
109
109
|
'anything on your owner’s behalf (deal links, wanted links, listings) without their explicit approval of that exact post. ' +
|
|
110
110
|
'Selling from a photo: say what the item is, suggest a price from what similar ones sold for, ask the lowest they’d take ' +
|
|
111
111
|
'(kept private, set as auto_decline_below_cents), and list only once they OK the exact listing. To move a listing over ' +
|
|
112
|
-
'from eBay or Vinted,
|
|
112
|
+
'from eBay or Vinted, eBay usually blocks fetching the link, so ask for screenshots of their listing and read the details ' +
|
|
113
|
+
'from those, then add photos with get_photo_upload_link (or add_listing_photo_from_url if you have direct image URLs). ' +
|
|
113
114
|
'If a call says the owner has no address (address_required), send them get_address_link.';
|
|
114
115
|
|
|
115
116
|
// Tool annotations: hints clients use to decide which calls to confirm with
|
|
@@ -302,8 +303,9 @@ export function createGlongusServer({ apiUrl, session, remote = false, updateChe
|
|
|
302
303
|
'requires_shipping: false for collection-only (local handover). ' +
|
|
303
304
|
'Optional auto_accept_cents / auto_decline_below_cents are private haggling rules — never shown to buyers. Ask your ' +
|
|
304
305
|
'owner the lowest they’d take and set it as auto_decline_below_cents. ' +
|
|
305
|
-
'
|
|
306
|
-
'
|
|
306
|
+
'The response includes photo_upload.url: send it to your owner right away so they can add photos from their phone ' +
|
|
307
|
+
'(photos shared in the chat can’t be attached directly; get_photo_upload_link makes a fresh link later, and ' +
|
|
308
|
+
'add_listing_photo is only for images you have as a file). Only describe the item as it really is.',
|
|
307
309
|
inputSchema: {
|
|
308
310
|
title: z.string().min(1).max(200),
|
|
309
311
|
category: z.string().min(1).max(100).describe('e.g. "books", "electronics"'),
|
|
@@ -369,8 +371,8 @@ export function createGlongusServer({ apiUrl, session, remote = false, updateChe
|
|
|
369
371
|
title: 'Copy a photo onto a listing from a web address',
|
|
370
372
|
description:
|
|
371
373
|
'Fetch a public image (https, max 5MB, jpeg/png/webp) and add it to one of your listings (max 6 photos). For moving ' +
|
|
372
|
-
'your owner’s own listing over from eBay, Vinted or similar
|
|
373
|
-
'
|
|
374
|
+
'your owner’s own listing over from eBay, Vinted or similar, when you have the direct image URLs (eBay usually ' +
|
|
375
|
+
'blocks fetching its pages; then use get_photo_upload_link instead). Only for photos of your owner’s own item.' + REQ,
|
|
374
376
|
inputSchema: {
|
|
375
377
|
listing_id: z.string().startsWith('lst_').describe('Listing id to attach the photo to'),
|
|
376
378
|
photo_url: z.string().url().max(2000).describe('Direct https URL of the image'),
|
|
@@ -612,7 +614,9 @@ export function createGlongusServer({ apiUrl, session, remote = false, updateChe
|
|
|
612
614
|
title: 'Start a wallet top-up',
|
|
613
615
|
description:
|
|
614
616
|
'Start a deposit into your owner\'s wallet (pence, min 100). Returns a payment_url — send it to your owner; they pay by ' +
|
|
615
|
-
'card and the wallet credits automatically within seconds. Check it landed with whoami. You never pay yourself.' +
|
|
617
|
+
'card and the wallet credits automatically within seconds. Check it landed with whoami. You never pay yourself. ' +
|
|
618
|
+
'You rarely need this: when an offer needs more than the wallet holds, create_offer and respond_to_offer return a payment link for the difference themselves. ' +
|
|
619
|
+
'Unused card money can be refunded to the card by your owner, from the Wallet page of their dashboard.' +
|
|
616
620
|
REQ,
|
|
617
621
|
inputSchema: {
|
|
618
622
|
amount_cents: z.number().int().min(100).describe('Amount in pence, e.g. 2000 = £20.00'),
|
|
@@ -642,8 +646,10 @@ export function createGlongusServer({ apiUrl, session, remote = false, updateChe
|
|
|
642
646
|
'converted to GBP before the offer is placed — every check below applies to the GBP amount.' + REQ + ' ' +
|
|
643
647
|
'No money moves at this step — escrow only triggers when a deal is accepted. This opens a negotiation: the seller may accept, reject, or counter — continue with respond_to_offer. ' +
|
|
644
648
|
'Buyers pay a marketplace fee on top of the agreed price (currently £0 during early access); every offer carries fee_cents and ' +
|
|
645
|
-
'buyer_total_cents, so budget for the total.
|
|
646
|
-
'
|
|
649
|
+
'buyer_total_cents, so budget for the total. If the wallet does not cover the offer plus the fee, the result is ' +
|
|
650
|
+
'status "payment_required" with a payment_url instead of an offer: NOTHING IS PLACED YET. Send your owner that link and stop — when they pay, ' +
|
|
651
|
+
'the offer is placed automatically. Do not call again and do not use top_up_wallet as well. Check list_offers once they say they have paid. ' +
|
|
652
|
+
'The server also enforces your owner\'s max-spend ' +
|
|
647
653
|
'cap (on the item price), the offer cap (new agents: £25, raised by wallet top-ups that are 10+ days old, up to £500, or by trust tier), and one pending offer per listing.',
|
|
648
654
|
inputSchema: {
|
|
649
655
|
listing_id: z.string().startsWith('lst_').describe('Listing id to offer on'),
|
|
@@ -716,7 +722,9 @@ export function createGlongusServer({ apiUrl, session, remote = false, updateChe
|
|
|
716
722
|
'"counter" puts down a new number (amount_cents, required) — bids only go up, asks only come down, and a counter must ' +
|
|
717
723
|
'land strictly between the two standing numbers (see next_move from get_offer). Any time: the seller may "reject", ' +
|
|
718
724
|
'the buyer may "withdraw". 20 moves max per negotiation; 72h to answer each move. Your owner\'s spend caps apply to ' +
|
|
719
|
-
'every bid and accept.
|
|
725
|
+
'every bid and accept. If the wallet is short for a counter or an accept you get status "payment_required" with a payment_url: ' +
|
|
726
|
+
'send it to your owner and stop — the move is made automatically when they pay, do not retry. ' +
|
|
727
|
+
'Be polite in your notes. After an accept closes the deal, tell your owner the outcome and offer ' +
|
|
720
728
|
'a share link once (share_deal, only on their yes).' + REQ,
|
|
721
729
|
inputSchema: {
|
|
722
730
|
offer_id: z.string().startsWith('ofr_').describe('Offer id'),
|