mcp-server

Naveen-Automation/mcp-server

3.2

If you are the rightful owner of 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 dayong@mcphub.com.

The Playwright API MCP Server is a robust tool for HTTP API testing, leveraging the Model Context Protocol and Playwright for comprehensive request handling.

Tools
4
Resources
0
Prompts
0

MCP LOGO

API Testing Using MCP Server (End User Guide)

A ready-to-use Model Context Protocol (MCP) server for HTTP API testing, powered by Playwright. This guide helps you install, configure, and run the MCP server locally as an npm package.

📋 Table of Contents


🌟 Overview

The Playwright API MCP Server enables API testing via the Model Context Protocol. It supports GET, POST, PUT, and DELETE requests.



📋 Prerequisites

🚀 Setup

  1. Create a Node.js Project in VS Code:

    • Create a new folder with a meaningful name (e.g. my-project).
    • Open the folder in Visual Studio Code.
    • Launch the integrated terminal (via View > Terminal).
    • Choose your preferred shell (e.g. Git Bash, Command Prompt, or PowerShell).
    • Run the following command to initialise the project:
      npm init -y
      
    • This will generate a package.json file with default settings
  2. Install the MCP Server Package

    • Now, run the below command to install the mcp server package.
      npm i @automate-io/api-testing-mcp@latest
      

⚙️ Configurations

  1. Open your project folder in VS Code

  2. If the mcp.json file does not already exist, create it inside the root/.vscode/ directory. If the file is already present, you can skip this step

  3. Add the api-testing-mcp configuration under the servers key in the mcp.json file, as shown below

    {
      "servers": {
        "api-testing-mcp": {
          "type": "stdio",
          "command": "node",
          "args": ["node_modules/@automate-io/api-testing-mcp/dist/server.js"],
          "cwd": "${workspaceFolder}"
        }
      },
      "inputs": []
    }
    
  • ❗Important Note:If you are working in a monorepo, ensure the args field in your mcp.json file is correctly configured. Refer to the guide for detailed instructions.
    If your test code resides in a standalone repository, no changes are needed, you are good to go.

📖 Getting started with MCP testing

  1. Start the MCP Server
  • Click the highlighted start button in the mcp.json file as shown below to start the MCP server.


  1. Input the prompt
  • Open GitHub Copilot chat window in VS Code with Agent mode selected.
  • Enter a prompt that outlines the API you wish to test.

✅ Example scenarios and prompts for MCP server usage

  • : To test all endpoints in one go.
  • : To test a single endpoint.

⏭️ Upcoming enhancements

  • Implement schema validations for response payloads
  • Add reusable resources to support API testing workflows
  • Introduce predefined prompts to streamline common scenarios
  • Provide a sample HTML test report template to guide LLm about the layout and formatting
  • Refactor existing logic and implement robust error handling to improve reliability and maintainability

🔧 Troubleshooting

  • Server not running?
    Double-check your MCP client configuration.

  • Module not found?
    Reinstall the package:

    npm i @automate-io/api-testing-mcp@latest
    

🆘 Support



👍 Enjoy exploring and validating your APIs !