
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@fractal-mcp/mcp-nextjs
Advanced tools
Next.js utilities for hosting Model Context Protocol (MCP) servers. This mirrors the functionality of @fractal-mcp/mcp-express
but targets Next.js applications.
npm install @fractal-mcp/mcp-nextjs
Create a Next.js API route using the pages router:
// pages/api/mcp.ts
import { FractalMCPServer } from '@fractal-mcp/mcp';
import { createNextApiHandler } from '@fractal-mcp/mcp-nextjs';
const mcpServer = new FractalMCPServer({ name: 'example', version: '1.0.0' });
// register tools ...
export default createNextApiHandler(mcpServer);
For projects using the newer app router you can proxy requests to the pages route:
// app/api/mcp/route.ts
import { NextRequest } from 'next/server';
export async function GET(req: NextRequest) {
return fetch(new URL('/api/mcp', req.url), { headers: req.headers });
}
export async function POST(req: NextRequest) {
return fetch(new URL('/api/mcp', req.url), {
method: 'POST',
headers: req.headers,
body: req.body,
});
}
The helpers defaultCorsMiddleware
and defaultAuthMiddleware
are available if you need more control.
FAQs
Next.js API utilities for MCP server hosting
The npm package @fractal-mcp/mcp-nextjs receives a total of 10 weekly downloads. As such, @fractal-mcp/mcp-nextjs popularity was classified as not popular.
We found that @fractal-mcp/mcp-nextjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.