Skip to main content
Glama

Ghost MCP Server

prompts.ts956 B
// src/prompts.ts import { z } from "zod"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { ghostApiClient } from "./ghostApi"; // Example prompt: summarize-post export function registerPrompts(server: McpServer) { server.prompt( "summarize-post", { postId: z.string() }, async ({ postId }) => { // Fetch the post by ID const post = await ghostApiClient.posts.read({ id: postId }); const title = post.title || ""; const excerpt = post.excerpt || ""; const html = post.html || ""; // Compose a summary message const summary = `Title: ${title}\nExcerpt: ${excerpt}\n\nContent Preview:\n${html.slice(0, 300)}...`; return { messages: [ { role: "user", content: { type: "text", text: `Summarize the following Ghost post:\n\n${summary}`, }, }, ], }; } ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MFYDev/ghost-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server