Next.js MCP Server for SJU ACM
This MCP (Model Context Protocol) server provides AI-friendly access to SJU ACM's CMS data through a set of tools and resources. Built with Next.js and the @vercel/mcp-adapter
, it enables AI assistants to query, search, and retrieve content from a Contentful space.
Go to Cursor Settings -> MCP -> Add MCP Server -> paste the JSON below:
{
"mcpServers": {
"SJU-ACM-MCP": {
"url": "https://sju-mcp.vercel.app/sse"
}
}
}
- Blog Posts - Articles with rich content, authors, and publish dates
- Meetings - Meeting records with dates, locations, slides, and recordings
- Executive Board Members - Team member profiles with positions and contact info
- Hackathons - Event information with dates, status, and registration links
- Landing Page Graphics - Visual assets for website displays
- Parallax Banners - Interactive banner images with links
- URI:
contentful://schema/content-types
- Description: Complete Contentful content type schemas and field definitions
- Use Case: Understanding the data structure and available fields for each content type
- URI:
contentful://stats/overview
- Description: Real-time statistics and counts for all content types
- Use Case: Getting overview metrics of your Contentful space content
Query blog posts with optional filtering
- Parameters:
slug
(optional): Get a specific post by sluglimit
(optional): Limit number of results
- Returns: Blog post data with titles, excerpts, authors, and cover images
Query meeting records
- Parameters:
type
(optional): "all" or "upcoming" meetingslimit
(optional): Limit number of results
- Returns: Meeting details with dates, locations, slides, and recordings
Query executive board members
- Parameters:
memberType
(optional): "current", "past", or "all"limit
(optional): Limit number of results
- Returns: Member profiles with positions, LinkedIn, GitHub, and photos
Query hackathon events
- Parameters:
status
(optional): "ongoing", "upcoming", "past", or "all"slug
(optional): Get specific hackathon by slug/IDlimit
(optional): Limit number of results
- Returns: Hackathon details with dates, registration links, and status
Query landing page graphics
- Parameters:
title
(optional): Get specific graphic by titlelimit
(optional): Limit number of results
- Returns: Graphic assets with titles, descriptions, and image URLs
Query parallax banners
- Parameters:
limit
(optional): Limit number of results
- Returns: Banner data with titles, links, and image URLs
Universal search across all content types
- Parameters:
query
: Search term to match against titles and descriptionscontentTypes
(optional): Specific content types to search inlimit
(optional): Limit results per content type (default: 5)
- Returns: Matching content across specified or all content types
Create a .env.local
file with your Contentful credentials:
CONTENTFUL_SPACE_ID=your_space_id
CONTENTFUL_ACCESS_TOKEN=your_access_token
REDIS_URL=your_redis_url # Required for SSE transport on Vercel
npm install
# or
yarn install
# or
pnpm install
npm run dev
# or
yarn dev
# or
pnpm dev
- Redis database attached to your Vercel project under
REDIS_URL
- Fluid Compute enabled for efficient execution
- Contentful space with the supported content types
- Set up your Contentful environment variables in Vercel
- Enable Fluid Compute in your Vercel project settings
- For Pro/Enterprise accounts, adjust
maxDuration
to 800 inapp/[transport]/route.ts
- Deploy using the Next.js MCP template
{
"tool": "query-blog-posts",
"parameters": {
"limit": 5
}
}
{
"tool": "search-content",
"parameters": {
"query": "hackathon",
"contentTypes": ["hackathon", "meeting"],
"limit": 3
}
}
{
"tool": "query-eboard-members",
"parameters": {
"memberType": "current"
}
}
Use the included test client to verify your deployment:
node scripts/test-client.mjs https://your-deployment-url.vercel.app
- Framework: Next.js with App Router
- MCP Adapter:
@vercel/mcp-adapter
- CMS: Contentful
- Validation: Zod schemas
- Transport: HTTP and SSE (Server-Sent Events)
- Maximum Duration: 60 seconds per request
The server exposes detailed schema information through the contentful-schema
resource, including field definitions for:
- Rich text content and media assets
- Date/time fields and status enums
- Relationship fields between content types
- Localization and metadata fields
This makes it easy for AI assistants to understand your content structure and generate appropriate queries.