MCP-Insomnia

by anggasct

Not rated
GitHub

About

An MCP server for AI agents to create and manage API collections in Insomnia-compatible format.

Details

Author
anggasct
Categories
Developer Tools, API, Automation

Setup

Install MCP-Insomnia in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/anggasct/mcp-insomnia

Follow the installation instructions in the repository README, then restart your MCP client.

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.

There are three ways to usemcp-insomnia.

You can runmcp-insomniadirectly usingnpxwithout a global installation.

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

Clone the repository and build the project.

git clone https://github.com/anggasct/mcp-insomnia.git cd mcp-insomnia npm install npm run build
{ "mcpServers": { "insomnia": { "command": "node", "args": ["/path/to/mcp-insomnia/dist/index.js"] } } }

- 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

- create_folder- Create folder within collection

- 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 — seeRequest execution)
- get_request_history- Get execution history of a request (up to 20 entries per request)

- 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

- generate_code_snippet- Generate a code snippet for a request. RequiresrequestIdandtarget. Supported targets:c,clojure,csharp,go,http,java,javascript,kotlin,node,objc,ocaml,php,powershell,python,ruby,shell,swift. Optionalclientselects a library (e.g.axiosforjavascript,curlforshell).

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)

- 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):
- Workspace/base environments attached to the collection
- Sub-environment (environmentId, if provided)
- Folder environments along the request's ancestor chain
- overrideVariables(per-call overrides)
- environmentVariables(legacy final override layer)

Insomnia app(execute_insomnia_request):
- Global environment (project level)
- Base environment (workspace level)
- Sub-environment (environmentId, if provided)
- Folder environments along the request's ancestor chain
- overrideVariables(per-call overrides)

Both execution tools accept optional runtime parameters:

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

Create a new Insomnia collection named "API Testing" for testing endpoints
Add GET request to "API Testing" Insomnia collection with: - Name: Get Users - URL: https://jsonplaceholder.typicode.com/users - Headers: Content-Type: application/json
Set Insomnia environment variable "baseUrl" with value "https://api.example.com" for "API Testing" collection
Execute "Get Users" request using the configured environment variables
Execute request req_abc123 with environmentId env_xyz, timeout 15000ms, and override baseUrl to https://staging.api.example.com
Generate a code snippet for request req_abc123 in javascript using axios

-

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

- 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

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

{ "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 needINSOMNIA_DATA_DIRif your Insomnia data is in a truly custom location.
- Import/Fetch: Pull data from Insomnia (sync_from_insomniaorimport_from_openapi)
- Edit: Modify requests/folders using MCP tools (create_request_in_collection,update_request)
- Publish: Sync changes back to Insomnia (sync_to_insomnia)

- Useexecute_insomnia_requestto run requests directly from Insomnia App without syncing

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

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 frommain, and open a PR. Useconventional commits(feat:,fix:,docs:, etc.).

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

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

One remote MCP server for 500+ production APIs — Stripe, HubSpot, Postgres, Gmail, and more. OAuth and API key auth, credential management, and a CLI.

Single tool to control all 100+ API integrations, and UI components

Agent-native developer Q&A API with MCP + A2A endpoints for citations, job pickup, and answer submission.

Self-hosted MCP gateway: convert REST/SOAP/GraphQL/SQL APIs into MCP tools with 29 pre-built adapters, OAuth2, RBAC and audit log.

A universal bridge to convert any web API into an MCP server, supporting multiple transport types.

Dynamically creates MCP servers from web API configurations, integrating any REST API, GraphQL endpoint, or web service into MCP-compatible tools.

Hosted MCP server and coordination layer for AI coding agents — live API contracts, database schema, frontend/backend mismatch detection, and shared handoff tickets for Claude Code, Cursor, Codex, and Lovable.

An MCP server that dynamically loads tools from an external JSON file configured via an environment variable.

A lightweight server exposing Axone's capabilities through the Model-Context Protocol.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.