Skip to main content
Glama
V2-Digital

V2.ai Insights Scraper MCP

by V2-Digital

get_contentful_posts

Fetch blog posts from Contentful CMS to extract content and generate AI-powered summaries for analysis.

Instructions

Fetch posts directly from Contentful CMS (if configured)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • Actual implementation logic for fetching Contentful posts.
    def _get_contentful_posts(limit: int = 10):
        """Fetch posts directly from Contentful (if configured)"""
        if not os.getenv("CONTENTFUL_SPACE_ID") or not os.getenv("CONTENTFUL_ACCESS_TOKEN"):
            return {
                "error": "Contentful not configured. Set CONTENTFUL_SPACE_ID and CONTENTFUL_ACCESS_TOKEN environment variables."
            }
    
        try:
            from .contentful_client import fetch_contentful_posts
    
            return fetch_contentful_posts(
                content_type=os.getenv("CONTENTFUL_CONTENT_TYPE", "blogPost"), limit=limit
            )
        except Exception as e:
            return {"error": f"Error fetching from Contentful: {str(e)}"}
  • Registration of the 'get_contentful_posts' tool via FastMCP.
    @mcp.tool()
    def get_contentful_posts(limit: int = 10):
        """Fetch posts directly from Contentful CMS (if configured)"""
        return _get_contentful_posts(limit)

Latest Blog Posts

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/V2-Digital/v2-ai-mcp'

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