home / mcp / insomnia mcp server

Insomnia MCP Server

Provides tools to create and manage Insomnia-compatible API collections via MCP, enabling import/export and synchronization with the Insomnia app.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "anggasct-mcp-insomnia": {
      "command": "npx",
      "args": [
        "mcp-insomnia"
      ]
    }
  }
}

You can use this MCP server to create, manage, and export Insomnia-compatible API collections. It lets AI agents build and edit collections, import data from various sources, and sync changes with the Insomnia application, making it easy to generate ready-to-use API workspaces.

How to use

Install and run the MCP server via any of the supported MCP runtimes. You can use it directly with a client that speaks MCP by starting one of the available server configurations, then manage collections, folders, and requests through MCP commands. You can pull data from Insomnia or OpenAPI sources, edit content with MCP tools, and push changes back to Insomnia when you are ready.

How to install

Prerequisites: You need Node.js 18 or newer and npm or yarn installed on your system.

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

Additional notes

Data storage is separated into MCP work area and the Insomnia App database. MCP work data is kept under a local MCP folder and is independent from the Insomnia app until you explicitly sync changes. Use this separation to safely build, test, and refine collections before syncing.

Notes on workflow

If you are creating or modifying content, pull data from Insomnia or an OpenAPI source, edit with MCP tools, and then publish by syncing changes back to Insomnia. If you only need to run existing requests, execute them directly through the MCP workflow or use dedicated execution commands from your client.

Available tools

create_collection

Create a new Insomnia collection/workspace to organize requests and environments.

list_collections

List all existing Insomnia collections to understand current workspace structure.

export_collection

Export a collection to JSON format for sharing or backup.

create_folder

Create a folder inside a collection to organize requests more effectively.

create_request_in_collection

Add a new request to a specific collection or folder.

update_request

Modify the details of an existing request, such as URL, headers, or body.

delete_request

Remove a request from a collection.

execute_request

Run a request and view the response, including status, headers, and body.

generate_code_snippet

Generate a code snippet for a request in various programming languages or frameworks.

import_from_curl

Parse a curl command into a corresponding Insomnia request.

import_from_postman

Import a Postman Collection (v2.1) JSON into Insomnia-compatible format.

import_from_openapi

Import an OpenAPI/Swagger (v3.0) JSON to generate collections and requests.

import_from_insomnia_export

Import collections from a standard Insomnia V4 export file.

list_insomnia_projects

List all projects/teams from the local Insomnia application database (macOS).

list_insomnia_collections

List all workspaces/collections from the local Insomnia database.

get_insomnia_collection

Fetch full details of a specific Insomnia workspace.

get_insomnia_request

Fetch full details of a specific Insomnia request.

sync_from_insomnia

Import a workspace from Insomnia into MCP.

sync_all_from_insomnia

Import all Insomnia workspaces into MCP.

sync_to_insomnia

Export an MCP collection back to Insomnia.

execute_insomnia_request

Execute a request directly from Insomnia with environment support.

set_environment_variable

Set an environment variable within the MCP environment store.

get_environment_variables

Retrieve all environment variables managed by MCP.