insomnia-mcp-server
v1.0.1
Published
MCP server for interacting with Insomnia API client
Downloads
197
Maintainers
Readme
insomnia-mcp-server
MCP server that gives AI assistants full access to your Insomnia collections, environments, and HTTP execution.
Features
- Browse projects, collections, requests, and environments
- Create & modify collections, folders, requests, and environments
- Execute HTTP requests with environment variable substitution
- Export collections to Insomnia v5 YAML format
- Template rendering —
{{ _.variable }}syntax in URLs, headers, and bodies - Auto-project — creates a "Claude MCP" project automatically when no project is specified
Installation
Zero-install with npx:
npx insomnia-mcp-serverOr install globally:
npm install -g insomnia-mcp-serverConfiguration
Claude Code
claude mcp add insomnia-mcp-server -- npx insomnia-mcp-serverCustom Data Directory
By default, the server reads from Insomnia's standard data directory:
| Platform | Default Path |
|----------|-------------|
| macOS | ~/Library/Application Support/Insomnia |
| Linux | $XDG_CONFIG_HOME/Insomnia or ~/.config/Insomnia |
| Windows | %APPDATA%/Insomnia |
Override with the INSOMNIA_DATA_DIR environment variable:
INSOMNIA_DATA_DIR=/path/to/data npx insomnia-mcp-serverTools
Read
| Tool | Parameters | Description |
|------|-----------|-------------|
| list_projects | — | List all Insomnia projects |
| list_collections | projectId | List collections in a project |
| list_requests | collectionId | List requests and folders as a tree |
| get_request | requestId | Get full request details (URL, headers, body, auth) |
| list_environments | collectionId | List environments for a collection |
| get_environment | environmentId | Get environment key-value data |
Write
| Tool | Parameters | Description |
|------|-----------|-------------|
| create_collection | name, projectId? | Create a new collection (auto-creates project if omitted) |
| create_folder | parentId, name | Create a folder in a collection or folder |
| create_request | parentId, name, method, url, headers?, body? | Create an HTTP request |
| update_request | requestId, name?, method?, url?, headers?, body? | Update an existing request |
| delete_request | requestId | Delete a request |
| delete_folder | folderId | Delete a folder and its child requests |
| create_environment | collectionId, name, data | Create a new environment |
| update_environment | environmentId, data | Merge new variables into an environment |
Execute
| Tool | Parameters | Description |
|------|-----------|-------------|
| send_request | requestId, environmentId? | Execute an HTTP request and return the response |
Export
| Tool | Parameters | Description |
|------|-----------|-------------|
| export_collection | collectionId, filePath | Export a collection to Insomnia v5 YAML |
Examples
Once configured, you can ask your AI assistant things like:
- "List my Insomnia projects and collections"
- "Create a new collection called 'User API' with a GET request to /users"
- "Send the login request and show me the response"
- "Add an Authorization header to all requests in the Auth folder"
- "Create a staging environment with base_url set to https://staging.example.com"
- "Export my API collection to a YAML file"
Requirements
- Node.js >= 18
- Insomnia desktop app (the server reads from Insomnia's local database)
Note
Changes made through this MCP server write directly to Insomnia's local database files. Restart Insomnia to see the changes reflected in the UI.
License
ISC
