Logo van MCP-Insomnia

MCP-Insomnia

Community
anggasct

MCP-Insomnia is an MCP server for creating and managing Insomnia-compatible API collections, requests, and environments.

Uitgeveranggasct
Repositorymcp-insomnia
TaalTypeScript
Forks
6
Sterren
26
Beschikbare tools
29
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    MCP-Insomnia biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 29 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    26 sterren en 6 forks in de gekoppelde repository.

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.

1. Run with NPX (Recommended)

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

Configuration:

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

2. Install Globally from NPM

Install the package globally using npm.

Installation:

bash
npm install -g mcp-insomnia

Configuration:

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

3. Install from Source

Clone the repository and build the project.

Installation:

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

Configuration:

json
{
  "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)

Interact directly with the local Insomnia application database (macOS, Linux, Windows).

  • list_insomnia_projects - List all projects/teams from Insomnia
  • list_insomnia_collections - List all workspaces/collections from Insomnia
  • get_insomnia_collection - Get full details of a specific Insomnia workspace
  • get_insomnia_request - Get full details of a specific Insomnia request
  • sync_from_insomnia - Import a workspace from Insomnia to MCP
  • sync_all_from_insomnia - Import all workspaces from Insomnia to MCP
  • sync_to_insomnia - Export an MCP collection back to Insomnia
  • execute_insomnia_request - Execute a request directly from Insomnia without syncing (supports environment resolution and timeouts — see Request execution)

Environment Management

  • set_environment_variable - Set environment variable
  • get_environment_variables - Get environment variables

When executing requests, environment variables are merged in layers (later layers override earlier ones):

MCP collections (execute_request):

  1. Workspace/base environments attached to the collection
  2. Sub-environment (environmentId, if provided)
  3. Folder environments along the request's ancestor chain
  4. overrideVariables (per-call overrides)
  5. environmentVariables (legacy final override layer)

Insomnia app (execute_insomnia_request):

  1. Global environment (project level)
  2. Base environment (workspace level)
  3. Sub-environment (environmentId, if provided)
  4. Folder environments along the request's ancestor chain
  5. overrideVariables (per-call overrides)

Request execution

Both execution tools accept optional runtime parameters:

Parameterexecute_requestexecute_insomnia_requestDescription
requestId✓✓ID of the request to run
environmentId✓✓Sub-environment ID for variable substitution
overrideVariables✓✓Per-call variable overrides (e.g. {"token": "abc123"})
environmentVariables✓Legacy final override layer for MCP collections
timeoutMs✓✓Request timeout in ms (default 30000; set <= 0 for no timeout — MCP cancellation still applies)
maxResponseBytes✓Max serialized response body size in tool output; exceeded bodies are truncated to a preview

Search & Statistics

  • search - Search across all collections, folders, and requests
  • get_stats - Get global statistics of all collections

Usage Examples

Create Collection

Create a new Insomnia collection named "API Testing" for testing endpoints

Add Request

Add GET request to "API Testing" Insomnia collection with:
- Name: Get Users
- URL: https://jsonplaceholder.typicode.com/users
- Headers: Content-Type: application/json

Set Environment Variable

Set Insomnia environment variable "baseUrl" with value "https://api.example.com" for "API Testing" collection

Execute Request

Execute "Get Users" request using the configured environment variables

With optional parameters:

Execute request req_abc123 with environmentId env_xyz, timeout 15000ms, and override baseUrl to https://staging.api.example.com

Generate Code Snippet

Generate a code snippet for request req_abc123 in javascript using axios

Data Storage

Data is stored in two locations:

  1. MCP Storage: ~/.mcp-insomnia/collections.json

    • Working area for building/editing collections before syncing
    • Changes here do NOT affect the Insomnia App until synced
    • Ideal for generating new collections, importing from OpenAPI, or mass-refactoring
  2. Insomnia App Storage (NeDB)

    • The database used by Insomnia App
    • Changes here are visible in the App (may require restart)
    • Default paths:
      • macOS: ~/Library/Application Support/Insomnia
      • Linux: ~/.config/Insomnia
      • Linux (Flatpak): ~/.var/app/rest.insomnia.Insomnia/config/Insomnia
      • Windows: %APPDATA%/Insomnia

Custom Insomnia Data Directory

If Insomnia is installed in a non-default location, you can set the INSOMNIA_DATA_DIR environment variable to specify the path:

json
{
  "mcpServers": {
    "insomnia": {
      "command": "npx",
      "args": ["mcp-insomnia"],
      "env": {
        "INSOMNIA_DATA_DIR": "~/.var/app/rest.insomnia.Insomnia/config/Insomnia"
      }
    }
  }
}

Note: Flatpak installations on Linux are auto-detected — you only need INSOMNIA_DATA_DIR if your Insomnia data is in a truly custom location.

Recommended Workflow

Scenario A: Creating/Modifying Content

  1. Import/Fetch: Pull data from Insomnia (sync_from_insomnia or import_from_openapi)
  2. Edit: Modify requests/folders using MCP tools (create_request_in_collection, update_request)
  3. Publish: Sync changes back to Insomnia (sync_to_insomnia)

Scenario B: Running Existing Requests

  • Use execute_insomnia_request to run requests directly from Insomnia App without syncing

Contributing

Contributions are welcome! Bug fixes, new tools, and improvements are all appreciated.

bash
git clone https://github.com/anggasct/mcp-insomnia.git
cd mcp-insomnia
npm install
npm run build
npx @modelcontextprotocol/inspector node dist/index.js  # test via MCP Inspector

Fork the repo, create a branch from main, and open a PR. Use conventional commits (feat:, fix:, docs:, etc.).

Found a bug or have an idea? Open an issue.

License

MIT License

Changelog

See CHANGELOG.md for release history.

Installatie

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

Beschikbare tools

  • create_collection

    Create a new collection/workspace in Insomnia

  • list_collections

    List all collections and their structure

  • get_collection_detail

    Get full details and statistics of a specific collection

  • export_collection

    Export collection to JSON (Insomnia V4 format)

  • create_folder

    Create a folder to group requests within a collection

  • list_requests

    List all requests across collections. Optionally filter by collectionId.

  • get_request

    Get full details of a specific request by ID

  • get_request_history

    Get the execution history of a specific request

  • create_request_in_collection

    Create a new request within a specific collection/folder

  • update_request

    Update an existing request

  • delete_request

    Delete a request from a collection

  • execute_request

    Execute a request and get a response

  • set_environment_variable

    Set environment variables for a collection

  • get_environment_variables

    Get environment variables from a collection

  • import_from_insomnia_export

    Import collections from a standard Insomnia V4 export file

  • generate_code_snippet

    Generate a code snippet for a request in various languages/frameworks

  • import_from_curl

    Create a request from a cURL command

  • import_from_postman

    Import collections from a Postman Collection v2.1 JSON file

  • import_from_openapi

    Generate requests from OpenAPI/Swagger specification

  • list_insomnia_collections

    List all collections directly from Insomnia app (requires Insomnia to be installed)

  • list_insomnia_projects

    List all projects from Insomnia app

  • get_insomnia_collection

    Get a complete collection from Insomnia app by workspace ID

  • sync_from_insomnia

    Import a collection from Insomnia app into MCP storage

  • sync_to_insomnia

    Export a collection from MCP storage to Insomnia app

  • sync_all_from_insomnia

    Import all collections from Insomnia app into MCP storage

  • get_insomnia_request

    Get detailed request information directly from Insomnia

  • execute_insomnia_request

    Execute a request directly from Insomnia app without syncing. Supports environment variable substitution.

  • search

    Search for a keyword across all collections, folders, and requests

  • get_stats

    Get global statistics of all collections

Gebruik MCP-Insomnia MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra MCP-Insomnia is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg MCP-Insomnia toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van MCP-Insomnia.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "mcp-insomnia": {
      "command": "npx",
      "args": [
        "-y",
        "@anggasct/mcp-insomnia"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van MCP-Insomnia in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van MCP-Insomnia in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MCP-Insomnia gebruiken om me hiermee te helpen?
MCP-Insomnia
Zeker. Ik heb het gelezen.
Dit vond ik met MCP-Insomnia.

Veelgestelde vragen

Waarvoor wordt de MCP-server MCP-Insomnia gebruikt?

MCP-Insomnia is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik MCP-Insomnia MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je MCP-Insomnia gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom MCP-Insomnia MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als MCP-Insomnia verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik MCP-Insomnia MCP met TypingMind?

MCP-Insomnia werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt MCP-Insomnia MCP in TypingMind?

MCP-Insomnia biedt 29 MCP-tools die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om MCP-Insomnia MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als MCP-Insomnia authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇