@rolino/mcp 0.1.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/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +111 -0
- package/dist/bin.cjs +643 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +22 -0
- package/dist/bin.js.map +1 -0
- package/dist/chunk-RSNR7K6Z.js +631 -0
- package/dist/chunk-RSNR7K6Z.js.map +1 -0
- package/dist/index.cjs +646 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +91 -0
- package/dist/index.d.ts +91 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../package.json","../src/configuration.ts"],"sourcesContent":["import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\r\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport { basename, extname, resolve } from \"node:path\";\nimport {\r\n ActorSchema,\r\n CalendarListDataSchema,\r\n DraftPostInputSchema,\r\n IntegrationHealthListDataSchema,\n MediaAssetListDataSchema,\n MediaAssetSchema,\n PostListDataSchema,\r\n PostPublishInputSchema,\r\n PostPublishPreviewSchema,\r\n PostReadinessSchema,\r\n PostScheduleInputSchema,\r\n PostSchedulePendingSchema,\r\n PostSchedulePreviewSchema,\r\n PostSchema,\r\n ProjectCreateInputSchema,\r\n ProjectListDataSchema,\r\n ProjectSchema,\r\n type Actor,\r\n type CalendarListData,\r\n type DraftPostInput,\r\n type IntegrationHealthListData,\n type MediaAsset,\n type MediaAssetListData,\n type Post,\r\n type PostListData,\r\n type PostPublishExecuteInput,\r\n type PostPublishInput,\r\n type PostPublishPreview,\r\n type PostReadiness,\r\n type PostScheduleExecuteInput,\r\n type PostScheduleExecuteResult,\r\n type PostScheduleInput,\r\n type PostSchedulePreview,\r\n type PostStatus,\r\n type Project,\r\n type ProjectCreateInput,\r\n type ProjectListData,\r\n} from \"@rolino/contracts\";\r\nimport {\r\n RolinoApiError,\r\n RolinoClient,\r\n RolinoNetworkError,\r\n} from \"@rolino/sdk\";\r\nimport * as z from \"zod/v4\";\r\nimport packageManifest from \"../package.json\" with { type: \"json\" };\r\n\r\nexport {\r\n resolveMcpConfiguration,\r\n type RolinoMcpEnvironment,\r\n} from \"./configuration.js\";\r\n\r\nexport const ROLINO_MCP_VERSION = packageManifest.version;\r\n\r\nconst mcpDraftInputShape = {\r\n ...DraftPostInputSchema.shape,\r\n platforms: DraftPostInputSchema.shape.platforms,\r\n mediaAssetIds: DraftPostInputSchema.shape.mediaAssetIds.describe(\n \"Existing project media asset IDs. YouTube requires exactly one stored video; Bluesky accepts up to four stored JPEG, PNG, or WebP images.\",\n ),\n captionOverrides: DraftPostInputSchema.shape.captionOverrides.describe(\r\n \"Optional destination text. YOUTUBE is the video description and BLUESKY is limited to 300 graphemes; when omitted, Rolino uses the shared caption.\",\n ),\r\n youtubeSettings: DraftPostInputSchema.shape.youtubeSettings.describe(\r\n \"Required with YOUTUBE: explicit title, numeric categoryId, privacyStatus, madeForKids declaration, synthetic-media disclosure, subscriber-notification choice, and tags. Unaudited Google API projects may be restricted to Private uploads.\",\r\n ),\r\n};\r\n\r\nconst mcpScheduleExecuteOutputSchema = z.object({\r\n status: z.union([PostSchema.shape.status, z.literal(\"PENDING\")]),\r\n id: PostSchema.shape.id.optional(),\r\n postId: PostSchedulePendingSchema.shape.postId.optional(),\r\n provider: PostSchedulePendingSchema.shape.provider.optional(),\r\n mutationId: PostSchedulePendingSchema.shape.mutationId.optional(),\r\n operation: PostSchedulePendingSchema.shape.operation.optional(),\r\n message: PostSchedulePendingSchema.shape.message.optional(),\r\n}).passthrough();\r\n\r\nexport type RolinoMcpApi = {\r\n whoami(): Promise<Actor>;\r\n projects: {\r\n create(\r\n input: ProjectCreateInput,\r\n request: { idempotencyKey: string },\r\n ): Promise<Project>;\r\n list(options?: { limit?: number; cursor?: string }): Promise<ProjectListData>;\r\n get(projectId: string): Promise<Project>;\r\n };\r\n posts: {\n create(\r\n projectId: string,\r\n input: DraftPostInput,\r\n request: { idempotencyKey: string },\r\n ): Promise<Post>;\r\n update(\r\n projectId: string,\r\n postId: string,\r\n input: DraftPostInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<Post>;\r\n list(\r\n projectId: string,\r\n options?: { limit?: number; cursor?: string; status?: PostStatus },\r\n ): Promise<PostListData>;\r\n get(projectId: string, postId: string): Promise<Post>;\r\n readiness(projectId: string, postId: string): Promise<PostReadiness>;\r\n previewSchedule(\r\n projectId: string,\r\n postId: string,\r\n input: PostScheduleInput,\r\n request: { expectedVersion: number },\r\n ): Promise<PostSchedulePreview>;\r\n executeSchedule(\r\n projectId: string,\r\n postId: string,\r\n input: PostScheduleExecuteInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<PostScheduleExecuteResult>;\r\n previewPublish(\r\n projectId: string,\r\n postId: string,\r\n input: PostPublishInput,\r\n request: { expectedVersion: number },\r\n ): Promise<PostPublishPreview>;\r\n executePublish(\r\n projectId: string,\r\n postId: string,\r\n input: PostPublishExecuteInput,\r\n request: { idempotencyKey: string; expectedVersion: number },\r\n ): Promise<Post>;\r\n };\n media?: {\n list(projectId: string, options?: { limit?: number; cursor?: string; type?: \"IMAGE\" | \"VIDEO\"; query?: string }): Promise<MediaAssetListData>;\n upload(projectId: string, input: { fileName: string; contentType: string; fileSize: number; body: Blob }): Promise<MediaAsset>;\n };\n integrations: {\r\n health(projectId: string): Promise<IntegrationHealthListData>;\r\n };\r\n calendar: {\r\n list(\r\n projectId: string,\r\n options?: {\r\n limit?: number;\r\n cursor?: string;\r\n from?: string;\r\n to?: string;\r\n },\r\n ): Promise<CalendarListData>;\r\n };\r\n};\r\n\r\nexport type RolinoMcpServerOptions = {\r\n client?: RolinoMcpApi;\r\n baseUrl?: string;\r\n token?: string;\r\n timeoutMs?: number;\r\n fetch?: typeof globalThis.fetch;\r\n};\r\n\r\nfunction jsonResult(structuredContent: Record<string, unknown>) {\r\n return {\r\n content: [{ type: \"text\" as const, text: JSON.stringify(structuredContent) }],\r\n structuredContent,\r\n };\r\n}\r\n\r\nfunction errorResult(error: unknown) {\r\n let body: Record<string, unknown>;\r\n if (error instanceof RolinoApiError) {\r\n body = {\r\n error: {\r\n code: error.code,\r\n message: error.message,\r\n ...(error.requestId ? { requestId: error.requestId } : {}),\r\n ...(error.retryAfterSeconds === null\r\n ? {}\r\n : { retryAfterSeconds: error.retryAfterSeconds }),\r\n },\r\n };\r\n } else if (error instanceof RolinoNetworkError) {\n body = { error: { code: error.kind, message: error.message } };\n } else if (error instanceof TypeError) {\n body = { error: { code: \"VALIDATION_ERROR\", message: error.message } };\n } else {\r\n body = {\r\n error: {\r\n code: \"INTERNAL_ERROR\",\r\n message: \"Rolino could not complete the tool call.\",\r\n },\r\n };\r\n }\r\n\r\n return {\r\n content: [{ type: \"text\" as const, text: JSON.stringify(body) }],\r\n isError: true,\r\n };\r\n}\r\n\r\nconst readOnlyAnnotations = {\r\n readOnlyHint: true,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst createDraftAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst createProjectAnnotations = {\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\n\nconst uploadMediaAnnotations = {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\r\nconst ProjectCreateToolInputSchema = ProjectCreateInputSchema.safeExtend({\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact creation.\"),\r\n});\r\n\r\nconst updateDraftAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: false,\r\n} as const;\r\n\r\nconst schedulePreviewAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: false,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst scheduleExecuteAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst publishPreviewAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: false,\r\n idempotentHint: false,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nconst publishExecuteAnnotations = {\r\n readOnlyHint: false,\r\n destructiveHint: true,\r\n idempotentHint: true,\r\n openWorldHint: true,\r\n} as const;\r\n\r\nfunction defaultClient(options: RolinoMcpServerOptions): RolinoMcpApi {\r\n return new RolinoClient({\r\n baseUrl: options.baseUrl ?? \"https://getrolino.com\",\r\n token: options.token,\r\n timeoutMs: options.timeoutMs,\r\n fetch: options.fetch,\r\n });\r\n}\r\n\r\nexport function createRolinoMcpServer(options: RolinoMcpServerOptions = {}) {\r\n const api = options.client ?? defaultClient(options);\r\n const server = new McpServer({\r\n name: \"rolino\",\r\n version: ROLINO_MCP_VERSION,\r\n description: \"Read Rolino workspace and publishing state, prepare drafts, and schedule posts through an exact server-confirmed two-step workflow.\",\r\n });\r\n\r\n server.registerTool(\"whoami\", {\r\n title: \"Show Rolino identity\",\r\n description:\r\n \"Use this before project tools to identify the authenticated Rolino user, organization, and granted capabilities. This tool never changes Rolino data.\",\r\n inputSchema: {},\r\n outputSchema: ActorSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async () => {\r\n try {\r\n return jsonResult(await api.whoami());\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_projects\", {\r\n title: \"List Rolino projects\",\r\n description:\r\n \"List projects visible to the authenticated Rolino organization. Use the returned IDs with get_project; paginate with nextCursor when present. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of projects to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Project cursor returned by a previous list_projects call.\"),\r\n },\r\n outputSchema: ProjectListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ limit, cursor }) => {\r\n try {\r\n return jsonResult(await api.projects.list({ limit, cursor }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_project\", {\r\n title: \"Get a Rolino project\",\r\n description:\r\n \"Get one Rolino project by its exact ID after discovering it with list_projects. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n },\r\n outputSchema: ProjectSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId }) => {\r\n try {\r\n return jsonResult(await api.projects.get(projectId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"create_project\", {\n title: \"Create a Rolino project\",\r\n description:\r\n \"Create and save one paired Rolino project and brand. This requires projects:write and changes Rolino data, but it does not research a website, connect providers, schedule, or publish. Supply a stable idempotency key so retrying the same input cannot create a duplicate; returned website URLs are normalized and may differ from the submitted string.\",\r\n inputSchema: ProjectCreateToolInputSchema,\r\n outputSchema: ProjectSchema,\r\n annotations: createProjectAnnotations,\r\n }, async ({ idempotencyKey, ...input }) => {\r\n try {\r\n return jsonResult(await api.projects.create(input, {\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\n\n server.registerTool(\"list_media_assets\", {\n title: \"List Rolino media assets\",\n description: \"List reusable images and videos in one exact project. Use this before uploading to avoid duplicates and pass returned asset IDs when creating or updating drafts. This tool never changes Rolino data.\",\n inputSchema: {\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\n limit: z.number().int().min(1).max(100).default(50),\n cursor: z.string().min(1).optional(),\n type: z.enum([\"IMAGE\", \"VIDEO\"]).optional(),\n query: z.string().trim().min(1).max(100).optional(),\n },\n outputSchema: MediaAssetListDataSchema,\n annotations: readOnlyAnnotations,\n }, async ({ projectId, limit, cursor, type, query }) => {\n try {\n if (!api.media) throw new TypeError(\"This Rolino client does not support media operations.\");\n return jsonResult(await api.media.list(projectId, { limit, cursor, type, query }));\n } catch (error) {\n return errorResult(error);\n }\n });\n\n server.registerTool(\"upload_media_asset\", {\n title: \"Upload local media to Rolino\",\n description: \"Upload one explicitly approved local JPEG, PNG, WebP, MP4, or MOV file into an exact project's reusable media library. Read only the exact path supplied for this workflow. This changes Rolino data but never creates, schedules, or publishes a post. Return the asset ID for a later draft operation.\",\n inputSchema: {\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\n filePath: z.string().min(1).describe(\"Exact local path of the user-approved media file.\"),\n },\n outputSchema: MediaAssetSchema,\n annotations: uploadMediaAnnotations,\n }, async ({ projectId, filePath }) => {\n try {\n if (!api.media) throw new TypeError(\"This Rolino client does not support media operations.\");\n const absolutePath = resolve(filePath);\n const details = await stat(absolutePath).catch(() => null);\n if (!details?.isFile()) throw new TypeError(\"The media path must point to a readable file.\");\n const contentTypes: Record<string, string> = { \".jpg\": \"image/jpeg\", \".jpeg\": \"image/jpeg\", \".png\": \"image/png\", \".webp\": \"image/webp\", \".mp4\": \"video/mp4\", \".mov\": \"video/quicktime\" };\n const contentType = contentTypes[extname(absolutePath).toLowerCase()];\n if (!contentType) throw new TypeError(\"Use a JPEG, PNG, WebP, MP4, or MOV file.\");\n const bytes = await readFile(absolutePath);\n return jsonResult(await api.media.upload(projectId, { fileName: basename(absolutePath), contentType, fileSize: details.size, body: new Blob([bytes], { type: contentType }) }));\n } catch (error) {\n return errorResult(error);\n }\n });\n\n server.registerTool(\"list_posts\", {\n title: \"List Rolino posts\",\r\n description:\r\n \"List posts in an exact Rolino project. Discover project IDs with list_projects, filter by status when useful, and paginate with nextCursor. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of posts to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Post cursor returned by a previous list_posts call.\"),\r\n status: z.enum([\r\n \"DRAFT\",\r\n \"SCHEDULED\",\r\n \"ACTION_REQUIRED\",\r\n \"PUBLISHING\",\r\n \"PUBLISHED\",\r\n \"PARTIALLY_PUBLISHED\",\r\n \"FAILED\",\r\n ]).optional().describe(\"Optional exact post status filter.\"),\r\n },\r\n outputSchema: PostListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, limit, cursor, status }) => {\r\n try {\r\n return jsonResult(await api.posts.list(projectId, {\r\n limit,\r\n cursor,\r\n status,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_post\", {\r\n title: \"Get a Rolino post\",\r\n description:\r\n \"Get one Rolino post, including its ordered media and publication-destination status, by exact project and post IDs. This tool never changes Rolino data.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n },\r\n outputSchema: PostSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, postId }) => {\r\n try {\r\n return jsonResult(await api.posts.get(projectId, postId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"create_draft_post\", {\r\n title: \"Create Rolino draft post\",\r\n description:\r\n \"Create a draft in one exact project. This changes Rolino data but never schedules or publishes. A YouTube draft requires exactly one stored video plus explicit title, category, visibility, audience, disclosure, notification, and tag settings; its description uses the YOUTUBE caption override or shared caption. Unaudited Google API projects may be limited to Private uploads. Supply a stable idempotency key so retrying the same input cannot create a duplicate.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact creation.\"),\r\n ...mcpDraftInputShape,\r\n },\r\n outputSchema: PostSchema,\r\n annotations: createDraftAnnotations,\r\n }, async ({ projectId, idempotencyKey, ...input }) => {\r\n try {\r\n const draft = DraftPostInputSchema.parse(input);\r\n return jsonResult(await api.posts.create(projectId, draft, {\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"update_draft_post\", {\r\n title: \"Update Rolino draft post\",\r\n description:\r\n \"Replace a draft's caption, destinations, media, and provider settings without scheduling or publishing it. YouTube still requires exactly one stored video and every explicit metadata declaration; its description uses the YOUTUBE caption override or shared caption. Read the post first and pass its current version; stale versions fail instead of overwriting another change. A stable idempotency key makes exact retries safe.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino draft post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact update.\"),\r\n ...mcpDraftInputShape,\r\n },\r\n outputSchema: PostSchema,\r\n annotations: updateDraftAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n ...input\r\n }) => {\r\n try {\r\n const draft = DraftPostInputSchema.parse(input);\r\n return jsonResult(await api.posts.update(projectId, postId, draft, {\r\n expectedVersion,\r\n idempotencyKey,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"get_post_readiness\", {\r\n title: \"Get Rolino post readiness\",\r\n description:\r\n \"Evaluate one saved post against its destinations, media, captions, settings, permissions, token timing, and cached provider health. YouTube checks cover one stored video, explicit metadata and declarations, description limits, Private-only audit restrictions, and queue-aware lead time. This is a read-only evaluation and does not refresh providers or publish content.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n },\r\n outputSchema: PostReadinessSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, postId }) => {\r\n try {\r\n return jsonResult(await api.posts.readiness(projectId, postId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"preview_post_schedule\", {\r\n title: \"Preview a Rolino post schedule\",\r\n description:\r\n \"Validate one exact future schedule against the current post version and live provider health. A YouTube schedule must target Public and its preview explains that confirmed execution starts a private upload immediately for early processing. This contacts configured providers and creates a five-minute, single-use confirmation, but does not schedule or publish the post. Inspect the complete result before calling execute_post_schedule with identical values.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n ...PostScheduleInputSchema.shape,\r\n },\r\n outputSchema: PostSchedulePreviewSchema,\r\n annotations: schedulePreviewAnnotations,\r\n }, async ({ projectId, postId, expectedVersion, ...input }) => {\r\n try {\r\n return jsonResult(await api.posts.previewSchedule(\r\n projectId,\r\n postId,\r\n input,\r\n { expectedVersion },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"execute_post_schedule\", {\r\n title: \"Execute a confirmed Rolino post schedule\",\r\n description:\r\n \"Schedule a post only after preview_post_schedule. Pass the unchanged time, timezone, post version, and returned one-time confirmation token. For YouTube, confirmed execution begins or resumes the private upload immediately and may return PENDING until a remote schedule change is confirmed; it never means the video already published. Rolino rechecks readiness and provider health, rejects stale or mismatched confirmation, and uses the stable idempotency key for safe retries. Scheduling causes future external publishing and is consequential.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Same post version used by preview_post_schedule.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact execution.\"),\r\n confirmationToken: z.string().min(1).max(200)\r\n .describe(\"Single-use token returned by preview_post_schedule.\"),\r\n ...PostScheduleInputSchema.shape,\r\n },\r\n outputSchema: mcpScheduleExecuteOutputSchema,\r\n annotations: scheduleExecuteAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n confirmationToken,\r\n ...input\r\n }) => {\r\n try {\r\n return jsonResult(await api.posts.executeSchedule(\r\n projectId,\r\n postId,\r\n { ...input, confirmationToken },\r\n { expectedVersion, idempotencyKey },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"preview_post_publish\", {\r\n title: \"Preview immediate Rolino post publishing\",\r\n description:\r\n \"Validate exact destinations against the current post version, safe retry state, readiness, and live provider health. YouTube readiness requires one stored video and explicit metadata; the configured visibility is exact, while unaudited Google API projects may be restricted to Private. This contacts configured providers and creates a five-minute, single-use confirmation, but does not publish. Inspect the complete result before calling execute_post_publish with identical destinations.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Current version returned by get_post.\"),\r\n destinations: PostPublishInputSchema.shape.destinations\r\n .describe(\"Exact Instagram, TikTok, YouTube, and/or Bluesky destinations to publish now.\"),\n },\r\n outputSchema: PostPublishPreviewSchema,\r\n annotations: publishPreviewAnnotations,\r\n }, async ({ projectId, postId, expectedVersion, destinations }) => {\r\n try {\r\n return jsonResult(await api.posts.previewPublish(\r\n projectId,\r\n postId,\r\n { destinations },\r\n { expectedVersion },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"execute_post_publish\", {\r\n title: \"Execute confirmed immediate Rolino post publishing\",\r\n description:\r\n \"Begin external publishing only after preview_post_publish. Pass the unchanged destinations, post version, and returned one-time confirmation token. YouTube execution starts a resumable upload and remains PREPARING until provider-confirmed upload and processing complete; no queued or local state is reported as published. Rolino rechecks readiness and safe retry state, durably queues the exact destinations, rejects ambiguous prior outcomes, and uses the stable idempotency key to prevent duplicate execution. This is immediately consequential.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n postId: z.string().min(1).describe(\"Exact Rolino post ID.\"),\r\n expectedVersion: z.number().int().positive()\r\n .describe(\"Same post version used by preview_post_publish.\"),\r\n idempotencyKey: z.string().min(1).max(200)\r\n .describe(\"Stable caller-generated retry key for this exact execution.\"),\r\n confirmationToken: z.string().min(1).max(200)\r\n .describe(\"Single-use token returned by preview_post_publish.\"),\r\n destinations: PostPublishInputSchema.shape.destinations\r\n .describe(\"Exact unchanged destinations returned by preview_post_publish.\"),\r\n },\r\n outputSchema: PostSchema,\r\n annotations: publishExecuteAnnotations,\r\n }, async ({\r\n projectId,\r\n postId,\r\n expectedVersion,\r\n idempotencyKey,\r\n confirmationToken,\r\n destinations,\r\n }) => {\r\n try {\r\n return jsonResult(await api.posts.executePublish(\r\n projectId,\r\n postId,\r\n { destinations, confirmationToken },\r\n { expectedVersion, idempotencyKey },\r\n ));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_integration_health\", {\r\n title: \"List Rolino publishing integration health\",\r\n description:\r\n \"List secret-safe cached health for every enabled publishing connection (Instagram, TikTok, YouTube, or Bluesky) in one exact project. This tool does not contact external providers or reveal social credentials.\",\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n },\r\n outputSchema: IntegrationHealthListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId }) => {\r\n try {\r\n return jsonResult(await api.integrations.health(projectId));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n server.registerTool(\"list_calendar_events\", {\r\n title: \"List Rolino calendar events\",\r\n description:\r\n \"List scheduled posts and their enabled destinations in one exact project, including YouTube posts whose private early preparation has started. By default the bounded window spans 30 days in the past through 90 days ahead; provide both from and to for another range and paginate with nextCursor.\",\r\n inputSchema: {\r\n projectId: z.string().min(1).describe(\"Exact Rolino project ID.\"),\r\n limit: z.number().int().min(1).max(100).default(50)\r\n .describe(\"Maximum number of calendar events to return, from 1 to 100.\"),\r\n cursor: z.string().min(1).optional()\r\n .describe(\"Opaque cursor returned by a previous list_calendar_events call.\"),\r\n from: z.iso.datetime().optional()\r\n .describe(\"Inclusive ISO-8601 window start; provide together with to.\"),\r\n to: z.iso.datetime().optional()\r\n .describe(\"Exclusive ISO-8601 window end; provide together with from.\"),\r\n },\r\n outputSchema: CalendarListDataSchema,\r\n annotations: readOnlyAnnotations,\r\n }, async ({ projectId, limit, cursor, from, to }) => {\r\n try {\r\n return jsonResult(await api.calendar.list(projectId, {\r\n limit,\r\n cursor,\r\n from,\r\n to,\r\n }));\r\n } catch (error) {\r\n return errorResult(error);\r\n }\r\n });\r\n\r\n return server;\r\n}\r\n\r\nexport async function startStdioServer(options: RolinoMcpServerOptions = {}) {\r\n const server = createRolinoMcpServer(options);\r\n const transport = new StdioServerTransport();\r\n await server.connect(transport);\r\n return server;\r\n}\r\n","{\n \"name\": \"@rolino/mcp\",\n \"version\": \"0.1.0\",\n \"description\": \"Model Context Protocol server for Rolino\",\n \"type\": \"module\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"rolino\",\n \"mcp\",\n \"model-context-protocol\",\n \"social-media\",\n \"ai-agent\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/deifos/rolino.git\",\n \"directory\": \"packages/mcp\"\n },\n \"homepage\": \"https://github.com/deifos/rolino/tree/main/packages/mcp#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/deifos/rolino/issues\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"bin\": {\n \"rolino-mcp\": \"./dist/bin.js\"\n },\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n },\n \"files\": [\n \"dist/**/*.js\",\n \"dist/**/*.cjs\",\n \"dist/**/*.map\",\n \"dist/**/*.d.ts\",\n \"dist/**/*.d.cts\",\n \"README.md\",\n \"CHANGELOG.md\",\n \"LICENSE\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"build\": \"tsup src/index.ts src/bin.ts --format esm,cjs --dts --sourcemap --clean\",\n \"typecheck\": \"tsc --noEmit\",\n \"dev\": \"tsx src/bin.ts\"\n },\n \"dependencies\": {\n \"@hono/node-server\": \"2.0.12\",\n \"@modelcontextprotocol/sdk\": \"^1.30.0\",\n \"@rolino/contracts\": \"0.1.0\",\n \"@rolino/local-auth\": \"0.1.0\",\n \"@rolino/sdk\": \"0.1.0\",\n \"zod\": \"^4.4.3\"\n },\n \"devDependencies\": {\n \"tsx\": \"^4.21.0\"\n },\n \"engines\": {\n \"node\": \">=20.19.0\"\n }\n}\n","import { resolveCredential } from \"@rolino/local-auth\";\r\nimport { normalizeRolinoBaseUrl, parseRolinoTimeout } from \"@rolino/sdk\";\r\n\r\nexport type RolinoMcpEnvironment = Record<string, string | undefined>;\r\n\r\nexport function resolveMcpConfiguration(\r\n env: RolinoMcpEnvironment = process.env,\r\n) {\r\n const baseUrl = normalizeRolinoBaseUrl(\r\n env.ROLINO_URL ?? \"https://getrolino.com\",\r\n );\r\n const credential = resolveCredential(baseUrl, env);\r\n\r\n return {\r\n baseUrl,\r\n token: credential.token ?? undefined,\r\n timeoutMs: env.ROLINO_TIMEOUT\r\n ? parseRolinoTimeout(env.ROLINO_TIMEOUT)\r\n : undefined,\r\n credentialSource: credential.source,\r\n };\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA0B;AAC1B,mBAAqC;AACrC,sBAA+B;AAC/B,uBAA2C;AAC3C,uBAsCO;AACP,IAAAA,cAIO;AACP,QAAmB;;;AChDnB;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,KAAO;AAAA,IACL,cAAc;AAAA,EAChB;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,MACH,QAAU;AAAA,QACR,OAAS;AAAA,QACT,SAAW;AAAA,MACb;AAAA,MACA,SAAW;AAAA,QACT,OAAS;AAAA,QACT,SAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,eAAiB;AAAA,IACf,QAAU;AAAA,EACZ;AAAA,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,WAAa;AAAA,IACb,KAAO;AAAA,EACT;AAAA,EACA,cAAgB;AAAA,IACd,qBAAqB;AAAA,IACrB,6BAA6B;AAAA,IAC7B,qBAAqB;AAAA,IACrB,sBAAsB;AA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,EAAE,SAAS,EAC3B,SAAS,4DAA4D;AAAA,IAC1E;AAAA,IACA,cAAc;AAAA,IACd,aAAa;AAAA,EACf,GAAG,OAAO,EAAE,WAAW,OAAO,QAAQ,MAAM,GAAG,MAAM;AACnD,QAAI;AACF,aAAO,WAAW,MAAM,IAAI,SAAS,KAAK,WAAW;AAAA,QACnD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,SAAS,OAAO;AACd,aAAO,YAAY,KAAK;AAAA,IAC1B;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAEA,eAAsB,iBAAiB,UAAkC,CAAC,GAAG;AAC3E,QAAM,SAAS,sBAAsB,OAAO;AAC5C,QAAM,YAAY,IAAI,kCAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAC9B,SAAO;AACT;","names":["import_sdk"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { Actor, ProjectCreateInput, Project, ProjectListData, DraftPostInput, Post, PostStatus, PostListData, PostReadiness, PostScheduleInput, PostSchedulePreview, PostScheduleExecuteInput, PostScheduleExecuteResult, PostPublishInput, PostPublishPreview, PostPublishExecuteInput, MediaAssetListData, MediaAsset, IntegrationHealthListData, CalendarListData } from '@rolino/contracts';
|
|
3
|
+
|
|
4
|
+
type RolinoMcpEnvironment = Record<string, string | undefined>;
|
|
5
|
+
declare function resolveMcpConfiguration(env?: RolinoMcpEnvironment): {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
token: string | undefined;
|
|
8
|
+
timeoutMs: number | undefined;
|
|
9
|
+
credentialSource: "environment" | "stored" | "none";
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare const ROLINO_MCP_VERSION: string;
|
|
13
|
+
type RolinoMcpApi = {
|
|
14
|
+
whoami(): Promise<Actor>;
|
|
15
|
+
projects: {
|
|
16
|
+
create(input: ProjectCreateInput, request: {
|
|
17
|
+
idempotencyKey: string;
|
|
18
|
+
}): Promise<Project>;
|
|
19
|
+
list(options?: {
|
|
20
|
+
limit?: number;
|
|
21
|
+
cursor?: string;
|
|
22
|
+
}): Promise<ProjectListData>;
|
|
23
|
+
get(projectId: string): Promise<Project>;
|
|
24
|
+
};
|
|
25
|
+
posts: {
|
|
26
|
+
create(projectId: string, input: DraftPostInput, request: {
|
|
27
|
+
idempotencyKey: string;
|
|
28
|
+
}): Promise<Post>;
|
|
29
|
+
update(projectId: string, postId: string, input: DraftPostInput, request: {
|
|
30
|
+
idempotencyKey: string;
|
|
31
|
+
expectedVersion: number;
|
|
32
|
+
}): Promise<Post>;
|
|
33
|
+
list(projectId: string, options?: {
|
|
34
|
+
limit?: number;
|
|
35
|
+
cursor?: string;
|
|
36
|
+
status?: PostStatus;
|
|
37
|
+
}): Promise<PostListData>;
|
|
38
|
+
get(projectId: string, postId: string): Promise<Post>;
|
|
39
|
+
readiness(projectId: string, postId: string): Promise<PostReadiness>;
|
|
40
|
+
previewSchedule(projectId: string, postId: string, input: PostScheduleInput, request: {
|
|
41
|
+
expectedVersion: number;
|
|
42
|
+
}): Promise<PostSchedulePreview>;
|
|
43
|
+
executeSchedule(projectId: string, postId: string, input: PostScheduleExecuteInput, request: {
|
|
44
|
+
idempotencyKey: string;
|
|
45
|
+
expectedVersion: number;
|
|
46
|
+
}): Promise<PostScheduleExecuteResult>;
|
|
47
|
+
previewPublish(projectId: string, postId: string, input: PostPublishInput, request: {
|
|
48
|
+
expectedVersion: number;
|
|
49
|
+
}): Promise<PostPublishPreview>;
|
|
50
|
+
executePublish(projectId: string, postId: string, input: PostPublishExecuteInput, request: {
|
|
51
|
+
idempotencyKey: string;
|
|
52
|
+
expectedVersion: number;
|
|
53
|
+
}): Promise<Post>;
|
|
54
|
+
};
|
|
55
|
+
media?: {
|
|
56
|
+
list(projectId: string, options?: {
|
|
57
|
+
limit?: number;
|
|
58
|
+
cursor?: string;
|
|
59
|
+
type?: "IMAGE" | "VIDEO";
|
|
60
|
+
query?: string;
|
|
61
|
+
}): Promise<MediaAssetListData>;
|
|
62
|
+
upload(projectId: string, input: {
|
|
63
|
+
fileName: string;
|
|
64
|
+
contentType: string;
|
|
65
|
+
fileSize: number;
|
|
66
|
+
body: Blob;
|
|
67
|
+
}): Promise<MediaAsset>;
|
|
68
|
+
};
|
|
69
|
+
integrations: {
|
|
70
|
+
health(projectId: string): Promise<IntegrationHealthListData>;
|
|
71
|
+
};
|
|
72
|
+
calendar: {
|
|
73
|
+
list(projectId: string, options?: {
|
|
74
|
+
limit?: number;
|
|
75
|
+
cursor?: string;
|
|
76
|
+
from?: string;
|
|
77
|
+
to?: string;
|
|
78
|
+
}): Promise<CalendarListData>;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
type RolinoMcpServerOptions = {
|
|
82
|
+
client?: RolinoMcpApi;
|
|
83
|
+
baseUrl?: string;
|
|
84
|
+
token?: string;
|
|
85
|
+
timeoutMs?: number;
|
|
86
|
+
fetch?: typeof globalThis.fetch;
|
|
87
|
+
};
|
|
88
|
+
declare function createRolinoMcpServer(options?: RolinoMcpServerOptions): McpServer;
|
|
89
|
+
declare function startStdioServer(options?: RolinoMcpServerOptions): Promise<McpServer>;
|
|
90
|
+
|
|
91
|
+
export { ROLINO_MCP_VERSION, type RolinoMcpApi, type RolinoMcpEnvironment, type RolinoMcpServerOptions, createRolinoMcpServer, resolveMcpConfiguration, startStdioServer };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { Actor, ProjectCreateInput, Project, ProjectListData, DraftPostInput, Post, PostStatus, PostListData, PostReadiness, PostScheduleInput, PostSchedulePreview, PostScheduleExecuteInput, PostScheduleExecuteResult, PostPublishInput, PostPublishPreview, PostPublishExecuteInput, MediaAssetListData, MediaAsset, IntegrationHealthListData, CalendarListData } from '@rolino/contracts';
|
|
3
|
+
|
|
4
|
+
type RolinoMcpEnvironment = Record<string, string | undefined>;
|
|
5
|
+
declare function resolveMcpConfiguration(env?: RolinoMcpEnvironment): {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
token: string | undefined;
|
|
8
|
+
timeoutMs: number | undefined;
|
|
9
|
+
credentialSource: "environment" | "stored" | "none";
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare const ROLINO_MCP_VERSION: string;
|
|
13
|
+
type RolinoMcpApi = {
|
|
14
|
+
whoami(): Promise<Actor>;
|
|
15
|
+
projects: {
|
|
16
|
+
create(input: ProjectCreateInput, request: {
|
|
17
|
+
idempotencyKey: string;
|
|
18
|
+
}): Promise<Project>;
|
|
19
|
+
list(options?: {
|
|
20
|
+
limit?: number;
|
|
21
|
+
cursor?: string;
|
|
22
|
+
}): Promise<ProjectListData>;
|
|
23
|
+
get(projectId: string): Promise<Project>;
|
|
24
|
+
};
|
|
25
|
+
posts: {
|
|
26
|
+
create(projectId: string, input: DraftPostInput, request: {
|
|
27
|
+
idempotencyKey: string;
|
|
28
|
+
}): Promise<Post>;
|
|
29
|
+
update(projectId: string, postId: string, input: DraftPostInput, request: {
|
|
30
|
+
idempotencyKey: string;
|
|
31
|
+
expectedVersion: number;
|
|
32
|
+
}): Promise<Post>;
|
|
33
|
+
list(projectId: string, options?: {
|
|
34
|
+
limit?: number;
|
|
35
|
+
cursor?: string;
|
|
36
|
+
status?: PostStatus;
|
|
37
|
+
}): Promise<PostListData>;
|
|
38
|
+
get(projectId: string, postId: string): Promise<Post>;
|
|
39
|
+
readiness(projectId: string, postId: string): Promise<PostReadiness>;
|
|
40
|
+
previewSchedule(projectId: string, postId: string, input: PostScheduleInput, request: {
|
|
41
|
+
expectedVersion: number;
|
|
42
|
+
}): Promise<PostSchedulePreview>;
|
|
43
|
+
executeSchedule(projectId: string, postId: string, input: PostScheduleExecuteInput, request: {
|
|
44
|
+
idempotencyKey: string;
|
|
45
|
+
expectedVersion: number;
|
|
46
|
+
}): Promise<PostScheduleExecuteResult>;
|
|
47
|
+
previewPublish(projectId: string, postId: string, input: PostPublishInput, request: {
|
|
48
|
+
expectedVersion: number;
|
|
49
|
+
}): Promise<PostPublishPreview>;
|
|
50
|
+
executePublish(projectId: string, postId: string, input: PostPublishExecuteInput, request: {
|
|
51
|
+
idempotencyKey: string;
|
|
52
|
+
expectedVersion: number;
|
|
53
|
+
}): Promise<Post>;
|
|
54
|
+
};
|
|
55
|
+
media?: {
|
|
56
|
+
list(projectId: string, options?: {
|
|
57
|
+
limit?: number;
|
|
58
|
+
cursor?: string;
|
|
59
|
+
type?: "IMAGE" | "VIDEO";
|
|
60
|
+
query?: string;
|
|
61
|
+
}): Promise<MediaAssetListData>;
|
|
62
|
+
upload(projectId: string, input: {
|
|
63
|
+
fileName: string;
|
|
64
|
+
contentType: string;
|
|
65
|
+
fileSize: number;
|
|
66
|
+
body: Blob;
|
|
67
|
+
}): Promise<MediaAsset>;
|
|
68
|
+
};
|
|
69
|
+
integrations: {
|
|
70
|
+
health(projectId: string): Promise<IntegrationHealthListData>;
|
|
71
|
+
};
|
|
72
|
+
calendar: {
|
|
73
|
+
list(projectId: string, options?: {
|
|
74
|
+
limit?: number;
|
|
75
|
+
cursor?: string;
|
|
76
|
+
from?: string;
|
|
77
|
+
to?: string;
|
|
78
|
+
}): Promise<CalendarListData>;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
type RolinoMcpServerOptions = {
|
|
82
|
+
client?: RolinoMcpApi;
|
|
83
|
+
baseUrl?: string;
|
|
84
|
+
token?: string;
|
|
85
|
+
timeoutMs?: number;
|
|
86
|
+
fetch?: typeof globalThis.fetch;
|
|
87
|
+
};
|
|
88
|
+
declare function createRolinoMcpServer(options?: RolinoMcpServerOptions): McpServer;
|
|
89
|
+
declare function startStdioServer(options?: RolinoMcpServerOptions): Promise<McpServer>;
|
|
90
|
+
|
|
91
|
+
export { ROLINO_MCP_VERSION, type RolinoMcpApi, type RolinoMcpEnvironment, type RolinoMcpServerOptions, createRolinoMcpServer, resolveMcpConfiguration, startStdioServer };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ROLINO_MCP_VERSION,
|
|
3
|
+
createRolinoMcpServer,
|
|
4
|
+
resolveMcpConfiguration,
|
|
5
|
+
startStdioServer
|
|
6
|
+
} from "./chunk-RSNR7K6Z.js";
|
|
7
|
+
export {
|
|
8
|
+
ROLINO_MCP_VERSION,
|
|
9
|
+
createRolinoMcpServer,
|
|
10
|
+
resolveMcpConfiguration,
|
|
11
|
+
startStdioServer
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rolino/mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Model Context Protocol server for Rolino",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"rolino",
|
|
9
|
+
"mcp",
|
|
10
|
+
"model-context-protocol",
|
|
11
|
+
"social-media",
|
|
12
|
+
"ai-agent"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/deifos/rolino.git",
|
|
17
|
+
"directory": "packages/mcp"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://github.com/deifos/rolino/tree/main/packages/mcp#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/deifos/rolino/issues"
|
|
22
|
+
},
|
|
23
|
+
"main": "./dist/index.cjs",
|
|
24
|
+
"module": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"bin": {
|
|
27
|
+
"rolino-mcp": "./dist/bin.js"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/index.d.cts",
|
|
37
|
+
"default": "./dist/index.cjs"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist/**/*.js",
|
|
43
|
+
"dist/**/*.cjs",
|
|
44
|
+
"dist/**/*.map",
|
|
45
|
+
"dist/**/*.d.ts",
|
|
46
|
+
"dist/**/*.d.cts",
|
|
47
|
+
"README.md",
|
|
48
|
+
"CHANGELOG.md",
|
|
49
|
+
"LICENSE"
|
|
50
|
+
],
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsup src/index.ts src/bin.ts --format esm,cjs --dts --sourcemap --clean",
|
|
56
|
+
"typecheck": "tsc --noEmit",
|
|
57
|
+
"dev": "tsx src/bin.ts"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@hono/node-server": "2.0.12",
|
|
61
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
62
|
+
"@rolino/contracts": "0.1.0",
|
|
63
|
+
"@rolino/local-auth": "0.1.0",
|
|
64
|
+
"@rolino/sdk": "0.1.0",
|
|
65
|
+
"zod": "^4.4.3"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"tsx": "^4.21.0"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=20.19.0"
|
|
72
|
+
}
|
|
73
|
+
}
|