Skip to main content
Glama

MCP 工具包服务器


概述

MCP 工具包服务器是一个生产就绪的 Model Context Protocol (MCP) 服务器,它为 Claude、ChatGPT 和其他 LLM 智能体配备了一套丰富的工具,用于与数据库、外部 API、文件系统等进行交互——这与智能体 AI 浪潮直接相关。

该服务器使用 TypeScript 和官方的 @modelcontextprotocol/sdk 构建,作为本地 stdio 进程运行,并可与 Claude Desktop、MCP Inspector 或任何兼容 MCP 的客户端无缝集成。


Related MCP server: MCP Toolkit

功能与工具

工具

描述

示例用例

db_query

对 SQLite 执行 SQL 查询(演示数据库的探索模式或文件模式)

“显示本月下单的所有用户”

api_call

使用自定义标头、参数和正文向任何 REST API 发出 HTTP 请求

从天气 API 获取数据,发送 webhook

file_read

从本地文件系统读取文件内容

读取配置文件,检查日志

file_write

将内容写入文件(自动创建父目录)

保存生成的代码,导出数据

file_list

列出文件/目录,支持可选的递归列出和过滤

探索项目结构

calculator

安全地评估数学表达式(无 eval

计算复利,单位换算

get_datetime

获取支持时区的当前日期/时间

时间戳记录,调度

json_parser

解析、验证、查询和汇总 JSON 数据

从 API 响应中提取字段

text_transform

17+ 种文本操作:大小写转换、slug、base64、提取电子邮件/URL、字数统计

数据清洗,文本规范化

get_environment

获取服务器环境信息(操作系统、CPU、内存、Node.js 版本)

调试,上下文感知


快速入门

先决条件

  • Node.js >= 18.0.0

  • npm >= 9.0.0

安装

# Clone the repository
git clone https://github.com/vyshnavi-nandyala/mcp-toolkit-server.git
cd mcp-toolkit-server

# Install dependencies
npm install

# Build the TypeScript project
npm run build

配置 Claude Desktop

将服务器添加到您的 Claude Desktop 配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

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

/absolute/path/to/mcp-toolkit-server 替换为您机器上的实际路径。

重启 Claude Desktop,您会在输入区域看到一个 🔨 图标——您的工具已准备就绪!

与 MCP Inspector 一起使用(调试)

npx @modelcontextprotocol/inspector node dist/index.js

这将打开一个 Web UI,您可以在其中手动测试每个工具、检查请求/响应负载并调试问题。


使用示例

数据库查询 — 探索演示数据库

询问 Claude:

“从演示数据库中显示价格最高的前 5 个产品。”

Claude 将使用 db_query 工具:

{
  "sql": "SELECT name, category, price FROM products ORDER BY price DESC LIMIT 5"
}

API 调用 — 获取天气数据

询问 Claude:

“旧金山现在的天气如何?”

Claude 将使用 api_call 工具:

{
  "url": "https://api.open-meteo.com/v1/forecast?latitude=37.7749&longitude=-122.4194&current_weather=true",
  "method": "GET"
}

文件操作

询问 Claude:

“列出我项目中的所有 TypeScript 文件,然后读取主入口点。”

Claude 将链接 file_listfile_read

{ "dirPath": "/path/to/project", "extension": ".ts", "recursive": true }
{ "filePath": "/path/to/project/src/index.ts" }

JSON 解析

询问 Claude:

“解析此 JSON 并提取第一个用户的电子邮件:{"users":[{"email":"alice@example.com"},{"email":"bob@example.com"}]}

{
  "json": "{\"users\":[{\"email\":\"alice@example.com\"}]}",
  "operation": "query",
  "path": "users[0].email"
}

文本转换

询问 Claude:

“将此转换为 camelCase 和 slug:'My Project Name'”

{ "text": "My Project Name", "operation": "camelcase" }
// → "myProjectName"

{ "text": "My Project Name", "operation": "slug" }
// → "my-project-name"

架构

mcp-toolkit-server/
├── src/
│   ├── index.ts                  # Entry point — creates and starts the MCP server
│   ├── tools/
│   │   ├── db-query.ts           # SQLite query tool (explore + file modes)
│   │   ├── api-call.ts           # HTTP request tool (fetch-based)
│   │   ├── file-operations.ts    # file_read, file_write, file_list
│   │   ├── calculator.ts         # Safe math expression evaluator
│   │   ├── datetime.ts           # Date/time with timezone support
│   │   ├── json-parser.ts        # Parse, query, validate, summarize JSON
│   │   ├── text-transform.ts     # 17+ text manipulation operations
│   │   └── environment.ts        # System environment info
│   └── utils/
│       └── helpers.ts            # Shared response-building utilities
├── tests/
│   └── tools.test.ts             # Unit tests (vitest)
├── package.json
├── tsconfig.json
└── README.md

设计原则

  1. 安全第一 — SQL 注入预防,无 eval(),数据库查询默认为只读

  2. 模块化 — 每个工具都是一个独立的模块;易于添加/删除工具

  3. 类型化 — 完整的 TypeScript,带有用于输入验证的 Zod 模式

  4. 可观测 — 带有元数据(计时、计数、类型)的结构化 JSON 响应

  5. 开发者友好 — 支持 MCP Inspector,全面的 README,单元测试


添加自定义工具

添加新工具非常简单:

// src/tools/my-custom-tool.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";

export function registerMyCustomTool(server: McpServer): void {
  server.tool(
    "my_custom_tool",
    "Description of what this tool does.",
    {
      param1: z.string().describe("First parameter."),
      param2: z.number().optional().describe("Optional second parameter."),
    },
    async ({ param1, param2 }) => {
      // Your logic here
      return {
        content: [
          { type: "text", text: JSON.stringify({ result: "..." }, null, 2) },
        ],
      };
    }
  );
}

然后在 src/index.ts 中注册它:

import { registerMyCustomTool } from "./tools/my-custom-tool.js";
// ...
registerMyCustomTool(this.server);

开发

# Run in development mode (no build step needed)
npm run dev

# Build for production
npm run build

# Run tests
npm test

# Watch tests
npm run test:watch

# Lint
npm run lint

为什么这很重要:智能体 AI 浪潮

MCP (Model Context Protocol) 是一种开放标准,允许像 Claude 这样的 AI 智能体与外部工具、数据源和服务进行交互。MCP 服务器不再局限于聊天窗口,而是赋予智能体以下能力:

  • 使用自然语言查询数据库

  • 调用外部 API 以获取实时数据

  • 读取和写入本地文件系统上的文件

  • 执行计算和数据转换

  • 通过链接工具组合多步工作流

该服务器是这一愿景的具体、生产就绪的实现——一个将 Claude 从对话式 AI 转变为能够与现实世界交互的可操作智能体的工具包。


许可证

MIT 许可证。详情请参阅 LICENSE

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.
    46
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
    49
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.
    2

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vyshnavi-nandyala/mcp-toolkit-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server