Next.js MCP Server
Headless MCP-Nutzung (aus der Registry) mit Next.js
Verwendet @vercel/mcp-adapter mit einem konfigurierbaren MCP-Register
Bereitgestellte URL
Diese Anwendung wird bereitgestellt unter: https://nextjs-mcp-use.vercel.app
Related MCP server: Example Next.js MCP Server
Merkmale
MCP-Registrierung : Konfigurieren Sie mehrere MCP-Server in einer einzigen JSON-Datei
GitHub Actions : Testen und überwachen Sie Ihre API-Endpunkte mit geplanten und manuellen Workflows
Fehlerbehandlung : Sanfte Behandlung von Timeouts und Verbindungsfehlern
Umgebungsvariablen : Konfigurieren Sie Umgebungsvariablen für jeden MCP-Server
MCP-Registrierung
Die MCP-Registrierung ist eine JSON-Konfigurationsdatei, die Informationen zu allen verfügbaren MCP-Servern speichert. Jeder Server kann aktiviert oder deaktiviert werden und über eigene Umgebungsvariablen verfügen.
Die Registrierung befindet sich unter config/mcp-registry.json und hat die folgende Struktur:
{
"server-name": {
"url": "http://localhost:3002/sse",
"enabled": true,
"env": {
"API_KEY": "your-api-key"
}
},
"another-server": {
"url": "https://example.com/sse",
"enabled": false
}
}Verwendung
Diese Beispiel-App verwendet den Vercel MCP-Adapter , mit dem Sie einen MCP-Server in eine Gruppe von Routen in jedem Next.js-Projekt einfügen können.
Aktualisieren Sie app/[transport]/route.ts mit Ihren Tools, Eingabeaufforderungen und Ressourcen gemäß der MCP TypeScript SDK-Dokumentation .
API-Endpunkte
Chat-API :
/api/chat– Streaming-Chat-EndpunktCompletions-API :
/api/completions– Endpunkt für nicht gestreamte Chat-Completions
Testen der API
Sie können die API-Endpunkte mit dem bereitgestellten Testskript testen:
# Test the chat endpoint
npm run test:chat -- --message "Your message here"
# Test the completions endpoint
npm run test:completions -- --message "Your message here"
# Test with a custom URL
npm run test:chat -- --url http://localhost:3000/api/chat --message "Your message here"GitHub-Aktionen
Dieses Projekt umfasst GitHub Actions-Workflows zum Testen und Überwachen der API-Endpunkte. Weitere Informationen finden Sie in der Datei .github/workflows/README.md .
Hinweise zum Ausführen auf Vercel
Um den SSE-Transport zu verwenden, ist ein Redis erforderlich, das unter
process.env.REDIS_URLan das Projekt angehängt ist.Stellen Sie sicher, dass Fluid Compute für eine effiziente Ausführung aktiviert ist
Nachdem Sie Fluid Compute aktiviert haben, öffnen Sie
app/route.tsund passen SiemaxDurationauf 800 an, wenn Sie ein Vercel Pro- oder Enterprise-Konto verwenden
Beispielclient
scripts/test-client.mjsenthält einen Beispielclient zum Ausprobieren von Aufrufen.
node scripts/test-client.mjs https://nextjs-mcp-use.vercel.appTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The official MCP Server for the Mux API
- ArcjetOAuthcom.arcjet
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
MCP server for Vonage API documentation, code snippets, tutorials, and troubleshooting.
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 sample implementation of a Model Context Protocol server using Next.js and the Vercel MCP Adapter, allowing developers to create AI assistants with custom tools and resources.MIT
- AlicenseNot gradedqualityDmaintenanceA sample implementation of Model Context Protocol server using Next.js and the Vercel MCP Adapter, allowing developers to create custom AI agent backends with tools, prompts, and resources.MIT
- AlicenseNot gradedqualityDmaintenanceA basic MCP server implementing a weather tool using Next.js and the Vercel MCP adapter.71ISC
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/cameronking4/nextjs-mcp-use'
If you have feedback or need assistance with the MCP directory API, please join our Discord server