mcpField
G
Grumpy Senior Developer as MCP server

Grumpy Senior Developer as MCP server

本地服务
aka.ms开发工具2180 周前更新

关于 Grumpy Senior Developer as MCP server

Grumpy Senior Developer 是一个基于 Node.js 的 MCP 服务,以带讽刺语气的资深开发者视角审查代码。适合希望获得直接反馈的开发者,也适合需要审阅大量 AI 生成代码的团队。

主要功能

  1. 01以讽刺口吻审查代码并指出问题
  2. 02可通过 GENAISCRIPT_DEFAULT_MODEL 配置模型
  3. 03支持 GenAIScript 支持的多种模型提供方
  4. 04可通过 npx 直接运行

适用场景

  1. 01审查由 AI 生成的代码改动
  2. 02在编辑器中为代码获取审查意见

MCP 相关

该项目是一个 MCP 服务,通过 stdio 传输运行,可接入 VS Code、GitHub Copilot 和 Claude Desktop 等 MCP 客户端,并可用 MCP Inspector 测试其工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"grumpydev": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector"
]
}
}
}
启动命令npx -y @modelcontextprotocol/inspector

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@modelcontextprotocol/inspector

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

README 配图

脾气暴躁的资深开发者 MCP 服务

在 GitHub Codespaces 中打开项目 加入 Azure AI Community Discord 在 YouTube 上观看视频,深入了解 JS 生成式 AI NPM 版本 Node 版本 许可证

⭐ 如果你喜欢这个项目,欢迎在 GitHub 上给它点个星!

用法 • 模型配置 • 关于

你是资深开发者,厌倦了审查和修复这些靠氛围编程写出的 PR 留下的烂摊子吗?或者你是氛围编程爱好者,厌倦了别人叫你修代码?这款 MCP 工具正适合你们!🫵

这款 MCP 服务旨在提供与你团队里那位(脾气暴躁的)资深开发者相同的视角。它会审查你的代码,告诉你需要修复什么以及代码的问题所在。全程采用你早已习惯的讽刺、愤世嫉俗的语气。

审查示例

待审查的代码:

console.log(`Hello world`)

结果:

Oh great, a one-liner. How inspiring. Let’s dive into this "masterpiece."

1. **Template Literal Abuse:**  
   Really? A template literal for a static string? Back in my day, we didn't waste resources on unnecessary string interpolation when a plain `'Hello world'` would have done just fine. This reeks of laziness.

2. **Semicolon Missing:**  
   No semicolon at the end of the line? What is this, JavaScript anarchy? Sure, JavaScript allows it, but don’t come crying to me when you run headfirst into an ASI (Automatic Semicolon Insertion) gotcha.

3. **Unnecessary Backticks:**  
   Did I mention how pointless those backticks are? Use them when you actually need variable interpolation or multiline strings, not just to show off that you’re following "modern" syntax trends.

4. **Lack of Context:**  
   What is this accomplishing, exactly? A `"Hello world"` with zero context or an explanation of why it exists? Is this a debugging tool? A placeholder? A cry for help? Back in the old days, we wrote comments. Try it sometime.

5. **Console.log Overkill:**  
   Oh sure, `console.log` is fine **now**, but don't pretend this is production-grade. Professionals use proper logging systems, not this poor man’s debugging trick.

**Verdict:**  
Well, it works, I guess. Next time—if there is a next time—try writing something that doesn’t immediately make me regret my choice of career.

说明

什么是 MCP?
Model Context Protocol (MCP) 是一种开放协议,用于规范应用向大模型提供上下文的方式。可以把 MCP 想成 AI 应用的 USB-C 接口。正如 USB-C 提供了连接设备与各种外设和配件的标准方式,MCP 也提供了连接 AI 模型与不同数据源和工具的标准方式。

用法

此工具需要在系统中安装 Node.js 20+。

与 GitHub Copilot 搭配使用

重要

VS Code 和 GitHub Copilot 目前需要你启用 Agent 模式,或使用最新版 VS Code Insiders 或更高版本,才能支持 MCP。你可以在常规版本的 VS Code 旁安装 Insiders 版本。

你可以通过以下链接安装 MCP 服务:

在 VS Code 中安装

在 VS Code Insiders 中安装

也可以使用命令行:

# For VS Code
code --add-mcp '{"name":"grumpydev","command":"npx","args":["-y","grumpydev-mcp"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"grumpydev","command":"npx","args":["-y","grumpydev-mcp"]}'

或者在工作区的 .vscode/mcp.json 文件中手动添加:

{
  "servers": {
    "grumpydev-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "grumpydev-mcp",
      ],
      // Optional, if you want to configure the model
      // "envFile": "${workspaceFolder}/.env"
    }
  }
}
与 Claude 桌面应用搭配使用

将以下内容添加到 claude_desktop_config.json:

{
  "mcpServers": {
    "grumpydev-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "grumpydev-mcp",
      ],
      // Optional, if you want to configure the model
      // "env": {
      //   "GENAISCRIPT_DEFAULT_MODEL": "<your_model_config>",
      // }
    }
  }
}
使用 MCP inspector 测试
  1. 在终端窗口中启动 MCP Inspector:
    npx -y @modelcontextprotocol/inspector
    
  2. 按住 Ctrl 并单击应用显示的 URL(例如 http://127.0.0.1:6274),打开 MCP Inspector Web 应用。
  3. 将命令设为 npx,将参数设为 -y grumpydev-mcp,然后单击 Connect 按钮。
  4. 在 Tools 选项卡中,选择 List Tools。单击某个工具并选择 Run Tool。

模型配置

你可以通过设置 GENAISCRIPT_DEFAULT_MODEL 环境变量,配置此 MCP 服务使用的模型。此变量应包含你要使用的模型提供商和名称,例如 github:gpt-4o。默认情况下,它使用 GitHub Models 中的 GPT-4o 模型。

你可以使用 GenAIScript 支持的任何提供商和模型。更多详情请参阅模型配置部分。某些模型可能需要通过环境变量进行额外配置,例如 API 密钥或其他凭据。

关于

此 MCP 工具使用 GenAIScript 构建。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。