I'm pretty addicted to the Last Of Us series.Sorry about the cover.
😉 MCPs සෑම තැනකම සහ හොඳ හේතුවක් සඳහා. එය යෙදුම් සංවර්ධනයේ ඊළඟ පියවර වේ.
Being able to use everything from a single chat without accessing any app. It feels native for Postiz to schedule all your social posts from the chat! So, I started to dig into the Postiz code and added to it!
Postiz
The MCP Repository Is a Bit Weird
සෑම MCP එකකටම ප් රවාහනයක් ඇත, එය අපගේ පද්ධතිය සමඟ කතා කිරීමට LLMs භාවිතා කරන ක්රමයකි.
මේ මොහොතේ ප් රධාන ක්රම දෙකක් ඇත: Stdio, මූලික වශයෙන් නියෝග රේඛාවක් වන අතර, සහ SSE.
මේ මොහොතේ ප් රධාන ක් රම දෙකක් තිබෙනවා
මම ඇත්තටම තේරුම් නැහැ ඔවුන් SSE තෝරා ගත්තේ ඇයි - එය සැබවින්ම දිගු ඉල්ලීමක් වන අතර එය කවදාවත් අවසානය නොලැබෙන අතර සිදුවීම් ක්ලික් කරන්නන් වෙත ප්රවාහනය කරයි.
මෙම ක්රමයේ ගැටලුව වන්නේ තොරතුරු සේවාදායකයට ආපසු යැවීම සඳහා, ඔබට තවත් තැපැල් ඉල්ලීමක් යැවිය යුතුය (SSE යනු එක් මාර්ගය සන්නිවේදනය වන නිසා), එබැවින් ඔබ තත්වය තබා ගත යුතුය.
ඔවුන්ගේ උදාහරණයේ දී, ඔවුන් යෙදුම මතකය තුළ තත්වයක් තබාගෙන කුමක් ද? බොහෝ අය මතකය පැතිරීම ගැන පැමිණිලි කරති.
මම WebSockets භාවිතා කරන්නෙමි.ඔවුන් ඇතුළත් නින්ද තත්වයක් ඇති අතර, ඔබට එය සඳහා තත්වයක් තබා ගත යුතු නැත.
» හර්සංස්කරණය
මම Anthropic typcript SDK කූඩුව ඇතුළත් කර ඇති අතර එය පුදුමයට පත් නොවේ.එය අවුල් හැඟීමකි. බොහෝ දේවල් නිෂ්පාදනය තුළ භාවිතා නොකරන අතර, "සංස්කරණය" වැනි. ඔවුන් ඔබට මුළු ලෝකයේ සියල්ල මතක තබා ගැනීමට අවශ්ය ආකාරය සිදුවීමට බලාපොරොත්තු වන අවුල් වේ.
ඔවුන්ට ඔවුන්ගේ විස්තර ලබා ගත හැකි ආකාරය තුළින් පරිශීලකයා සන්නිවේදන ක්රියාත්මක කිරීම සහ පරිගණකය ලබා ගැනීමත් අමාරුයි.
import EventEmitter from 'events'; import {finalize, fromEvent, startWith } from 'rxjs'; @Injectable() export class McpService { static event = new EventEmitter(); constructor( private _mainMcp: MainMcp) { async runServer(apiKey: string, organization: string) {const server(const type: 'endpoint', data processen.NEXT_mainMcp).server(); const transport = new McpTransport(organization); const observer = fromEvent(McpService.event), `transport-${McP.event, transport_transport_###################### import EventEmitter from 'events'; import { finalize, fromEvent, startWith } from 'rxjs'; @Injectable() export class McpService { static event = new EventEmitter(); constructor( private _mainMcp: MainMcp ) { } async runServer(apiKey: string, organization: string) { const server = McpSettings.load(organization, this._mainMcp).server(); const transport = new McpTransport(organization); const observer = fromEvent( McpService.event, `organization-${organization}` ).pipe( startWith({ type: 'endpoint', data: process.env.NEXT_PUBLIC_BACKEND_URL + '/mcp/' + apiKey + '/messages', }), finalize(() => { transport.close(); }) ); console.log('MCP transport started'); await server.connect(transport); return observer; } async processPostBody(organization: string, body: object) { const server = McpSettings.load(organization, this._mainMcp).server(); const message = JSONRPCMessageSchema.parse(body); const transport = new McpTransport(organization); await server.connect(transport); transport.handlePostMessage(message); return {}; } }
️ ️ ️ ️ ️මෙය ඔබ සඳහා නම් ඔබ NestJS / Laravel / Spring වැනි OOP frameworks විශාල රසිකය.ප් රචණ්ඩත්වය සිදුවේ, නමුත් එය ප් රචණ්ඩත්වය සිදුවේ, නමුත් ප් රචණ්ඩත්වය සිදුවේ, නමුත් අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පාපයට එරෙහිව ශුද්ධ විනිශ්චය සහ අපි පා
@McpTool({ toolName: 'POSTIZ_GET_CONFIG_ID' }) async preRun() { return [ { type: 'text', text: `id: ${makeId(10)} Today date is ${dayjs.utc().format()}`, }, ]; } @McpTool({ toolName: 'POSTIZ_PROVIDERS_LIST' }) async listOfProviders(organization: string) { const list = ( await this._integrationService.getIntegrationsList(organization) ).map((org) => ({ id: org.id, name: org.name, identifier: org.providerIdentifier, picture: org.picture, disabled: org.disabled, profile: org.profile, customer: org.customer ? { id: org.customer.id, name: org.customer.name, } : undefined, })); return [{ type: 'text', text: JSON.stringify(list) }]; } @McpTool({ toolName: 'POSTIZ_SCHEDULE_POST', zod: { type: eenum(['draft', 'scheduled']), configId: string(), generatePictures: boolean(), date: string().describe('UTC TIME'), providerId: string().describe('Use POSTIZ_PROVIDERS_LIST to get the id'), posts: array(object({ text: string(), images: array(string()) })), }, }) async schedulePost( organization: string, obj: { type: 'draft' | 'schedule'; generatePictures: boolean; date: string; providerId: string; posts: { text: string }[]; } ) { const create = await this._postsService.createPost(organization, { date: obj.date, type: obj.type, tags: [], posts: [ { group: makeId(10), value: await Promise.all( obj.posts.map(async (post) => ({ content: post.text, id: makeId(10), image: !obj.generatePictures ? [] : [ { id: makeId(10), path: await this._openAiService.generateImage( post.text, true ), }, ], })) ), // @ts-ignore settings: {}, integration: { id: obj.providerId, }, }, ], }); return [ { type: 'text', text: `Post created successfully, check it here: ${process.env.FRONTEND_URL}/p/${create[0].postId}`, }, ]; }
All the code can be found in Postiz here: https://github.com/gitroomhq/postiz-app/tree/main/libraries/nestjs-libraries/src/mcp
https://github.com/gitroomhq/postiz-app/tree/main/libraries/nestjs-libraries/src/mcp
And here: https://github.com/gitroomhq/postiz-app/tree/main/apps/backend/src/mcp
https://github.com/gitroomhq/postiz-app/tree/main/apps/backend/src/mcp» හර්මොකදෝ යමක් කරන්නට LLM බලකරන්න 💪🏻
අපේ දේවල් වලට ප්රවේශ වීමට පෙර විවිධ දේවල් කිරීමට LLM බල කිරීමට built-in විකල්පයක් තිබීම හොඳයි.
මම සමහර අමුතු ප්රශ්නවලට මුහුණ දුන්නා.කොහොමත් මම Cursor මට තැපැල් තැපැල් කිරීමට කිව්වා, එය 2024 සඳහා තැපැල් කිරීමට උත්සාහ කළා.
මම සමහර config විස්තර ඉදිරිපත් කිරීමට අවශ්ය, ඒ නිසා මම
POSTIZ_CONFIGURATION_PRERUN
මෙවලමක් නිර්මාණය.POSTIZ_CONFIGURATION_PRERUN
මගේ
POSTIZ_SCHEDULE_POST
දී, මමconfigId
නමින් නව ප්රභේදයක් එකතු කරPOSTIZ_GET_CONFIG_ID බවට config මෙවලම නාමය වෙනස් කර ඇත.
config ආදායම:id: ${makeId(10)} අද දිනය ${day.jsutc().format()}
POSTIZ_SCHEDULE_POST
configId
POSTIZ_GET_CONFIG_ID.
id: ${makeId(10)} Today date is ${dayjs.utc().format()}
එය LLM සෑම විටම එය පෙර කැඳවා ඇති බවට බලපෑවා, හා දිනය නියමිත විය! :)
එය මට වඩා හොඳ විය, මොකද මම දැනගෙන හිටියේ එය මට දැන් සිට UTC දිනය එවනු ඇත.
» හර්විශේෂ භාවිතය
මම හිතන්නේ එය උපකරණ කිහිපයක් සමඟ සකස් කරන විට හොඳම ක්රියා කරයි, උදාහරණයක් ලෙස:
- Connect it to Cursor and ask it to schedule a post about your work today.
- Connect it to Notion and ask to schedule all the team's latest work on social media - check out Composio MCPs.
- Connect it to any SaaS that has CopilotKit and schedule posts based on the app.
එය Cursor වෙත සම්බන්ධ කර අද ඔබේ වැඩ පිළිබඳ තැපැල් සැලසුම් කරන්න. Connect it to Notion and ask to schedule all the team's latest work on social media - check out Composio MCPs. Composio MCPsConnect it to any SaaS that has CopilotKit and schedule posts based on the app. CopilotKit» හර්Postiz MCP
Postiz is the most robust open-source social media scheduling tool - and now the only scheduler that offers MCP (natively, not with Zapier or something like that)
Postizනව MCP සමඟ ඔබට Cursor/Windsurf සහ Anthropic සේවාදායකයන්ගෙන් සියලුම තැපැල් සැලසුම් කළ හැකිය.
අනිවාර්යයෙන්ම 100% නොමිලේ. :P
If you like it, please don't forget to star us ⭐️https://github.com/gitroomhq/postiz-app
https://github.com/gitroomhq/postiz-app
< Br >