qruiq-mcp-init

Integrates an MCP server into a Next.js app with OAuth2 and Streamable HTTP.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/qruiqai/qruiq-skills --skill qruiq-mcp-init
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qruiq-mcp-init
Source: https://github.com/qruiqai/qruiq-skills/tree/main/skills/qruiq-mcp-init
Command: npx skills add https://github.com/qruiqai/qruiq-skills --skill qruiq-mcp-init

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill adds a production-ready MCP (Model Context Protocol) server inside a Next.js app, creating the MCP endpoint, Dynamic Client Registration, tool scaffolding, and a branding favicon to enable seamless AI client integrations.

Core Features & Use Cases

  • MCP endpoint and transport: creates app/api/mcp with stateless WebStandard Streamable HTTP transport.
  • Dynamic Client Registration: adds app/oauth/register for MCP clients to register before OAuth flows.
  • Tool scaffolding: provides lib/mcp-server.ts skeleton populated with guidance for per-user tools and safe defaults.
  • OAuth metadata integration: updates discovery data with registration_endpoint.
  • Branding and prerequisites: ensures public/favicon.ico exists and instructions for prerequisites are provided.

Quick Start

Use this skill to install the MCP SDK, copy template files, replace placeholders, and start your app to enable MCP endpoints and registration flow.

Frequently Asked Questions about qruiq-mcp-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an MCP server to a Next.js app?

Adding an MCP server to a Next.js app involves integrating a production-ready endpoint with stateless Streamable HTTP transport and OAuth2 authentication. This exposes your app's tools to AI clients by creating the /api/mcp route for connectivity.

How does dynamic client registration work for MCP servers?

Dynamic client registration for MCP servers works by providing an /oauth/register endpoint where MCP clients register before initiating OAuth flows. This endpoint updates your OAuth metadata discovery data to streamline the client onboarding process.

Do I need a Prisma OAuthClient model to support MCP connectivity?

Yes, a Prisma OAuthClient model and an existing authenticateRequest helper are required to support MCP connectivity in a Next.js project. These prerequisites manage dynamic client registration and secure the MCP endpoints.

Can I use a Next.js MCP server with Claude.ai and ChatGPT?

Yes, you can use a Next.js MCP server with Claude.ai and ChatGPT. The server applies to Next.js projects requiring MCP connectivity across Claude.ai, ChatGPT, Gemini, Cursor, or any MCP client, enabling broad AI tool exposure.

What is the best way to expose per-user tools through an MCP endpoint?

The best way to expose per-user tools through an MCP endpoint is using a tool scaffold populated with safe defaults and guidance. This skeleton file structure within your MCP server defines tool availability based on authenticated user context.

Why does my Next.js MCP integration require OAuth discovery endpoints?

Your Next.js MCP integration requires OAuth discovery endpoints to enable dynamic client registration and secure authentication flows. Without these endpoints and an authenticateRequest helper, MCP clients cannot properly register or access the /api/mcp route.