AM

anggasct/mcp-insomnia

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

27 stars 6 forks 质量 81 趋势 31MIT

MCP-Insomnia 是一个用于创建和管理兼容 Insomnia 的 API 集合、请求和环境的 MCP 服务器。

概览

MCP-Insomnia 是一个 MCP(模型上下文协议)服务器,使 AI 代理能够创建和管理兼容 Insomnia 格式的 API 集合。该服务器提供管理可导出至 Insomnia 的集合、请求和环境的工具。 使用mcp-insomnia有三种方式。 你可以直接用npx运行mcp-insomnia,无需全局安装。 克隆仓库并构建项目。 - create_collection - 创建新集合/工作区 - list_collections - 列出所有集合 - get_collection_detail - 获取集合的完整详细信息和统计数据 - export_collection - 将集合导出为JSON格式 - create_folder - 在集合内创建文件夹 - list_requests - 列出所有请求,可选地按集合筛选 - get_request - 获取特定请求的完整详细信息 - create_request_in_collection - 创建新请求 - update_request - 更新现有请求 - delete_request - 删除请求 - execute_request - 执行存储在MCP的......

概述(AI 翻译)

MCP-Insomnia 是一个 MCP(模型上下文协议)服务器,使 AI 代理能够创建和管理兼容 Insomnia 格式的 API 集合。该服务器提供管理可导出至 Insomnia 的集合、请求和环境的工具。

安装与使用

先决条件

  • Node.js 18+
  • NPM或纱线

使用mcp-insomnia有三种方式。

1.推荐使用NPX运行

你可以直接用 npx 运行 mcp-insomnia,无需全局安装。

配置:

2.从 NPM 全局安装

用npm全局安装包。

安装:

配置:

3.从源码安装

克隆仓库并构建项目。

安装:

配置:

可用工具

藏品管理

  • create_collection - 创建新的集合/工作区
  • list_collections - 列出所有集合
  • get_collection_detail - 获取集合的完整细节和统计数据
  • export_collection - 导出集合为JSON格式

文件夹管理

  • create_folder - 在集合内创建文件夹

请求管理

  • list_requests - 列出所有请求,可按集合过滤

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP-Insomnia

MCP-Insomnia is an MCP (Model Context Protocol) server that enables AI agents to create and manage API collections in Insomnia-compatible format. This server provides tools for managing collections, requests, and environments that can be exported to Insomnia.

Installation and Usage

Prerequisites

  • Node.js 18+
  • npm or yarn

There are three ways to use mcp-insomnia.

You can run mcp-insomnia directly using npx without a global installation.

Configuration:

{
  "mcpServers": {
    "insomnia": {
      "command": "npx",
      "args": ["-y", "mcp-insomnia"]
    }
  }
}

2. Install Globally from NPM

Install the package globally using npm.

Installation:

npm install -g mcp-insomnia

Configuration:

{
  "mcpServers": {
    "insomnia": {
      "command": "mcp-insomnia"
    }
  }
}

3. Install from Source

Clone the repository and build the project.

Installation:

git clone https://github.com/anggasct/mcp-insomnia.git
cd mcp-insomnia
npm install
npm run build

Configuration:

{
  "mcpServers": {
    "insomnia": {
      "command": "node",
      "args": ["/path/to/mcp-insomnia/dist/index.js"]
    }
  }
}

Available Tools

Collection Management

  • create_collection - Create new collection/workspace
  • list_collections - List all collections
  • get_collection_detail - Get full details and statistics of a collection
  • export_collection - Export collection to JSON format

Folder Management

  • create_folder - Create folder within collection

Request Management

  • list_requests - List all requests, optionally filter by collection
  • get_request - Get full details of a specific request
  • create_request_in_collection - Create new request
  • update_request - Update existing request
  • delete_request - Delete request
  • execute_request - Execute an MCP-stored request and return the response (supports environment resolution, timeouts, and response size limits — see Request execution)
  • get_request_history - Get execution history of a request (up to 20 entries per request)

Import Tools

  • import_from_curl - Parse cURL command into a request
  • import_from_postman - Import Postman Collection (v2.1) JSON
  • import_from_openapi - Import OpenAPI 3.x or Swagger 2.x JSON
  • import_from_insomnia_export - Import collections from a standard Insomnia V4 export file

Utility Tools

  • generate_code_snippet - Generate a code snippet for a request. Requires requestId and target. Supported targets: c, clojure, csharp, go, http, java, javascript, kotlin, node, objc, ocaml, php, powershell, python, ruby, shell, swift. Optional client selects a library (e.g. axios for javascript, curl for shell).

Insomnia Direct Integration (NeDB)

在 GitHub 查看完整 README

安装

npx -y mcp-insomnia
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "insomnia": { "command": "npx", "args": ["-y", "mcp-insomnia"] } } }