contentful-delivery-mcp
Contentful MCP Server for Delivery API
Documentation
Contentful Delivery MCP Server
A Model Context Protocol (MCP) server that provides seamless access to Contentful's Delivery API through AI assistants. Query and retrieve content entries, assets, and content types using natural language.
Quick Start
Install the package in your project:
npm install @mshaaban0/contentful-delivery-mcp-serverOr globally:
npm install -g @mshaaban0/contentful-delivery-mcp-serverSet up your Contentful credentials:
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"Features
- Natural language queries to search content
- Retrieve entries by ID or content type
- Asset management
- Content type schema access
- Pagination support
- Rich text content handling
Available Tools
- `query_entries` - Natural language search across all content
- `get_entry` - Fetch specific entry by ID
- `get_entries` - List entries with filtering
- `get_assets` - Browse all assets
- `get_asset` - Get asset details by ID
- `get_content_type` - View content type schema
- `get_content_types` - List available content types
Integration with Mastra AI
Mastra AI provides seamless integration with this MCP server. Here's how to set it up:
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");Development
# 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 inspectorDebugging
The MCP Inspector provides a web interface for debugging:
npm run inspectorVisit the provided URL to access the debugging tools.
Resources
Security Audits

License
MIT
Frequently asked questions
What is contentful-delivery-mcp?
contentful-delivery-mcp is Contentful MCP Server for Delivery API
How do I install contentful-delivery-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is contentful-delivery-mcp open source?
Yes — it is hosted on GitHub at https://github.com/mshaaban0/contentful-delivery-mcp and has 8 stars.
Related MCP tools
Playwright MCP server TypeScript-based implementation. Trusted by 22000+ developers. Trusted by 22000+ developers. Trusted by 22000+ developers.
Official Notion MCP Server TypeScript-based implementation. Trusted by 3400+ developers. Trusted by 3400+ developers. Trusted by 3400+ developers.
Directory for Awesome MCP Servers TypeScript-based implementation. Trusted by 1900+ developers. Trusted by 1900+ developers.
🧩 MCP Gateway - A lightweight gateway service that instantly transforms existing MCP Servers and APIs into MCP servers with zero code changes.
MCP Aggregator, Orchestrator, Middleware, Gateway in one docker TypeScript-based implementation. Trusted by 1400+ developers.
MCP Server for kubernetes management commands TypeScript-based implementation. Trusted by 1100+ developers. Trusted by 1100+ developers.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP