npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-api-tester

v0.1.2

Published

A Model Context Protocol (MCP) server for testing APIs and generating TypeScript types

Readme

MCP API Tester Server

这是一个基于 Model Context Protocol (MCP) 的 API 测试工具服务器。它可以测试任意 HTTP API 并自动生成 TypeScript 类型定义。

安装

全局安装

npm install -g mcp-api-tester

本地安装

npm install mcp-api-tester

从源码安装

git clone https://github.com/xingonliu/api-tester
cd mcp-api-tester
npm install
npm run build

使用方法

作为 npm 包使用

安装后,你可以通过以下方式运行:

# 全局安装后
mcp-api-tester

# 或者使用 npx
npx mcp-api-tester

# 本地安装后
npx mcp-api-tester

开发模式

1. HTTP模式

npm run dev

服务器将在 http://localhost:3000/mcp 运行

2. stdio模式(MCP标准方式)

npm run dev:stdio

3. 构建生产版本

npm run build
node dist/stdio-server.js

MCP客户端配置

要连接到这个服务器,在MCP客户端配置中添加:

全局安装后

{
  "mcpServers": {
    "api-tester": {
      "command": "mcp-api-tester"
    }
  }
}

本地安装或直接使用

{
  "mcpServers": {
    "api-tester": {
      "command": "node",
      "args": ["path/to/dist/stdio-server.js"]
    }
  }
}

使用 npx

{
  "mcpServers": {
    "api-tester": {
      "command": "npx",
      "args": ["mcp-api-tester"]
    }
  }
}

工具功能

apiTester 工具

  • 功能: 测试任意HTTP API并生成TypeScript类型定义
  • 输入: URL、HTTP方法、请求头、请求体等
  • 输出: API响应数据和自动生成的TypeScript接口

文件结构

├── src/
│   ├── index.ts          # HTTP服务器版本
│   ├── stdio-server.ts   # stdio服务器版本(MCP标准)
│   ├── tools/
│   │   └── apiTester.ts  # API测试工具实现
│   └── utils/
│       └── quicktypeGen.ts # TypeScript类型生成工具
├── dist/                 # 编译后的JavaScript文件
└── mcp-config.json      # MCP客户端配置示例

现在你的MCP服务器应该可以正常工作了!🎉