Claude TypeScript MCP Servers

by ukkz

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides web search and local search functionality using the Brave Search API to retrieve information from the web and find information about local businesses, services, and attractions.

  • Enables Git operations including viewing repository status, showing differences, committing changes, managing staging, viewing logs, creating branches, and initializing repositories.

  • Supports running Node.js development commands through the Shell MCP server for JavaScript/TypeScript development tasks.

Claude TypeScript MCP 服务器

一系列模型上下文协议 (MCP) 服务器,面向使用 LLM 进行开发辅助的软件开发者。虽然许多开发者更喜欢 Cline,因为它可以直接集成 VSCode,但它使用按次付费的 API,使用量大时成本会更高。该项目利用 Claude Pro 的固定费率订阅,将 Claude Desktop 应用程序与自定义 MCP 服务器连接起来,提供相当的开发辅助功能,而无需支付可变成本。

日本语による解说记事:Cline任せでコード书いてたらAPIkureジットが爆散したのでClaude Desktop + MCPをい感じにしてサブsukuだけで无双する

概述

该项目实现了多个 MCP 服务器,可与 Claude Desktop 一起使用以增强其软件开发能力:

  • Brave Search :使用 Brave Search API 提供网页搜索和本地搜索功能
  • 文件系统:启用具有安全限制的文件系统操作
  • Git :提供用于管理存储库的 Git 功能
  • GitHub :支持与 GitHub 存储库、问题、拉取请求等进行交互
  • Shell :允许在受控环境中执行 shell 命令
  • Puppeteer :通过 Puppeteer 实现浏览器自动化和 Web 交互
  • Fetch :从 URL 中检索内容并将 HTML 转换为 Markdown,以提高可读性

要求

安装

  1. 克隆存储库:
    git clone https://github.com/yourusername/claude-ts-mcps.git cd claude-ts-mcps
  2. 安装依赖项:
    bun install

配置

要将这些 MCP 服务器与 Claude Desktop 一起使用,您需要创建一个配置文件,告诉 Claude 如何连接它们。以下是示例配置:

{ "mcpServers": { "brave-search": { "command": "/Users/username/.bun/bin/bun", "args": [ "run", "/Users/username/Documents/claude-ts-mcps/src/brave-search.ts" ], "env": { "BRAVE_API_KEY": "YOUR_BRAVE_API_KEY" } }, "filesystem": { "command": "/Users/username/.bun/bin/bun", "args": [ "run", "/Users/username/Documents/claude-ts-mcps/src/filesystem.ts", "/Users/username" ] }, "git": { "command": "/Users/username/.bun/bin/bun", "args": [ "run", "/Users/username/Documents/claude-ts-mcps/src/git.ts" ] }, "github": { "command": "/Users/username/.bun/bin/bun", "args": [ "run", "/Users/username/Documents/claude-ts-mcps/src/github.ts" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_DEFAULT_TOKEN", "GITHUB_TOKEN_WORK": "YOUR_WORK_ACCOUNT_TOKEN", "GITHUB_TOKEN_PERSONAL": "YOUR_PERSONAL_ACCOUNT_TOKEN" } }, "shell": { "command": "/Users/username/.bun/bin/bun", "args": [ "run", "/Users/username/Documents/claude-ts-mcps/src/shell.ts" ] }, "puppeteer": { "command": "/Users/username/.bun/bin/bun", "args": [ "run", "/Users/username/Documents/claude-ts-mcps/src/puppeteer.ts" ] }, "fetch": { "command": "/Users/username/.bun/bin/bun", "args": [ "run", "/Users/username/Documents/claude-ts-mcps/src/fetch.ts" ], "env": { "CUSTOM_USER_AGENT": "YOUR_CUSTOM_USER_AGENT", // Optional "IGNORE_ROBOTS_TXT": "false" // Optional, set to true to ignore robots.txt } } } }

将此配置保存为claude_desktop_config.json并配置 Claude Desktop 以使用它。

多 GitHub 帐户支持

GitHub MCP 服务器支持在多个 GitHub 帐户之间切换。您可以通过配置环境变量来设置多个帐户配置文件:

"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_DEFAULT_TOKEN", // Default account (backward compatible) "GITHUB_TOKEN_WORK": "YOUR_WORK_ACCOUNT_TOKEN", // Work account profile "GITHUB_TOKEN_PERSONAL": "YOUR_PERSONAL_ACCOUNT_TOKEN" // Personal account profile }

要在请求中使用特定的帐户配置文件,请将account_profile参数添加到任何 GitHub API 调用:

{ "owner": "username", "repo": "repo-name", "path": "path/to/file.txt", "account_profile": "work" // Will use the GITHUB_TOKEN_WORK environment variable }

如果没有指定account_profile ,则将使用默认的GITHUB_PERSONAL_ACCESS_TOKEN

获取服务器配置

Fetch MCP 服务器通过环境变量提供自定义选项:

"env": { "CUSTOM_USER_AGENT": "YOUR_CUSTOM_USER_AGENT", // Optional: Specify a custom User-Agent header "IGNORE_ROBOTS_TXT": "false" // Optional: Set to "true" to bypass robots.txt rules }
  • CUSTOM_USER_AGENT :允许您为 HTTP 请求定义特定的 User-Agent 字符串,当某些网站根据客户端标识限制访问时,此功能很有用。
  • IGNORE_ROBOTS_TXT :默认情况下 (false),抓取服务器会遵循网站设置的 robots.txt 规则(用于控制网络爬虫)。将其设置为“true”可禁用此限制,但应谨慎使用。

用法

  1. 启动 Claude Desktop
  2. 加载配置文件
  3. Claude 现在可以访问这些 MCP 服务器提供的附加工具

发展

每个 MCP 服务器都作为src目录中的独立 TypeScript 文件实现:

  • src/brave-search.ts :Brave Search API 集成
  • src/filesystem.ts :文件系统操作
  • src/git.ts :Git 操作
  • src/github.ts :GitHub API 集成,用于存储库管理、问题、PR 等。
  • src/shell.ts :Shell 命令执行
  • src/puppeteer.ts :浏览器自动化和 Web 交互
  • src/fetch.ts :URL 内容检索和 HTML 到 Markdown 的转换

GitHub MCP 服务器具有模块化结构:

  • src/github/common/ :常用实用程序、接口和类型
  • src/github/operations/ :实现各种 GitHub API 操作
  • src/github/tools/ :MCP 服务器的工具定义

要添加新功能:

  1. src目录中创建一个新的 TypeScript 文件
  2. 使用@modelcontextprotocol/sdk实现MCP服务器
  3. 将新服务器添加到您的 Claude Desktop 配置中

安全注意事项

  • 文件系统和 shell 服务器包括安全措施,以防止未经授权的访问
  • 执行命令前始终验证用户输入
  • 配置文件系统访问的允许目录时要小心谨慎
  • 使用shell服务器的命令允许列表来限制可执行命令
  • 抓取服务器默认遵守 robots.txt 指令,以防止抓取受限网站
  • 安全存储您的 GitHub 个人访问令牌并使用适当的令牌权限

参考

执照

MIT 许可证

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

模型上下文协议服务器的集合,使 Claude Desktop 能够通过文件系统、Git、shell 命令和 Web 搜索功能提供开发援助能力,而无需产生 API 使用成本。

  1. Overview
    1. Requirements
      1. Installation
        1. Configuration
          1. Multiple GitHub Account Support
          2. Fetch Server Configuration
        2. Usage
          1. Development
            1. Security Considerations
              1. References
                1. License
                  ID: s0v7ilayxa