MCP Toolkit

Integrations

  • Enables search capabilities through Brave search API, allowing retrieval of information from the web

  • Provides comprehensive repository management including listing contents, viewing file structure, searching repositories and code, managing repositories (creation, updates, deletion), and viewing file contents

  • Allows connection to MySQL databases, executing queries, and managing transactions for data storage and retrieval

MCP 工具包

English |中文

概述

MCP 工具包是一个全面的模型上下文协议 (MCP) 服务器实现,它为 AI 助手提供了一套丰富的工具,用于与本地系统、文件、数据库和外部服务进行交互。它旨在通过与现实世界的交互来扩展 AI 功能,同时保持安全性和控制力。

特征

  • 文件系统操作
    • 读取和写入文件
    • 创建和删除目录
    • 使用正则表达式搜索文件
    • 列出目录内容
    • 提取代码定义
  • 数据库集成
    • MySQL 支持
    • PostgreSQL 支持
    • Redis 支持
    • 交易管理
    • 参数化查询
  • GitHub 集成
    • 存储库管理
    • 代码搜索
    • 文件操作
    • 树结构分析
  • Web 功能
    • 网页内容提取
    • Brave 搜索集成
    • HTTP 请求处理
    • 代理支持
  • 系统工具
    • 命令执行
    • 一切搜索集成
    • 堆栈跟踪分析
    • 日志系统

安装

npm install mcp-toolkit

配置

在您的项目中创建一个config.json文件:

{ "workspace": { "rootPath": "/path/to/workspace", "allowedPaths": ["/allowed/path1", "/allowed/path2"] }, "network": { "proxy": "http://proxy-server:port" // Optional }, "database": { "mysql": { "host": "localhost", "port": 3306, "user": "user", "password": "password", "database": "dbname" } // Similar configuration for PostgreSQL and Redis } }

用法

import { Server } from 'mcp-toolkit'; const server = new Server({ configPath: './config.json' }); server.start();

工具详细信息

文件操作工具

  • read_file :读取文件内容,支持文本和二进制文件
  • write_to_file :写入或创建文件
  • apply_diff :对文件应用差异修改
  • insert_content :在指定位置插入内容
  • search_and_replace :搜索并替换文件内容
  • list_files :列出目录内容
  • search_files :使用正则表达式搜索文件
  • list_code_definition_names :提取代码定义

数据库工具

  • db_connect :连接数据库(MySQL/PostgreSQL/Redis)
  • db_query :执行数据库查询
  • db_begin_transaction :开始事务
  • db_commit_transaction :提交事务
  • db_rollback_transaction :回滚事务
  • db_close :关闭数据库连接

GitHub 工具

  • github_ls :列出存储库内容
  • github_tree :显示存储库树结构
  • github_search_repo :搜索存储库
  • github_search_code :搜索代码
  • github_cat :查看文件内容
  • github_list_repos :列出用户存储库
  • github_create_repo :创建存储库
  • github_update_repo :更新存储库设置
  • github_delete_repo :删除存储库

Web 工具

  • read_webpage :提取网页内容
  • brave_search :使用 Brave 搜索
  • http_request :发送 HTTP 请求

系统工具

  • execute_command系统命令
  • everything_search :本地文件搜索
  • logger :记录
  • get_stack_trace :堆栈跟踪分析

安全

  • 可配置的工作区限制
  • 命令执行控制
  • 数据库访问管理
  • 基于令牌的外部服务身份验证

贡献

欢迎贡献!详情请阅读我们的贡献指南

执照

MIT 许可证

-
security - not tested
F
license - not found
-
quality - not tested

全面的模型上下文协议服务器实现,使 AI 助手能够与文件系统、数据库、GitHub 存储库、Web 资源和系统工具进行交互,同时保持安全性和控制力。

  1. Overview
    1. Features
      1. Installation
        1. Configuration
          1. Usage
            1. Tool Details
              1. File Operation Tools
              2. Database Tools
              3. GitHub Tools
              4. Web Tools
              5. System Tools
            2. Security
              1. Contributing
                1. License
                  ID: lhj0b7jlx3