Skip to main content
Glama

Contentful Delivery MCP Server

by mshaaban0
contentful-serializer.ts636 B
/** * Safely serializes Contentful entries by handling circular references * and extracting the most relevant fields */ export function serializeContentfulResponse(entries: any) { const seen = new WeakSet(); const serializer = (key: string, value: any) => { // Handle circular references if (typeof value === 'object' && value !== null) { if (seen.has(value)) { // Return a simplified reference instead of the full circular object return { id: value.sys?.id, type: value.sys?.type }; } seen.add(value); } return value; }; return JSON.stringify(entries, serializer, 2); }

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/mshaaban0/contentful-delivery-mcp'

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