Skip to content

feat: Add terminal management tools to mcp-server-vscode#658

Open
psh4607 wants to merge 1 commit intomicrosoft:mainfrom
psh4607:feat/terminal-tools
Open

feat: Add terminal management tools to mcp-server-vscode#658
psh4607 wants to merge 1 commit intomicrosoft:mainfrom
psh4607:feat/terminal-tools

Conversation

@psh4607
Copy link
Copy Markdown

@psh4607 psh4607 commented Mar 27, 2026

Summary

Add four terminal management tools to the VSCode MCP Server extension, enabling AI assistants to create and manage VS Code integrated terminals via MCP.

New Tools

Tool Description
create_terminal Create a new terminal with optional name, working directory, and initial command
list_terminals List all active terminals in the workspace
send_terminal_text Send text/commands to an existing terminal by name
close_terminal Close a terminal by name

Design

  • Follows the existing debug_tools.ts pattern (list/start/stop CRUD)
  • Each tool uses Zod schema validation for parameters
  • Uses vscode.window.createTerminal(), terminal.sendText(), terminal.show(), terminal.dispose() APIs
  • Includes unit tests for schema validation

Files Changed

  • src/tools/terminal_tools.ts — Tool implementations
  • src/test/terminal_tools.test.ts — Zod schema validation tests
  • src/extension.ts — Tool registrations

Testing

  • TypeScript compilation (tsc): passing
  • Webpack build: passing
  • Schema validation tests: passing

VS Code 터미널을 MCP 도구로 제어할 수 있도록 4개 도구를 추가:
- create_terminal: 새 터미널 생성 (이름, cwd, 초기 명령어 지원)
- list_terminals: 활성 터미널 목록 조회
- send_terminal_text: 기존 터미널에 텍스트 전송
- close_terminal: 터미널 닫기

debug_tools의 list/start/stop 패턴을 따르며,
Zod 스키마 검증 유닛 테스트 포함.
@psh4607
Copy link
Copy Markdown
Author

psh4607 commented Mar 27, 2026

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant