@aisocialautomate/mcp 0.2.0 → 0.2.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 +1 -1
- package/dist/server.js +23 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Ask things like:
|
|
|
11
11
|
|
|
12
12
|
You need an AI Social Automate account with an active plan ([aisocialautomate.com](https://aisocialautomate.com)).
|
|
13
13
|
|
|
14
|
-
**Easiest: sign in, no key to paste (Claude, ChatGPT, Claude Code).** Add the hosted URL as a connector, sign in and click Allow. It offers
|
|
14
|
+
**Easiest: sign in, no key to paste (Claude, ChatGPT, Claude Code).** Add the hosted URL as a connector, sign in and click Allow. It offers all tools: research and lead gathering, plus drafts, scheduling, publishing, media, accounts and analytics.
|
|
15
15
|
- Claude / ChatGPT: Settings → Connectors → add a custom connector with `https://mcp.aisocialautomate.com/mcp`.
|
|
16
16
|
- Claude Code: `claude mcp add --transport http aisocialautomate https://mcp.aisocialautomate.com/mcp`, then `/mcp` to sign in.
|
|
17
17
|
|
package/dist/server.js
CHANGED
|
@@ -6,7 +6,9 @@ import { slim, summarize } from './slim.js';
|
|
|
6
6
|
import { registerPublishing } from './publishing.js';
|
|
7
7
|
import { PARAM_DOCS, TOOL_TOOLSET } from './toolsets.js';
|
|
8
8
|
import { balanceOf, estimateBulk, estimateLeadJob, estimateScrape, parseRateCard } from './usage.js';
|
|
9
|
-
|
|
9
|
+
// Read from package.json so the version the server reports always matches the release.
|
|
10
|
+
import { createRequire } from 'node:module';
|
|
11
|
+
export const SERVER_VERSION = createRequire(import.meta.url)('../package.json').version;
|
|
10
12
|
const READ = { readOnlyHint: true, openWorldHint: true };
|
|
11
13
|
const SPEND = { readOnlyHint: false, destructiveHint: false, openWorldHint: true };
|
|
12
14
|
const WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
|
|
@@ -30,6 +32,25 @@ function hintFor(e) {
|
|
|
30
32
|
return 'Check the parameters with describe_endpoint.';
|
|
31
33
|
return undefined;
|
|
32
34
|
}
|
|
35
|
+
/** The instructions must only describe tools this server actually offers, or the assistant goes looking for tools that are not there. */
|
|
36
|
+
function instructionsFor(toolsets) {
|
|
37
|
+
const has = (t) => toolsets.includes(t);
|
|
38
|
+
const lines = [];
|
|
39
|
+
const research = has('research') || has('leads');
|
|
40
|
+
lines.push(research
|
|
41
|
+
? 'AI Social Automate: find leads and research content on Instagram, Facebook, LinkedIn, TikTok and X, and publish to connected accounts.'
|
|
42
|
+
: 'AI Social Automate: draft, schedule and publish posts to the user\'s connected Instagram, Facebook, LinkedIn, TikTok, X and YouTube accounts.');
|
|
43
|
+
if (has('research'))
|
|
44
|
+
lines.push('Start with search_endpoints (find the right endpoint) and describe_endpoint (exact parameters), then scrape for one call, start_bulk_scrape for many items' + (has('leads') ? ', or start_lead_job to gather a lead list in the background.' : '.'));
|
|
45
|
+
if (!research)
|
|
46
|
+
lines.push('This connection is for publishing only. It cannot read other people\'s posts, profiles or followers (no scraping or lead search). If asked for that, say so and point to the dashboard (https://aisocialautomate.com) or the local npm server (@aisocialautomate/mcp) with a research key; do not look for such tools here.');
|
|
47
|
+
if (research)
|
|
48
|
+
lines.push('Everything that costs credits supports dry_run to show the estimate first. Large or risky actions come back as NEEDS_CONFIRMATION: tell the user the estimate and warnings, and only repeat the call with confirm: true after they say yes. Never set confirm on your own.');
|
|
49
|
+
if (has('publishing'))
|
|
50
|
+
lines.push('Publishing: create_draft saves drafts freely, but schedule_post and publish_now always return a preview that the user must approve (confirm: true). It never messages anyone or follows accounts. Upload media first with upload_media. If an account is not connected, use connect_account and show the link.');
|
|
51
|
+
lines.push(UNTRUSTED);
|
|
52
|
+
return lines.join('\n');
|
|
53
|
+
}
|
|
33
54
|
export function createServer(svc) {
|
|
34
55
|
const { cfg, api, usage } = svc;
|
|
35
56
|
let rateCard = null;
|
|
@@ -70,13 +91,7 @@ export function createServer(svc) {
|
|
|
70
91
|
return { warnings: g.warnings };
|
|
71
92
|
};
|
|
72
93
|
const server = new McpServer({ name: 'aisocialautomate', version: SERVER_VERSION }, {
|
|
73
|
-
instructions:
|
|
74
|
-
'AI Social Automate: find leads and research content on Instagram, Facebook, LinkedIn, TikTok and X.',
|
|
75
|
-
'Start with search_endpoints (find the right endpoint) and describe_endpoint (exact parameters), then scrape for one call, start_bulk_scrape for many items, or start_lead_job to gather a lead list in the background.',
|
|
76
|
-
'Everything that costs credits supports dry_run to show the estimate first. Large or risky actions come back as NEEDS_CONFIRMATION: tell the user the estimate and warnings, and only repeat the call with confirm: true after they say yes. Never set confirm on your own.',
|
|
77
|
-
'Publishing: create_draft saves drafts freely, but schedule_post and publish_now always returns a preview that the user must approve (confirm: true). It never messages anyone or follows accounts. Upload media first with upload_media.',
|
|
78
|
-
UNTRUSTED,
|
|
79
|
-
].join('\n'),
|
|
94
|
+
instructions: instructionsFor(cfg.toolsets),
|
|
80
95
|
});
|
|
81
96
|
// Switch off the tool groups the user did not ask for (SOCIAL_AUTOMATE_TOOLSETS); the assistant then never sees them.
|
|
82
97
|
const originalRegister = server.registerTool.bind(server);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aisocialautomate/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "MCP server for AI Social Automate: draft, schedule and publish posts to Instagram, Facebook, LinkedIn, TikTok and YouTube, and find leads and research content, from Claude, ChatGPT, Codex or any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|