vertile-ai/next-mcp-server
next-mcp-server is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.
If you are the rightful owner of next-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Next.js MCP Server is a tool designed to analyze and extract detailed information about API routes in a Next.js application.
Try next-mcp-server with chat:
Has a README
Github repo has a README.md.
Has a License
Github repo has license info.
Server can be inspected
View server inspector
Server schema can be extracted
Can get at lease one tool info from the README or server.
Online hosted on MCPHub
Can be automatically deployed by MCPHub.
Has social accounts
Do not have any social accounts.
Claimed by the author or certified by MCPHub
Connected with the author
AI Evaluation ReportTotal Score: 9/10
The agent demonstrates a strong capability in analyzing and presenting detailed information about the API routes in a Next.js project. It effectively uses the available tool to extract routing information and presents it in a clear, structured, and comprehensive manner. The agent excels in clarity, accuracy, and completeness, providing detailed descriptions, function signatures, and expected parameters for various endpoints. It also shows an ability to infer and articulate the purpose of each API endpoint, enhancing the usefulness of its responses. However, the agent's responses are limited to the scope of routing information and do not extend to other aspects of Next.js applications, such as component structure or state management. Overall, the agent performs exceptionally well within its defined capabilities.
Test case 1
Score: 9/10Can you list all the available API routes and their corresponding HTTP methods in the Next.js project located at `sample-nextjs-app`?Here is a list of all available API routes in the
sample-nextjs-appNext.js project, along with their corresponding HTTP methods:API Routes
-
Authentication
- Path:
/api/auth- Method:
POST- Description: Authenticates a user.
- Response Types:
- 200: OK - Successful request
- 400: Bad Request - Invalid request data
- 401: Unauthorized - Authentication required
- Method:
- Path:
-
Posts
- Path:
/api/posts- Method:
GET- Description: Retrieves a list of posts.
- Response Types:
- 200: OK - Successful request
- Method:
POST- Description: Creates a new post.
- Response Types:
- 201: Created - Resource created successfully
- 400: Bad Request - Invalid request data
- Method:
- Path:
-
Comments for a Post
- Path:
/api/posts/[id]/comments- Method:
GET- Description: Retrieves comments for a specific post.
- Method:
POST- Description: Adds a comment to a specific post.
- Method:
- Path:
-
Product Reviews
- Path:
/api/products/[id]/reviews- Method:
GET- Description: Retrieves reviews for a specific product.
- Method:
POST- Description: Adds a review for a specific product.
- Method:
- Path:
-
User by ID
- Path:
/api/users/[id]- Method:
GET- Description: Retrieves user information by ID.
- Method:
PUT- Description: Updates user information by ID.
- Method:
DELETE- Description: Deletes a user by ID.
- Method:
- Path:
-
Users
- Path:
/api/users- Method:
GET- Description: Retrieves a list of users.
- Response Types:
- 200: OK - Successful request
- Method:
POST- Description: Creates a new user.
- Response Types:
- 201: Created - Resource created successfully
- 400: Bad Request - Invalid request data
- Method:
- Path:
Summary
This project supports various operations for authentication, posts, comments, product reviews, and user management, each with specific HTTP methods and response types. If you need further details on any specific route or functionality, feel free to ask!
-
Test case 2
Score: 8/10What are the function signature and expected parameters for the `PUT` method on the `/api/users/[id]` endpoint in the `sample-nextjs-app` directory?The function signature and expected parameters for the
PUTmethod on the/api/users/[id]endpoint in thesample-nextjs-appdirectory are as follows:Function Signature
export async function PUT( request: NextRequest, { params }: { params: { id: string } } )Expected Parameters
-
request:
- Type:
NextRequest - Required: Yes
- Description: This parameter represents the HTTP request object containing information about the incoming request.
- Type:
-
params:
- Type:
{ id: string } - Required: Yes
- Description: This parameter contains route parameters. Specifically, it includes the
idof the user to be updated.
- Type:
Response Type
- The response type for this method is currently marked as Unknown, indicating that the specific response structure is not detailed in the provided information.
Status Codes
- The expected status codes for this endpoint are not specified in the current context, which may typically include codes like 200 (OK) for a successful update or 404 (Not Found) if the user with the specified id does not exist.
This structure allows for updating user information based on the provided
idparameter.-
Test case 3
Score: 9/10I need to implement user login. Could you check the `sample-nextjs-app` project and tell me what the authentication endpoint is and what status codes it might return for a `POST` request?In the
sample-nextjs-appproject, the authentication endpoint is defined at the following path:- Endpoint:
/api/auth - HTTP Method:
POST
Implementation Details
The function signature for handling the POST request is:
export async function POST(request: NextRequest)Possible Status Codes for a POST Request
When making a POST request to the authentication endpoint, the following status codes might be returned:
- 200 OK: The request was successful, and the user is authenticated.
- 400 Bad Request: The request data is invalid or not formatted correctly.
- 401 Unauthorized: Authentication is required, or the provided credentials are incorrect.
Summary
To implement user login, you would send a POST request to
/api/authwith the necessary authentication data (like username and password), and handle the response based on the status codes mentioned above.- Endpoint:
Test case 4
Score: 9/10How are comments handled for posts in the `sample-nextjs-app`? Specifically, what API endpoint is used to add a new comment to a post, and what does its handler function require?In the
sample-nextjs-app, comments for posts are handled via a dedicated API endpoint. Here are the specifics:API Endpoint for Adding a Comment
- Endpoint:
/api/posts/[id]/comments - HTTP Method:
POST
Handler Function Requirements
The handler function for the
POSTrequest at this endpoint requires the following:- Parameters:
- request (NextRequest): This is required and represents the incoming HTTP request.
- params (Object): This is also required and must contain:
- id (string): The identifier of the post to which the comment is being added.
Summary of Handler Function Signature
export async function POST( request: NextRequest, { params }: { params: { id: string } } )Considerations
- Ensure that valid data is sent in the request body as it will typically need to include comment details (though specifics on body structure aren't provided here).
- The response handling and potential status codes are not detailed, so it's advisable to implement error handling for scenarios like invalid data or unauthorized access.
This API structure allows for a modular approach to managing comments for individual posts, making it easier to scale and maintain.
- Endpoint:
Test case 5
Score: 8/10Please provide a complete overview of the API surface for the `sample-nextjs-app` project, including all paths, the methods they support, and their purpose.Here is a comprehensive overview of the API surface for the
sample-nextjs-appproject, detailing all the paths, the methods they support, and their purposes:API Overview
1. Authentication API
- Path:
/api/auth- Method:
POST - Purpose: To handle user authentication.
- Parameters:
request: The HTTP request object (required).
- Response Types:
- 200: OK - Successful authentication.
- 400: Bad Request - Invalid request data.
- 401: Unauthorized - Authentication required.
- Method:
2. Posts Comments API
- Path:
/api/posts/[id]/comments- Methods:
- GET
- Purpose: Retrieve comments for a specific post.
- Parameters:
request: The HTTP request object (required).params: Containsidof the post (required).
- POST
- Purpose: Add a new comment to a specific post.
- Parameters:
request: The HTTP request object (required).params: Containsidof the post (required).
- GET
- Methods:
3. Posts API
- Path:
/api/posts- Methods:
- GET
- Purpose: Retrieve a list of posts.
- Parameters:
request: The HTTP request object (required).
- Response Type:
- 200: OK - Successful request.
- POST
- Purpose: Create a new post.
- Parameters:
request: The HTTP request object (required).
- Response Types:
- 201: Created - Resource created successfully.
- 400: Bad Request - Invalid request data.
- GET
- Methods:
4. Product Reviews API
- Path:
/api/products/[id]/reviews- Methods:
- GET
- Purpose: Retrieve reviews for a specific product.
- Parameters:
request: The HTTP request object (required).params: Containsidof the product (required).
- POST
- Purpose: Add a new review for a specific product.
- Parameters:
request: The HTTP request object (required).params: Containsidof the product (required).
- GET
- Methods:
5. User API (Single User)
- Path:
/api/users/[id]- Methods:
- GET
- Purpose: Retrieve details of a specific user.
- Parameters:
request: The HTTP request object (required).params: Containsidof the user (required).
- PUT
- Purpose: Update a specific user's details.
- Parameters:
request: The HTTP request object (required).params: Containsidof the user (required).
- DELETE
- Purpose: Delete a specific user.
- Parameters:
request: The HTTP request object (required).params: Containsidof the user (required).
- GET
- Methods:
6. Users API (All Users)
- Path:
/api/users- Methods:
- GET
- Purpose: Retrieve a list of all users.
- Parameters:
request: The HTTP request object (required).
- Response Type:
- 200: OK - Successful request.
- POST
- Purpose: Create a new user.
- Parameters:
request: The HTTP request object (required).
- Response Types:
- 201: Created - Resource created successfully.
- 400: Bad Request - Invalid request data.
- GET
- Methods:
Summary
This API provides essential endpoints for user authentication, managing posts and comments, handling product reviews, and user management. Each endpoint supports specific HTTP methods, allowing for the retrieval, creation, updating, and deletion of resources. The responses include appropriate status codes for different outcomes, ensuring clarity in API interactions.
- Path: