@dopost/mcp-server 1.0.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/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # @dopost/mcp-server
2
+
3
+ MCP (Model Context Protocol) server for **dopost**. Allows AI agents to schedule and manage social media posts through any MCP-compatible host.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ cd packages/mcp-server
9
+ npm install
10
+ npm run build
11
+ ```
12
+
13
+ ## Configuration
14
+
15
+ The server requires two environment variables:
16
+
17
+ | Variable | Required | Default | Description |
18
+ |----------|----------|---------|-------------|
19
+ | `DOPOST_API_KEY` | Yes | — | Your dopost API key |
20
+ | `DOPOST_API_URL` | No | `https://dopost.co` | API base URL |
21
+
22
+ ## Usage with MCP hosts
23
+
24
+ ### Claude Desktop
25
+
26
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "dopost": {
32
+ "command": "node",
33
+ "args": ["/absolute/path/to/packages/mcp-server/dist/index.js"],
34
+ "env": {
35
+ "DOPOST_API_KEY": "your-api-key"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ### VS Code (Copilot)
43
+
44
+ Add to `.vscode/mcp.json` in your project:
45
+
46
+ ```json
47
+ {
48
+ "servers": {
49
+ "dopost": {
50
+ "type": "stdio",
51
+ "command": "node",
52
+ "args": ["/absolute/path/to/packages/mcp-server/dist/index.js"],
53
+ "env": {
54
+ "DOPOST_API_KEY": "your-api-key"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ### Cursor
62
+
63
+ Add to Cursor settings under MCP servers:
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "dopost": {
69
+ "command": "node",
70
+ "args": ["/absolute/path/to/packages/mcp-server/dist/index.js"],
71
+ "env": {
72
+ "DOPOST_API_KEY": "your-api-key"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## Available tools
80
+
81
+ | Tool | Description |
82
+ |------|-------------|
83
+ | `publish_post` | Create and publish or schedule a social media post |
84
+ | `list_posts` | List posts with optional status filter and pagination |
85
+ | `get_post` | Get full details of a specific post |
86
+ | `get_post_status` | Check the publishing status of a post job |
87
+ | `reschedule_post` | Change the scheduled date of a pending post |
88
+ | `delete_post` | Delete a post (cancels schedule if pending) |
89
+ | `list_accounts` | List connected social media accounts |
90
+ | `get_platform_limits` | Get content limits for a platform |
91
+ | `upload_media` | Get a presigned URL to upload a media file |
92
+ | `list_media` | List uploaded media files |
93
+ | `delete_media` | Delete a media file |
94
+
95
+ ## How it works
96
+
97
+ ```
98
+ AI Agent (Claude, Copilot, Cursor...)
99
+ │
100
+ ▼
101
+ MCP Client (inside the host app)
102
+ │ stdio (JSON-RPC 2.0)
103
+ ▼
104
+ @dopost/mcp-server ← this package
105
+ │ HTTPS
106
+ ▼
107
+ dopost REST API (dopost.co/api/v1/*)
108
+ ```
109
+
110
+ The server uses **stdio transport** — the MCP host spawns it as a child process and communicates via stdin/stdout using JSON-RPC 2.0. Each tool maps 1:1 to a dopost REST API endpoint.
111
+
112
+ ## Development
113
+
114
+ ```bash
115
+ # Run directly with tsx (no build step)
116
+ DOPOST_API_KEY=your-key npm run dev
117
+
118
+ # Build and run compiled JS
119
+ npm run build
120
+ DOPOST_API_KEY=your-key npm start
121
+ ```
122
+
123
+ ## Based on
124
+
125
+ - [Model Context Protocol specification](https://modelcontextprotocol.io/docs/learn/architecture)
126
+ - [MCP TypeScript SDK v1.x](https://github.com/modelcontextprotocol/typescript-sdk/tree/v1.x)
127
+ - [Building MCP servers](https://modelcontextprotocol.io/quickstart/server)
package/dist/api.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ type ToolResult = {
2
+ content: Array<{
3
+ type: "text";
4
+ text: string;
5
+ }>;
6
+ isError?: boolean;
7
+ };
8
+ /**
9
+ * Sanitize a value before inserting it into a URL path.
10
+ * Prevents path traversal and injection.
11
+ */
12
+ export declare function safePath(value: string): string;
13
+ /**
14
+ * Make an authenticated request to the dopost REST API
15
+ * and return a result shaped for MCP tool responses.
16
+ */
17
+ export declare function api(method: string, path: string, body?: unknown): Promise<ToolResult>;
18
+ export {};
package/dist/api.js ADDED
@@ -0,0 +1,59 @@
1
+ const API_URL = process.env.DOPOST_API_URL || "https://dopost.co";
2
+ const API_KEY = process.env.DOPOST_API_KEY || "";
3
+ /**
4
+ * Sanitize a value before inserting it into a URL path.
5
+ * Prevents path traversal and injection.
6
+ */
7
+ export function safePath(value) {
8
+ if (!value ||
9
+ value.includes("/") ||
10
+ value.includes("\\") ||
11
+ value.includes("..")) {
12
+ throw new Error(`Invalid parameter: "${value}"`);
13
+ }
14
+ return encodeURIComponent(value);
15
+ }
16
+ /**
17
+ * Make an authenticated request to the dopost REST API
18
+ * and return a result shaped for MCP tool responses.
19
+ */
20
+ export async function api(method, path, body) {
21
+ if (!API_KEY) {
22
+ return {
23
+ content: [
24
+ {
25
+ type: "text",
26
+ text: "DOPOST_API_KEY is not set. Configure the environment variable and restart the server.",
27
+ },
28
+ ],
29
+ isError: true,
30
+ };
31
+ }
32
+ const headers = { "x-api-key": API_KEY };
33
+ if (body)
34
+ headers["Content-Type"] = "application/json";
35
+ try {
36
+ const res = await fetch(`${API_URL}${path}`, {
37
+ method,
38
+ headers,
39
+ body: body ? JSON.stringify(body) : undefined,
40
+ });
41
+ const data = await res.json().catch(() => ({ error: "Empty response" }));
42
+ const text = JSON.stringify(data, null, 2);
43
+ return res.ok
44
+ ? { content: [{ type: "text", text }] }
45
+ : { content: [{ type: "text", text }], isError: true };
46
+ }
47
+ catch (err) {
48
+ return {
49
+ content: [
50
+ {
51
+ type: "text",
52
+ text: `Request failed: ${err instanceof Error ? err.message : String(err)}`,
53
+ },
54
+ ],
55
+ isError: true,
56
+ };
57
+ }
58
+ }
59
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sour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,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;QACzE,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE3C,OAAO,GAAG,CAAC,EAAE;YACX,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE;YACvC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,mBAAmB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;iBAC5E;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { registerTools } from "./tools.js";
5
+ const server = new McpServer({
6
+ name: "dopost",
7
+ version: "1.0.0",
8
+ description: "Schedule and manage social media posts via AI agents",
9
+ });
10
+ registerTools(server);
11
+ const transport = new StdioServerTransport();
12
+ await server.connect(transport);
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,sDAAsD;CACpE,CAAC,CAAC;AAEH,aAAa,CAAC,MAAM,CAAC,CAAC;AAEtB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerTools(server: McpServer): void;
package/dist/tools.js ADDED
@@ -0,0 +1,210 @@
1
+ import { z } from "zod";
2
+ import { api, safePath } from "./api.js";
3
+ export function registerTools(server) {
4
+ // ── Post ──────────────────────────────────────────────────────────
5
+ server.registerTool("publish_post", {
6
+ title: "Publish Post",
7
+ description: "Create and publish or schedule a social media post. " +
8
+ "Provide at least text or media (or both). " +
9
+ "Set publishAt to an ISO 8601 date to schedule, or omit to publish immediately. " +
10
+ "Use platformOptions to pass platform-specific settings (see parameter description for details).",
11
+ inputSchema: {
12
+ accountId: z.string().describe("ID of the connected social account"),
13
+ text: z.string().optional().describe("Post text content"),
14
+ media: z
15
+ .array(z.string())
16
+ .optional()
17
+ .describe("Array of public media URLs"),
18
+ publishAt: z
19
+ .string()
20
+ .optional()
21
+ .describe("ISO 8601 date to schedule. Omit to publish now"),
22
+ platformOptions: z
23
+ .object({
24
+ postType: z
25
+ .string()
26
+ .optional()
27
+ .describe('Instagram: "feed" | "story" | "reel". Automatically "carousel" when multiple media items are provided.'),
28
+ videoType: z
29
+ .string()
30
+ .optional()
31
+ .describe('YouTube: "video" | "short"'),
32
+ title: z
33
+ .string()
34
+ .optional()
35
+ .describe("YouTube: Video title. Defaults to first 100 chars of text."),
36
+ privacyStatus: z
37
+ .string()
38
+ .optional()
39
+ .describe('YouTube: "public" | "private" | "unlisted"'),
40
+ privacyLevel: z
41
+ .string()
42
+ .optional()
43
+ .describe('TikTok: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"'),
44
+ disableDuet: z
45
+ .boolean()
46
+ .optional()
47
+ .describe("TikTok: Prevent others from creating duets"),
48
+ disableStitch: z
49
+ .boolean()
50
+ .optional()
51
+ .describe("TikTok: Prevent others from stitching your video"),
52
+ disableComment: z
53
+ .boolean()
54
+ .optional()
55
+ .describe("TikTok: Disable comments on the video"),
56
+ board: z
57
+ .string()
58
+ .optional()
59
+ .describe("Pinterest: Board ID to pin to (required for Pinterest)"),
60
+ })
61
+ .optional()
62
+ .describe("Platform-specific options. Only include keys relevant to the target platform. " +
63
+ "Instagram: postType. TikTok: privacyLevel, disableDuet, disableStitch, disableComment. " +
64
+ "YouTube: videoType, title, privacyStatus. Pinterest: board."),
65
+ },
66
+ }, async ({ accountId, text, media, publishAt, platformOptions }) => {
67
+ return api("POST", "/api/v1/post/publish", {
68
+ accountId,
69
+ text,
70
+ media,
71
+ publishAt,
72
+ ...(platformOptions &&
73
+ Object.keys(platformOptions).length > 0 && { platformOptions }),
74
+ });
75
+ });
76
+ server.registerTool("list_posts", {
77
+ title: "List Posts",
78
+ description: "List posts in the workspace. " +
79
+ "Supports filtering by status and cursor-based pagination.",
80
+ inputSchema: {
81
+ status: z
82
+ .enum(["DRAFT", "PENDING", "PUBLISHED", "FAILED"])
83
+ .optional()
84
+ .describe("Filter by post status"),
85
+ limit: z
86
+ .number()
87
+ .min(1)
88
+ .max(100)
89
+ .optional()
90
+ .describe("Results per page (1-100, default 20)"),
91
+ cursor: z
92
+ .string()
93
+ .optional()
94
+ .describe("Pagination cursor from a previous response"),
95
+ },
96
+ }, async ({ status, limit, cursor }) => {
97
+ const params = new URLSearchParams();
98
+ if (status)
99
+ params.set("status", status);
100
+ if (limit)
101
+ params.set("limit", String(limit));
102
+ if (cursor)
103
+ params.set("cursor", cursor);
104
+ const qs = params.toString();
105
+ return api("GET", `/api/v1/post${qs ? `?${qs}` : ""}`);
106
+ });
107
+ server.registerTool("get_post", {
108
+ title: "Get Post",
109
+ description: "Get full details of a specific post including content, status, schedule, and social account info.",
110
+ inputSchema: {
111
+ postId: z.string().describe("The post ID"),
112
+ },
113
+ }, async ({ postId }) => {
114
+ return api("GET", `/api/v1/post/${safePath(postId)}`);
115
+ });
116
+ server.registerTool("reschedule_post", {
117
+ title: "Reschedule Post",
118
+ description: "Change the scheduled date of a pending post. " +
119
+ "Only works on posts with status PENDING.",
120
+ inputSchema: {
121
+ postId: z.string().describe("The post ID to reschedule"),
122
+ publishAt: z
123
+ .string()
124
+ .describe("New ISO 8601 date (must be in the future)"),
125
+ },
126
+ }, async ({ postId, publishAt }) => {
127
+ return api("PATCH", `/api/v1/post/${safePath(postId)}`, { publishAt });
128
+ });
129
+ server.registerTool("delete_post", {
130
+ title: "Delete Post",
131
+ description: "Delete a post. If the post is scheduled (PENDING), its schedule is cancelled automatically.",
132
+ inputSchema: {
133
+ postId: z.string().describe("The post ID to delete"),
134
+ },
135
+ }, async ({ postId }) => {
136
+ return api("DELETE", `/api/v1/post/delete/${safePath(postId)}`);
137
+ });
138
+ // ── Social Accounts ───────────────────────────────────────────────
139
+ server.registerTool("list_accounts", {
140
+ title: "List Social Accounts",
141
+ description: "List all connected social media accounts in the workspace with their platform and status.",
142
+ inputSchema: {},
143
+ }, async () => {
144
+ return api("GET", "/api/v1/social/accounts");
145
+ });
146
+ server.registerTool("get_platform_limits", {
147
+ title: "Get Platform Limits",
148
+ description: "Get content limits for a platform: max text length, media count, supported formats, and file sizes.",
149
+ inputSchema: {
150
+ platform: z
151
+ .string()
152
+ .describe("Platform slug: instagram, tiktok, youtube, facebook, linkedin, x, threads, bluesky, mastodon, pinterest"),
153
+ },
154
+ }, async ({ platform }) => {
155
+ return api("GET", `/api/v1/social/limits/${safePath(platform)}`);
156
+ });
157
+ // ── Media ─────────────────────────────────────────────────────────
158
+ server.registerTool("upload_media", {
159
+ title: "Upload Media",
160
+ description: "Get a presigned URL to upload a media file. " +
161
+ "After calling this tool, upload the file with an HTTP PUT request to the returned uploadUrl.",
162
+ inputSchema: {
163
+ fileName: z.string().describe("File name (e.g. photo.jpg)"),
164
+ contentType: z
165
+ .string()
166
+ .describe("MIME type (e.g. image/jpeg, video/mp4)"),
167
+ sizeInBytes: z.number().describe("File size in bytes (max 1 GB)"),
168
+ },
169
+ }, async ({ fileName, contentType, sizeInBytes }) => {
170
+ return api("POST", "/api/v1/media", {
171
+ fileName,
172
+ contentType,
173
+ sizeInBytes,
174
+ });
175
+ });
176
+ server.registerTool("list_media", {
177
+ title: "List Media",
178
+ description: "List uploaded media files in the workspace with cursor-based pagination.",
179
+ inputSchema: {
180
+ limit: z
181
+ .number()
182
+ .min(1)
183
+ .max(100)
184
+ .optional()
185
+ .describe("Results per page (1-100, default 20)"),
186
+ cursor: z
187
+ .string()
188
+ .optional()
189
+ .describe("Pagination cursor from a previous response"),
190
+ },
191
+ }, async ({ limit, cursor }) => {
192
+ const params = new URLSearchParams();
193
+ if (limit)
194
+ params.set("limit", String(limit));
195
+ if (cursor)
196
+ params.set("cursor", cursor);
197
+ const qs = params.toString();
198
+ return api("GET", `/api/v1/media${qs ? `?${qs}` : ""}`);
199
+ });
200
+ server.registerTool("delete_media", {
201
+ title: "Delete Media",
202
+ description: "Delete a media file from storage by its ID.",
203
+ inputSchema: {
204
+ mediaId: z.string().describe("The media ID to delete"),
205
+ },
206
+ }, async ({ mediaId }) => {
207
+ return api("DELETE", `/api/v1/media/${safePath(mediaId)}`);
208
+ });
209
+ }
210
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC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C,CAAC;QACzC,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC7B,OAAO,GAAG,CAAC,KAAK,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1D,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,cAAc,EACd;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,6CAA6C;QAC1D,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;SACvD;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,OAAO,GAAG,CAAC,QAAQ,EAAE,iBAAiB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC,CACF,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@dopost/mcp-server",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for dopost — manage social media posts via AI agents",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "dopost-mcp": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/dopost-co/dopost-monorepo",
19
+ "directory": "packages/mcp-server"
20
+ },
21
+ "homepage": "https://dopost.co/docs/api/mcp-server",
22
+ "bugs": "https://github.com/dopost-co/dopost-monorepo/issues",
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "start": "node dist/index.js",
26
+ "dev": "tsx src/index.ts",
27
+ "prepublishOnly": "npm run build"
28
+ },
29
+ "keywords": ["mcp", "dopost", "social-media", "ai-agent", "model-context-protocol"],
30
+ "license": "MIT",
31
+ "dependencies": {
32
+ "@modelcontextprotocol/sdk": "^1.12.0",
33
+ "zod": "^3.25.0"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "^5.7.0",
37
+ "tsx": "^4.19.0"
38
+ },
39
+ "engines": {
40
+ "node": ">=18.0.0"
41
+ }
42
+ }