---
title: AI in Insomnia
description: Explore AI features in Insomnia 12, including MCP Servers, AI-assisted
  mock servers, and commit suggestions. Learn how to connect, configure, and manage
  AI integrations across your workspace.
url: "/insomnia/ai-in-insomnia/"
canonical_url: "/insomnia/ai-in-insomnia/"
content_type: landing_page
products:
- Insomnia
canonical: true


---






# AI in Insomnia

Explore the AI features available in Insomnia and learn how they enhance automation, collaboration, and productivity.


> As of Insomnia v12, AI features are free to use, though this may change in future releases.

Insomnia 12 introduces a suite of **AI-driven capabilities** that make API development faster, smarter, and more collaborative. These include:
- [**MCP Servers and Clients**](/insomnia/ai-in-insomnia/#mcp-servers-and-clients), which connect to external AI-ready tools and resources.  
- [**AI-assisted mock server generation**](/insomnia/self-hosted-mocks/#create-an-auto-generated-mock-server), which transforms prompts or API definitions into mock APIs.  
- [**AI commit message suggestions**](/insomnia/ai-in-insomnia/#ai-driven-git-commits), which help maintain clear and atomic commit histories.

To activate these features, enable a **Large Language Model (LLM)** in **Preferences > AI Settings**.  

From **Activate an LLM**, choose from one of the following providers, and connect an API Key:
- **Claude**: A hosted LLM with very large context windows and alignment-focused training, well-suited for long-form document analysis and instruction-following tasks. For more information on how to retrieve a Claude API Token, naviagte to [Anthropic](https://platform.claude.com/docs/en/api/overview#prerequisites).
- **OpenAI**: A general-purpose hosted LLM platform providing high-capability models with strong reasoning, code generation, and tool-calling support via a mature API ecosystem. For more information on how to retrieve an OpenAI API Token, naviagte to [OpenAI](https://platform.openai.com/docs/quickstart).
- **Gemini**: A hosted multimodal LLM capable of joint reasoning over text, images, and other modalities, designed for deep integration with Google Cloud and Workspace services. For more information on how to retrieve a Gemini API Token, naviagte to [Gemini](https://ai.google.dev/gemini-api/docs/api-key).
- **LLM URL**: A configurable HTTP endpoint that represents an externally hosted LLM service, that allows users to connect to custom, proxied, or self-hosted model deployments independent of a specific provider.
- **Local LLM**: A self-hosted LLM deployed on local or private infrastructure, that enables full data residency and model control at the cost of higher operational and hardware requirements.


> Local models keep processing fully on your machine for privacy and control, but may run slower and produce less-refined responses than hosted models.




## AI features overview



Once an LLM is activated, Insomnia unlocks multiple AI features that are designed to automate repetitive workflows, generate content dynamically, and enhance collaboration.

### Auto-generate Mock Servers from natural language
Description: Creates a mock server from a prompt, OpenAPI definition, or live URL response. Automatically scaffolds routes, responses, and configurations.
Product context: Available when creating **Self-hosted** mock servers. See [**Mock Servers**](/insomnia/mock-servers/).

### Suggest comments and grouping for Commits
Description: Analyzes staged Git changes and suggests logical commit groupings and draft messages.
Product context: Available in the **Git Sync** interface. See [**Git Sync**](/insomnia/git-sync/).

### MCP Client operations
Description: Connect to MCP Servers that expose callable tools, prompts, and structured resources via JSON-RPC.
Product context: Manage connections under **MCP Servers** in Insomnia. See [**MCP clients in Insomnia**](/insomnia/mcp-clients-in-insomnia/).






## Get started



Activate features by choosing and uploading an LLM in **Preferences > AI Settings**:

1. Click **Preferences**.  
1. Select the **AI Settings** tab.  
1. In the provider list, choose a LLM type: 
1. Enter your credentials or select a local model.
1. Click **Activate**.

After activation you can toggle **Auto-generate Mock Servers** and **Suggest commit comments** from the **AI Features** panel


> **Note**: Local LLMs require a `.gguf` file placed in the `/Insomnia/llms/` directory.

Credentials for hosted LLM providers are stored securely on your local system by the Insomnia app and are never synced across accounts or devices.




## MCP Servers and Clients



**Model Context Protocol (MCP)** Servers expose domain-specific operations through a **JSON-RPC interface**. For example:
  - `tools/CALL`
  - `resources/READ`
  - `prompts/GET`

When you connect Insomnia to an MCP Server, Insomnia creates an **MCP Client** that acts like a synchronized request group. The client stays updated with tools, prompts, and resources published by the server. When offline, you will view cached data until you resync.





**Use MCP Clients to:**
 - Discover and execute callable tools  
 - Retrieve structured resources  
 - Explore and test AI-driven prompts  
 - Resync data from the server as it changes 

 **Transports available:** HTTP and STDIO.  



[Learn more about MCP Clients](/insomnia/mcp-clients-in-insomnia/)




**To use commit suggestions:**
1. Open the **Git Sync** interface.  
1. Click **Suggest comments and grouping for Commits**.  
1. Review the suggested commit groups and messages.  
1. (Optional) To edit a message inline, double-click the message.  
1. Drag and drop files between commit groups, or exclude files.  
1. Click **Commit** or **Commit & Push**.




## Frequently asked questions


- Can I disable AI features for myself?
  Yes. Go to **Preferences → AI Settings** and deactivate the toggles for **Auto-generate Mock Servers** and **Suggest commit comments**.  
  To stop using an LLM entirely, click **Deactivate** under the provider configuration.

- Why don't I see AI features in the app?
  You must first configure and activate an LLM under **Preferences → AI Settings**.  
  If AI is deactivated at the instance level, the feature toggles will remain unavailable in the UI.

- How do I manage AI across my organization?
  Enterprise administrators can activate or deactivate AI features at the instance level from **Insomnia Admin → AI Settings**.  
  When deactivated, the desktop app shows an explanatory message.  
  When activated, each user must still activate a model before toggles become available.
  This setting is available only for Enterprise plans.

- Can I set a token limit per request in Insomnia?
  Yes. Go to **Preferences** > **AI Settings** > **LLM URL**, then enter your LLM URL and API token to open **Advanced Options**, where you can [set a maximum number of tokens per request](/insomnia/mcp-clients-in-insomnia/#set-a-token-limit-per-request). If you use a hosted provider, enter its provider URL, such as `https://api.openai.com/v1`.

- Which transports are supported for MCP Clients?
  Both **HTTP** and **STDIO** transports are supported for connecting to MCP Servers.

- Why are commit suggestions less accurate when using a local LLM?
  Local LLMs with fewer than **10 billion parameters** may produce less accurate or inconsistent commit suggestions.  
  Smaller models have limited context understanding and token capacity compared to hosted providers. 


