MCP SERVER

MCP-Controlled Tab Limit

Set a ceiling for tabs under MCP control.

Availability

Partially implemented in stable. Read the limits below before relying on this workflow.

Reviewed against stable v0.5.1. Rust candidate additions are labeled separately. Release status.

The pain this solves

  • A client loop can create or control more tabs than intended.
  • Counting only originally MCP-created tabs misses existing tabs that the user grants to MCP.

What ships with it

  • The default limit is four; the setting ranges from one to fifty.
  • The limit counts MCP-controlled tabs in the target window, including user-granted existing tabs.
  • Rejected create/control requests return an error; release or closure frees a slot.

Questions this answers

  • How do I prevent AI agents from creating too many terminal tabs?
  • Can MCP tools create unlimited tabs?
  • What happens if an AI agent opens dozens of terminal tabs?
  • How to limit AI agent resource usage in the terminal?

How it works

The stable default maximum is four MCP-controlled tabs. Settings expose a range from one to fifty.

The limit is checked against controlled tabs in the target window’s tab model. It applies to MCP-created tabs and to existing tabs the user explicitly grants to MCP; the feature is not limited to tabs originally created by MCP. The new-tab Require Approval setting is a separate creation prompt (off by default); granting control of an existing user tab always requires a separate explicit consent prompt.

When the cap is reached, create or control requests return an error. Closing a controlled tab or releasing control frees a slot. The limit does not block tabs that remain outside MCP control.

Why it matters

A per-window cap can constrain how many tabs MCP may create or control at once. Describing the counted state as MCP-controlled tabs makes the rule clear for user-created tabs that are explicitly granted to an MCP client.

Frequently asked questions

What is the default limit?

Four MCP-controlled tabs per target window.

What range can I set?

The settings control ranges from one to fifty.

Do existing user tabs count?

Yes, after explicit user consent. The tab then counts against the same per-window limit. This consent prompt is always shown for an existing tab and is separate from the Require Approval setting for creating new tabs, which is off by default.