Skip to main content
Glama

Next.js MCP Server

by vertile-ai

Next.js MCP 服务器

一个实用工具,可分析您的 Next.js 应用程序路由并提供有关它们的详细信息。

演示

路由器分析演示

概述

  • get-routers-info

    路由器分析器会扫描您的 Next.js 应用目录结构并提取有关所有 API 路由的信息,包括:

    • API 路径

    • HTTP 方法(GET、POST、PUT、DELETE 等)

    • 请求参数

    • 状态代码

    • 请求和响应架构

这对于文档、测试或与 API 管理工具集成特别有用。

安装

npm install next-mcp-server

或者如果你使用 pnpm:

pnpm add next-mcp-server

用法

命令行

您可以直接运行 mcp 服务器:

npm run build node dist/index.js

Docker

docker build -t mcp/next -f Dockerfile . docker run mcp/next -d

输出

该工具会生成有关每条路线的详细信息:

[ { "filePath": "/path/to/your/app/api/test/route.ts", "implementationPath": "/path/to/your/app/api/test/route.ts", "apiPath": "/api/test", "handlers": [ { "method": "GET", "path": "/api/test", "functionSignature": "export async function GET(request: Request)", "description": "Get test data", "parameters": [], "statusCodes": [200] }, { "method": "POST", "path": "/api/test", "functionSignature": "export async function POST(request: Request)", "description": "Create test data", "parameters": [], "requestBodySchema": "{ name: string }", "statusCodes": [201, 400] } ] } ]

发展

运行测试:

node run-router-test.js

工作原理

该工具:

  1. 扫描 Next.js 应用目录结构以查找路由文件

  2. 分析每个路由文件以提取 HTTP 方法、路径、参数等。

  3. 从评论中提取文档

  4. 返回所有 API 路由的结构化表示

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

一个实用工具,用于分析 Next.js 应用程序路由并提供有关 API 路径、HTTP 方法、参数、状态代码和请求/响应模式的详细信息。

  1. 演示
    1. 概述
      1. 安装
        1. 用法
          1. 命令行
          2. Docker
        2. 输出
          1. 发展
            1. 工作原理
              1. 执照

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  Enables real-time communication between applications and AI models using the Model Context Protocol, supporting features like custom tools and multiple transport options for Next.js applications.
                  Last updated -
                  30,136
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  Routes requests to multiple downstream Model Context Protocol servers and provides a LangGraph.js-based agent with RAG capabilities for development assistance.
                  Last updated -
                • A
                  security
                  F
                  license
                  A
                  quality
                  Enables AI assistants to access Ramp's developer documentation and API schemas through natural language queries. Provides contextual answers about API endpoints, authentication methods, data relationships, and implementation patterns for developers building on Ramp's platform.
                  Last updated -
                  4
                • A
                  security
                  F
                  license
                  A
                  quality
                  Enables efficient extraction of specific data from JSON APIs using JSONPath patterns, reducing token usage by up to 99% compared to fetching entire responses. Supports single and batch operations for both JSON extraction and raw text retrieval from URLs.
                  Last updated -
                  4
                  1

                View all related MCP servers

                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/vertile-ai/next-mcp-server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server