Claude TypeScript MCP Servers

Claude TypeScript MCP Servers

一个模型上下文协议服务器的集合,使 Claude Desktop 能够提供开发辅助功能,包括文件系统、Git、shell 命令和网络搜索功能,而无需产生 API 使用成本。

数字笔记管理
编程文档访问
访问服务器

Tools

brave_web_search

Retrieves up-to-date information from the web using Brave Search. You should proactively use this tool whenever you need current information beyond your knowledge cutoff, when answering questions about recent events, when asked about specific facts you're uncertain about, or when providing comprehensive answers. Search automatically when you suspect information might be outdated or when greater detail would improve your response. Use this for news, technical information, current events, product details, or any topic where fresh, accurate data would enhance your answer quality.

brave_local_search

Finds information about local businesses, services, attractions, and locations with real-time data. Use this tool proactively whenever a query mentions specific places or location-based information. This is especially useful for questions about restaurants, shops, tourist attractions, local services, or any place-based inquiry. You should automatically search when users ask about places 'near' somewhere, business hours, local reviews, addresses, or location details that would benefit from current information. This provides much more accurate and up-to-date information than your built-in knowledge.

README

Claude TypeScript MCP 服务器

这是一组模型上下文协议 (MCP) 服务器,旨在为使用 LLM 进行开发辅助的软件开发人员提供服务。虽然许多开发人员更喜欢 Cline,因为它直接与 VSCode 集成,但它采用按使用量付费的 API,大量使用时成本会很高。本项目通过将 Claude Desktop 应用程序与自定义 MCP 服务器连接,利用 Claude Pro 包月订阅,提供可比的开发辅助功能,而无需可变成本。

日语解説文章: Cline任せでコード書いてたらAPIクレジットが爆散したのでClaude Desktop + MCPをいい感じにしてサブスクだけで無双する

概述

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

  • Brave Search: 使用 Brave Search API 提供网络搜索和本地搜索功能
  • Filesystem: 启用具有安全限制的文件系统操作
  • 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",  // 默认帐户(向后兼容)
    "GITHUB_TOKEN_WORK": "YOUR_WORK_ACCOUNT_TOKEN",       // 工作帐户配置文件
    "GITHUB_TOKEN_PERSONAL": "YOUR_PERSONAL_ACCOUNT_TOKEN" // 个人帐户配置文件
}

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

{
    "owner": "username",
    "repo": "repo-name",
    "path": "path/to/file.txt",
    "account_profile": "work"  // 将使用 GITHUB_TOKEN_WORK 环境变量
}

如果未指定 account_profile,将使用默认的 GITHUB_PERSONAL_ACCESS_TOKEN

Fetch 服务器配置

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

"env": {
    "CUSTOM_USER_AGENT": "YOUR_CUSTOM_USER_AGENT", // 可选:指定自定义 User-Agent 标头
    "IGNORE_ROBOTS_TXT": "false"                   // 可选:设置为 "true" 以绕过 robots.txt 规则
}
  • CUSTOM_USER_AGENT: 允许您为 HTTP 请求定义特定的 User-Agent 字符串,这在某些网站根据客户端标识限制访问时非常有用。
  • IGNORE_ROBOTS_TXT: 默认情况下 (false),fetch 服务器遵循网站设置的 robots.txt 规则来控制 Web 爬虫。 将此设置为 "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: 用于存储库管理、问题、PR 等的 GitHub API 集成。
  • 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 服务器的命令允许列表来限制可执行命令
  • fetch 服务器默认情况下遵循 robots.txt 指令以防止抓取受限站点
  • 安全地存储您的 GitHub 个人访问令牌并使用适当的令牌权限

参考

许可证

MIT 许可证

推荐服务器

e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Exa MCP Server

Exa MCP Server

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

官方
精选
mult-fetch-mcp-server

mult-fetch-mcp-server

一个多功能的、符合 MCP 规范的网页内容抓取工具,支持多种模式(浏览器/Node)、格式(HTML/JSON/Markdown/文本)和智能代理检测,并提供双语界面(英语/中文)。

精选
本地
Exa MCP Server

Exa MCP Server

一个模型上下文协议服务器,它使像 Claude 这样的人工智能助手能够以安全和受控的方式,使用 Exa AI 搜索 API 执行实时网络搜索。

精选
MCP Web Research Server

MCP Web Research Server

一个模型上下文协议服务器,使 Claude 能够通过集成 Google 搜索、提取网页内容和捕获屏幕截图来进行网络研究。

精选
mcp-perplexity

mcp-perplexity

Perplexity API 的 MCP 服务器。

精选
PubMedSearch MCP Server

PubMedSearch MCP Server

一个模型内容协议(Model Content Protocol)服务器,提供从 PubMed 数据库搜索和检索学术论文的工具。

精选
YouTube Translate MCP

YouTube Translate MCP

一个模型上下文协议服务器,可以通过文字稿、翻译、摘要和各种语言的字幕生成来访问 YouTube 视频内容。

精选
mcp-codex-keeper

mcp-codex-keeper

作为开发知识的守护者,为 AI 助手提供精心策划的最新文档和最佳实践访问权限。

精选
Perplexity Deep Research MCP

Perplexity Deep Research MCP

一个服务器,它允许 AI 助手使用 Perplexity 的 sonar-deep-research 模型进行网络搜索,并提供引用支持。

精选