MCP-Insomnia
An MCP server for AI agents to create and manage API collections in Insomnia-compatible format.
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 and resources 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:
{
"mcpServers": {
"insomnia": {
"command": "npx",
"args": ["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/workspacelist_collections- List all collectionsexport_collection- Export collection to JSON formatimport_from_insomnia_export- Import collections from a standard Insomnia V4 export file
Folder Management
create_folder- Create folder within collection
Request Management
create_request_in_collection- Create new requestupdate_request- Update existing requestdelete_request- Delete requestexecute_request- Execute request and view responsegenerate_code_snippet- Generate a code snippet for a request in various languages/frameworks
Environment Management
set_environment_variable- Set environment variableget_environment_variables- Get environment variables
Available Resources
insomnia://collections- List all collectionsinsomnia://requests- List all requests. Can be filtered by?collectionId={id}.insomnia://environments- List environment variables. Can be filtered by?collectionId={id}.insomnia://collection/{id}- Specific collection detailsinsomnia://request/{id}- Specific request detailsinsomnia://request/{id}/history- Get the execution history for a specific requestinsomnia://search?q={keyword}- Search across all collections, folders, and requests.insomnia://stats- Global statistics
Usage Examples
Create Collection
Create a new collection named "API Testing" for testing endpoints
Add Request
Add GET request to "API Testing" collection with:
- Name: Get Users
- URL: https://jsonplaceholder.typicode.com/users
- Headers: Content-Type: application/json
Set Environment Variable
Set environment variable "baseUrl" with value "https://api.example.com" for "API Testing" collection
Execute Request
Execute "Get Users" request using the configured environment variables
Generate Code Snippet
Generate a code snippet for request "Get Users" in "javascript"
Data Storage
Data is stored in ~/.mcp-insomnia/collections.json in JSON format.
License
MIT License
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Remote Weather MCP Server
A remote, authentication-free MCP server for weather data, deployable on Cloudflare Workers or run locally via npm.
Text-To-GraphQL
MCP server for text-to-graphql, integrates with Claude Desktop and Cursor.
MCP Proxy
A bidirectional MCP proxy connecting stdio and Server-Sent Events (SSE) with OAuth support.
WRG MCP Server
A server providing tools for weapon recoil generation and visualization via HTTP endpoints.
Test MCP Server
A sample MCP server implemented in Node.js for development and testing purposes.
refactor-mcp
Refactor code using regex-based search and replace.
AgentMode
An all-in-one MCP server for developers, connecting coding AI to databases, data warehouses, data pipelines, and cloud services.
Fastn Server
A scalable platform for dynamic tool registration and execution based on API definitions, with integrations for services like Claude.ai and Cursor.ai.
vHAL MCP Server
Search Android Vehicle Hardware Abstraction Layer (vHAL) documentation and source code from a local repository clone.
MLflow MCP Server
Integrates with MLflow, enabling AI assistants to interact with experiments, runs, and registered models.