Example Next.js MCP Server
Provides a read-only check_database tool that uses Prisma to verify database connectivity.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Example Next.js MCP Serverlist the available tools on the MCP server"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Rejectionism CampaignOS
The operational headquarters for REJECTIONISM, the satirical art movement built around rejection.
SECURITY:
/adminand the MCP endpoints require authentication with a single shared credential (see ADR 0003). ConfigureCAMPAIGNOS_PASSWORD(32–256 chars) for admin login and MCP Bearer access; missing or invalid configuration fails closed.
Documentation
Related MCP server: Example Next.js MCP Server
Architecture Overview
CampaignOS exposes two primary interfaces powered by the same shared server-only domain service layer (lib/campaign/) and PostgreSQL database:
Admin Web Interface (
/admin):Operations Command Dashboard (Now, Next, Blocked, Missing Assets, Websites, Decisions, Activity feed).
Filterable Visual Asset Library (
/admin/assets) with raster previews, format placeholders, and storage badges.Asset Revisions & Representations management (
/admin/assets/[id]) with primary representation switcher and external URL appends.Single-use capability Upload Links management (
/admin/upload-links) with one-time raw link display and regeneration.Admin Bulk Ingestion (
/admin/assets/upload) with grouping mode selection and direct multi-row Blob uploads.Global Search (
/admin/search) across all 8 registers and polymorphic tag associations.Management screens for Work Items, Canon, Decisions, Websites, Content Pieces, Contacts, and CampaignMemory (
/admin/memory).
Remote MCP Server (
/api/mcpand legacy/mcp):Stateless Model Context Protocol endpoint exposing 55 tools across all registers, diagnostics, uploads, relationships, tags, search, and the durable cross-tool
CampaignMemory(remember / update / supersede / archive / get / list / recall / get-context).
Public Upload Portal (
/upload/[token]):Capability-authorized, unauthenticated contributor submission page with real-time Blob uploads, server-side format/dimension verification, and atomic finalization.
Environment Configuration
Configure the following five environment variables:
# PostgreSQL connection string for Prisma pg adapter
MCP_PRISMA_DATABASE_URL=postgresql://user:password@localhost:5432/campaignos
# Disposable PostgreSQL database URL for integration tests (must differ from operational URL)
TEST_MCP_PRISMA_DATABASE_URL=postgresql://user:password@localhost:5432/campaignos_test
# Shared credential: admin login password and MCP Bearer token (32-256 characters)
CAMPAIGNOS_PASSWORD=generate-a-long-random-credential
# Server-only private Vercel Blob read/write token
BLOB_READ_WRITE_TOKEN=vercel_blob_rw_xxxxxxxxxxxx
# Application origin used for auth and capability URL construction (HTTPS in production)
CAMPAIGNOS_BASE_URL=http://localhost:3000Local Development Quick Start
# 1. Install dependencies
pnpm install
# 2. Generate Prisma client
pnpm db:generate
# 3. Apply migrations to your database
pnpm db:deploy
# 4. Backfill legacy asset representations (idempotent)
pnpm db:backfill-assets
# 5. Seed canonical Rejectionism data
pnpm db:seed
# 6. Start development server
pnpm devVisit:
Admin Dashboard:
http://localhost:3000/adminGlobal Search:
http://localhost:3000/admin/searchAsset Library:
http://localhost:3000/admin/assetsUpload Links:
http://localhost:3000/admin/upload-linksCampaignMemory:
http://localhost:3000/admin/memoryHealth Diagnostic:
http://localhost:3000/api/healthMCP Endpoint:
http://localhost:3000/api/mcp
Connecting AI Clients (OpenAI Codex, Claude Desktop, Cursor)
MCP requests require Authorization: Bearer <CAMPAIGNOS_PASSWORD>.
{
"mcpServers": {
"rejectionism-campaign-os": {
"url": "http://localhost:3000/api/mcp",
"headers": {
"Authorization": "Bearer <CAMPAIGNOS_PASSWORD>"
}
}
}
}Running Test and Verification Suites:
# Run unit tests
pnpm test
# Run MCP protocol suite
pnpm test:mcp --origin=http://localhost:3000
# Run functional release verification gate
pnpm verify:functional --origin=http://localhost:3000
# Run smoke client
pnpm test:client -- http://localhost:3000This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA drop-in MCP server implementation for Next.js projects using Vercel MCP Adapter, allowing developers to integrate model context protocol functionality with custom tools, prompts, and resources.-
- AlicenseNot gradedqualityDmaintenanceA drop-in Model Context Protocol server implementation for Next.js projects that enables AI tools, prompts, and resources integration using the Vercel MCP Adapter.MIT
- AlicenseNot gradedqualityDmaintenanceA template for deploying Model Context Protocol servers as Next.js routes using the mcp-handler adapter, enabling easy integration of MCP tools, prompts, and resources into any Next.js application.MIT
- AlicenseNot gradedqualityDmaintenanceAn example MCP server using mcp-handler to integrate MCP tools, prompts, and resources into any Next.js project.MIT