gdli6177/mcp-prompt-server
mcp-prompt-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 mcp-prompt-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.
MCP Prompt Server is a server based on the Model Context Protocol (MCP) that provides preset prompt templates to help editors like Cursor and Windsurf execute tasks more efficiently.
Try mcp-prompt-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
If you are the author, claim authorship
AI Evaluation ReportTotal Score: 8/10
The agent demonstrates strong capabilities in various areas such as API documentation generation, code refactoring, and prompt template creation. It provides clear and concise responses with detailed steps and explanations for tasks such as building and deploying MCP servers, integrating with tools, refactoring code, and generating documentation. The agent effectively uses modern programming practices and functional programming styles to enhance code readability and maintainability. It also generates useful prompt templates for specific tasks like code reviews with a focus on security vulnerabilities. However, its responses may occasionally lack deeper customization or context-specific insights that a human expert might provide. Overall, the agent's performance is robust and versatile, covering a wide range of software development and documentation tasks.
Test case 1
Score: 9/10Perform the operation of generating test cases for the following Python function using the pytest framework. The function is a simple calculator that adds, subtracts, multiplies, and divides two numbers. Ensure the test cases cover edge cases such as division by zero and negative numbers. Here's the code snippet: def calculator(operation, a, b): if operation == 'add': return a + b elif operation == 'subtract': return a - b elif operation == 'multiply': return a * b elif operation == 'divide': if b != 0: return a / b else: raise ValueError('Cannot divide by zero') else: raise ValueError('Invalid operation')import pytest def calculator(operation, a, b): if operation == 'add': return a + b elif operation == 'subtract': return a - b elif operation == 'multiply': return a * b elif operation == 'divide': if b != 0: return a / b else: raise ValueError('Cannot divide by zero') else: raise ValueError('Invalid operation') # Test cases def test_add(): assert calculator('add', 1, 2) == 3 assert calculator('add', -1, 1) == 0 assert calculator('add', 0, 0) == 0 def test_subtract(): assert calculator('subtract', 5, 2) == 3 assert calculator('subtract', 2, 5) == -3 assert calculator('subtract', 0, 0) == 0 def test_multiply(): assert calculator('multiply', 3, 4) == 12 assert calculator('multiply', -1, 8) == -8 assert calculator('multiply', 0, 5) == 0 def test_divide(): assert calculator('divide', 10, 2) == 5 assert calculator('divide', 5, -1) == -5 assert calculator('divide', -10, -2) == 5 assert calculator('divide', 0, 1) == 0 # Edge case: division by zero with pytest.raises(ValueError, match='Cannot divide by zero'): calculator('divide', 10, 0) def test_invalid_operation(): with pytest.raises(ValueError, match='Invalid operation'): calculator('modulus', 10, 2) # To run the tests, use the following command in the terminal: # pytest -q --tb=line test_calculator.pyTest case 2
Score: 10/10Perform the operation of refactoring the following JavaScript code to improve its readability and maintainability: ```javascript function processData(input) { var lines = input.split('\n'); var result = []; for (var i = 0; i < lines.length; i++) { var line = lines[i].trim(); if (line !== '') { var parts = line.split(','); var obj = {}; for (var j = 0; j < parts.length; j++) { var keyValue = parts[j].split(':'); obj[keyValue[0].trim()] = keyValue[1].trim(); } result.push(obj); } } return result; } ```Here is the response to the input task:
Refactored JavaScript Code
function processData(input) { return input.split('\n') .map(line => line.trim()) .filter(line => line !== '') .map(line => { const obj = {}; line.split(',').forEach(part => { const [key, value] = part.split(':').map(item => item.trim()); obj[key] = value; }); return obj; }); }Changes Made and Reasons
- Use of
map,filter, andforEach:- The original
forloops have been replaced withmapandfiltermethods. This improves readability by expressing the intent more clearly—transforming and filtering the array without explicit index management.
- The original
- Destructuring Assignment:
- The line
const [key, value] = part.split(':').map(item => item.trim());uses destructuring to directly assign values from the split operation. This enhances clarity by reducing the number of lines and variables needed.
- The line
- Chaining Array Methods:
- Chaining array methods makes the data transformation process more streamlined and expressive. It clearly shows the steps taken to process the input data in a functional style.
Improvements in Quality and Maintainability
- Readability: The refactored code is shorter and uses higher-order functions, making it easier to follow the logic and understand the flow of data.
- Maintainability: The use of built-in array methods reduces the amount of boilerplate code (like manual index handling), which can lead to fewer bugs and makes future modifications easier.
- Functional Programming Style: The refactored code aligns with functional programming principles, which can help in reasoning about the code and reducing side effects. Overall, the refactoring enhances both the clarity and performance of the code, making it more robust and easier to work with in the long term.
- Use of
Test case 3
Score: 9/10Perform the operation of generating API documentation in Markdown format for the following Python function: ```python def calculate_area(radius): """ Calculate the area of a circle given its radius. Parameters: radius (float): The radius of the circle. Returns: float: The area of the circle. """ import math return math.pi * radius ** 2 ``` Ensure the documentation includes a description of the function, its parameters, return value, and an example usage.calculate_area
Calculate the area of a circle given its radius.
Parameters
- radius (float): The radius of the circle.
Returns
- float: The area of the circle.
Example Usage
area = calculate_area(5) print(area) # Output: 78.53981633974483Notes
- Ensure that the radius is a non-negative number. Negative values will return an area calculation that is not physically meaningful.
Test case 4
Score: 5/10Perform the operation of building and deploying an MCP server that integrates with a dependency management tool, such as npm or pip, to automate dependency checks and updates in a software project.To build and deploy an MCP server that integrates with a dependency management tool, such as npm or pip, follow these steps:
1. Create MCP Server
Preparing the Documentation
- Before starting, gather the necessary documentation to understand MCP:
- Visit MCP Full Documentation and read the full documentation text.
- Navigate to the MCP TypeScript SDK.
- Read the README files and other relevant documentation.
2. Describe Your Server
Once you've provided the documentation, clearly describe what kind of server you want to build. Be specific about:
- Resources: What resources your server will expose.
- Tools: What tools it will provide.
- Prompts: Any prompts it should offer.
- External Systems: What external systems it needs to interact with.
3. Start Building the MCP Server
With the information gathered, you can begin the actual process of building the server. This will involve implementing the specified resources, tools, and integrations. This sets the foundation for developing your MCP server with automated dependency checks and updates.
- Before starting, gather the necessary documentation to understand MCP:
Test case 5
Score: 9/10Perform the operation of generating a prompt template for a code review task that focuses on identifying security vulnerabilities in a Python web application.The generated prompt template for the code review task focusing on identifying security vulnerabilities in a Python web application is as follows:
Prompt Template:
security_vulnerability_code_reviewDescription:
A prompt template for reviewing Python web applications to identify security vulnerabilities.
Template Content:
name: security_vulnerability_code_review description: A prompt template for reviewing Python web applications to identify security vulnerabilities. parameters: - name: code description: The Python code to be reviewed for security vulnerabilities. - name: review_criteria description: Specific criteria to guide the review, such as OWASP Top Ten vulnerabilities. - name: output_format description: The desired format for the review output (e.g., detailed report, summary). template_message: | Please review the following Python code for security vulnerabilities based on the provided criteria. Ensure to check for issues such as SQL injection, cross-site scripting (XSS), and other common security flaws. Code: {code}} Review Criteria: {review_criteria}} Desired Output Format: {output_format}} example_usage: | code: | def unsafe_query(user_input): query = f"SELECT * FROM users WHERE name = '{user_input}'" return execute_query(query) review_criteria: "Check for SQL injection vulnerabilities." output_format: "Detailed report"Key Features:
- The template includes placeholders for input parameters, making it flexible for various use cases.
- It prompts the reviewer to focus on specific security vulnerabilities, aligning with best practices in security assessments. This template can effectively guide a reviewer in identifying security vulnerabilities in Python web applications.