Contentful Delivery MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides seamless access to Contentful's Delivery API through AI assistants. Allows querying and retrieving content entries, assets, and content types using natural language.

Servidor MCP de entrega de contenido

Un servidor de Protocolo de Contexto de Modelo (MCP) que proporciona acceso sin problemas a la API de Entrega de Contentful mediante asistentes de IA. Consulta y recupera entradas de contenido, recursos y tipos de contenido mediante lenguaje natural.

Inicio rápido

Instala el paquete en tu proyecto:

npm install @mshaaban0/contentful-delivery-mcp-server

O globalmente:

npm install -g @mshaaban0/contentful-delivery-mcp-server

Configura tus credenciales de Contentful:

export CONTENTFUL_SPACE_ID="your_space_id" export CONTENTFUL_ACCESS_TOKEN="your_access_token" # Optional: Restrict content to specific content types export CONTENTFUL_CONTENT_TYPE_IDS="blogPost,article,product"

Características

  • Consultas en lenguaje natural para buscar contenido
  • Recuperar entradas por ID o tipo de contenido
  • Gestión de activos
  • Acceso al esquema de tipo de contenido
  • Soporte de paginación
  • Manejo de contenido de texto enriquecido

Herramientas disponibles

  • query_entries : búsqueda en lenguaje natural en todo el contenido
  • get_entry - Obtener una entrada específica por ID
  • get_entries - Lista de entradas con filtrado
  • get_assets - Explorar todos los activos
  • get_asset - Obtener detalles del activo por ID
  • get_content_type - Ver el esquema del tipo de contenido
  • get_content_types - Lista de tipos de contenido disponibles

Integración con Mastra AI

Mastra AI se integra perfectamente con este servidor MCP. Aquí te explicamos cómo configurarlo:

import { MastraMCPClient } from "@mastra/mcp"; import { Agent } from "@mastra/core/agent"; // Initialize the MCP client const contentfulClient = new MastraMCPClient({ name: "contentful-delivery", server: { command: "npx", args: ["-y", "@mshaaban0/contentful-delivery-mcp-server@latest"], env: { CONTENTFUL_ACCESS_TOKEN: "your_access_token", CONTENTFUL_SPACE_ID: "your_space_id", // Optional: Restrict content to specific content types CONTENTFUL_CONTENT_TYPE_IDS: "blogPost,article,product" } } }); // Create an AI agent with access to Contentful const assistant = new Agent({ name: "Content Assistant", instructions: ` You are a helpful assistant with access to our content database. Use the available tools to find and provide accurate information. `, model: "gpt-4", }); // Connect and register tools await contentfulClient.connect(); const tools = await contentfulClient.tools(); assistant.__setTools(tools); // Example usage const response = await assistant.chat("Find articles about machine learning");

Desarrollo

# Clone the repo git clone https://github.com/mshaaban0/contentful-delivery-mcp-server.git # Install dependencies npm install # Build npm run build # Development with auto-rebuild npm run watch # Run the inspector npm run inspector

Depuración

El Inspector MCP proporciona una interfaz web para la depuración:

npm run inspector

Visite la URL proporcionada para acceder a las herramientas de depuración.

Recursos

Licencia

Instituto Tecnológico de Massachusetts (MIT)

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Un servidor MCP basado en TypeScript que interactúa con la API de entrega de Contentful, lo que permite a los usuarios crear, consultar y resumir notas de texto a través del lenguaje natural.

  1. Quick Start
    1. Features
      1. Available Tools
    2. Integration with Mastra AI
      1. Development
        1. Debugging
          1. Resources
            1. License
              ID: v84ui258n5