showme

showme

Enables coding agents to open files and git diffs directly in VS Code, allowing users to review code changes without leaving their conversation.

Category
访问服务器

README

ShowMe MCP Server

A Model Context Protocol (MCP) server that enables coding agents to open files and git diffs directly in VS Code. Provides two MCP tools that require no summary - the user sees the results directly in their editor.

Why ShowMe?

The rise of CLI-based coding agents has fundamentally changed how we write code. We're no longer working in our IDEs—we're working with AI agents through conversational interfaces. This shift creates a new challenge: how do we quickly review the code our agents are writing?

ShowMe bridges this gap. Instead of keeping your IDE open and constantly switching contexts, you can stay focused on your conversation with the agent. When you need to see something, just ask:

  • "Show me index.js" - Instantly opens the file in VS Code
  • "Show me what you just changed" - Displays a rich diff view
  • "Show me the main components" - Opens multiple files as tabs

Review what you need, close the window, and continue the conversation. It's ephemeral, on-demand code viewing designed for the age of AI-assisted development.

Features

  • 🎯 Direct VS Code Integration - Opens files and diffs directly in your editor
  • 🎨 Syntax Highlighting - Full language support through VS Code
  • 📂 Multi-file Support - Open multiple files as tabs in a single command
  • 🔍 Git Diff Visualization - Side-by-side diff comparisons with multi-tab support
  • 📍 Line Navigation - Jump to specific line numbers
  • Fast & Lightweight - Minimal dependencies, instant response

Quick Reference

Tool Purpose Example
ShowFile Opens file(s) in VS Code ShowFile({ files: ["README.md"] })
ShowDiff Shows changes since last commit ShowDiff({ files: ["src/index.ts"] })

Installation

npm install -g @dean0x/showme

Or install locally in your project:

npm install @dean0x/showme

MCP Configuration

Using npx (recommended)

{
  "mcpServers": {
    "showme": {
      "command": "npx",
      "args": ["-y", "@dean0x/showme", "mcp", "start"]
    }
  }
}

Local development

{
  "mcpServers": {
    "showme": {
      "command": "node",
      "args": ["/path/to/showme-mcp/dist/index.js"]
    }
  }
}

Note: The server uses the current working directory and will run in your project folder.

MCP Tools

ShowFile

Open one or multiple files in VS Code.

Parameters:

  • files (string[], required) - Files to open in VS Code
  • line (number, optional) - Line number to jump to (only applies to first file)

Examples:

// Single file
await ShowFile({ files: ["src/index.ts"] })

// Single file with line number
await ShowFile({ files: ["src/utils.ts"], line: 42 })

// Multiple files as tabs
await ShowFile({ files: ["src/index.ts", "package.json", "README.md"] })

ShowDiff

Display git diffs showing all changes since the last commit (HEAD vs working directory).

Parameters:

  • files (string[], optional) - Specific files to show diff for. If not provided, shows all changed files.

Examples:

// Show all changes since last commit
await ShowDiff({})

// Show changes for specific file
await ShowDiff({ files: ["src/index.ts"] })

// Show changes for multiple files (opens each in separate tab)
await ShowDiff({
  files: ["src/index.ts", "package.json", "README.md"]
})

Note: ShowDiff always compares HEAD to the working directory, showing all uncommitted changes (both staged and unstaged).

CLI Usage (Testing)

The package includes a CLI tool for testing the functionality:

File Commands

# Open single file
showme file README.md

# Open file at specific line
showme file src/index.ts --line 42
showme file src/main.ts -l 100

# Open multiple files as tabs
showme file src/index.ts src/utils.ts README.md
showme file src/*.ts  # Using shell expansion

Diff Commands

# Show all changes since last commit
showme diff

# Show diff for specific files
showme diff --files src/index.ts src/utils.ts
showme diff -f package.json

# Show diff for multiple files
showme diff -f src/index.ts README.md package.json

Other Commands

# Show help
showme --help
showme -h

# Show version
showme --version
showme -v

Architecture

The server follows clean architecture principles:

  • Result Types - All operations return Result<T, E> for explicit error handling
  • Dependency Injection - Testable, modular design
  • Pipe Composition - Functional programming patterns for data flow
  • Resource Management - Proper cleanup with try/finally patterns
  • Type Safety - Full TypeScript with no any types

Project Structure

showme/
├── src/
│   ├── index.ts           # MCP server entry point
│   ├── cli.ts            # CLI tool entry point
│   ├── handlers/         # MCP tool handlers
│   │   ├── show-file-handler.ts
│   │   └── show-diff-handler.ts
│   ├── utils/            # Utilities and services
│   │   ├── vscode-executor.ts
│   │   ├── git-detector.ts
│   │   ├── git-diff-generator.ts
│   │   └── ...
│   └── __tests__/        # Test files
└── dist/                # Compiled output (generated)

Requirements

  • Node.js >= 20.0.0
  • VS Code installed and accessible via code command
  • Git (for diff functionality)

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run with coverage
npm run test:coverage

# Development mode
npm run dev

# Lint code
npm run lint

# Type check
npm run type-check

Testing

The project uses Vitest for testing with a focus on integration tests:

# Run all tests
npm test

# Run in watch mode
npm run test

# Run once
npm run test:run

# Coverage report
npm run test:coverage

Publishing

# Build the project
npm run build

# Test locally
npm link
showme-mcp

# Publish to npm
npm publish --access public

Troubleshooting

VS Code command not found

If you get an error about code command not being found:

  1. Open VS Code
  2. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
  3. Type "Shell Command: Install 'code' command in PATH"
  4. Restart your terminal

MCP server not connecting

  1. Check your MCP client configuration file
  2. Ensure the command is correctly spelled
  3. Restart your MCP client after configuration changes

License

MIT - See LICENSE file for details

Contributing

Contributions are welcome! Please follow the project's engineering principles and code style.

Support

For issues and feature requests, please visit our GitHub Issues page.

Acknowledgments

Built using the Model Context Protocol specification.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选