Skip to main content
Glama
priesdelly

WinTerminal MCP Server

by priesdelly

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_terminal_sessionsA

Lists every session this server currently knows about, each backed by a real, persistent shell process attached to its own pseudo console.

Returns for each session: name, shell (pwsh/powershell/cmd), starting directory, creation time, and whether the process is still alive (false if it exited or was killed since it was opened).

Use this before write_to_terminal/read_terminal_output when you're not sure which named sessions already exist, or to check whether a session that exited needs to be reopened.

open_terminal_sessionA

Starts a new, persistent shell process attached to its own pseudo console, and registers it under a name you choose.

Args:

  • name (string): unique session name, defaults to "default"

  • shell ('pwsh' | 'powershell' | 'cmd'): defaults to 'pwsh'. Falls back to 'powershell' automatically (with a warning in the result) if pwsh.exe is not installed.

  • cwd (string, optional): starting directory

You do not need to call this before write_to_terminal - writing to the "default" session name auto-creates it. Use this tool explicitly when you want a second, independently named session (e.g. run a dev server in "server" while running git commands in "git"), or want to pick the shell/starting directory yourself.

Errors if a session with that name is already open - close it first or pick a different name.

write_to_terminalA

Writes a command or text into a session's shell input, exactly as if a person typed it, then presses Enter (by default).

Args:

  • session (string): which session to write to (default "default"; auto-created if it doesn't exist yet, using the default shell)

  • command (string): text to type

  • pressEnter (boolean): press Enter afterward (default true)

  • confirm (boolean): must be true to run a command matched by the dangerous-command safety filter (see config.json's dangerousPatterns)

Returns immediately after the keystrokes are sent - it does NOT wait for the command to finish. Use read_terminal_output afterward (optionally with waitForIdleMs) to see the result.

Errors:

  • "matches a pattern flagged as potentially destructive" -> resend with confirm: true if you really mean it

  • "readOnlyMode" -> this server instance has writes disabled in config.json

  • "No open session named ..." -> only for non-default session names; call open_terminal_session or list_terminal_sessions first

read_terminal_outputA

Reads a session's captured output transcript: everything the shell has printed since the session opened, with terminal escape/color codes stripped and carriage-return line-rewrites (progress bars, spinners) collapsed to their final state.

Args:

  • session (string): which session to read (default "default")

  • lines (number): trailing lines to return, 0 = everything captured so far (default 0)

  • waitForIdleMs / timeoutMs: optionally wait for output to stop changing (a heuristic for "the command probably finished") before returning; without this the call returns immediately with whatever has been captured so far

Returns: { text, truncated, idleReached, timedOut }. Long output is truncated from the start (oldest lines dropped first) to maxOutputChars (see config.json); truncated is true when that happened.

Note: this is a plain-text transcript, not a full terminal screen emulation - a full-screen app (vim, htop) that repaints the same screen region repeatedly will show as a scrolling log of each repaint, not one clean frame.

send_control_characterA

Sends a real Ctrl+ control byte (e.g. Ctrl+C to interrupt) directly into a session's own shell input.

This writes the literal ASCII control byte straight into this one session's input pipe - it physically cannot reach any other process on the machine, since there is no keyboard/focus involved at all.

Args:

  • session (string): which session (default "default")

  • key (string): "C" (default) or any other letter for Ctrl+

Ctrl+Break is not supported - there is no ASCII control byte for it over this transport. Use "C" to interrupt a running command.

Reliably interrupts a command that is actually running. It is not a reliable way to cancel text already typed into the prompt but not yet submitted (pressEnter:false) - PowerShell's line editor needs Ctrl+C delivered as its own keypress to cancel an in-progress edit, which this transport does not guarantee. To discard an unsent fragment, close and reopen the session instead.

close_terminal_sessionA

Terminates a session's shell process and forgets it.

Args:

  • session (string): session name to close

Errors with "No open session named ..." if it's already gone.

debug_inspect_sessionsA

Diagnostic tool: dumps the daemon's internal state for every session it knows about - pid, alive status, and how many characters of output are currently buffered.

Use this when a session seems "stuck" (write/read errors, session not found) to see what the daemon actually has in memory. Not needed for normal use.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/priesdelly/Win-Terminal-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server