Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计提醒

mcp-builderMCP 构建器

Agent Skill

mcp-builder 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

392

周安装

16

GitHub Stars

8

下载量

125
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mcp-builder(MCP 构建器)
来源仓库:https://github.com/vamseeachanta/workspace-hub
仓库路径:skills/mcp-builder
安装命令:
npx skills add https://github.com/vamseeachanta/workspace-hub --skill mcp-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vamseeachanta/workspace-hub --skill mcp-builder

简介

用于查找、检索和筛选相关信息,适合根据关键词、任务场景或来源线索快速定位候选结果。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 安装命令:npx skills add https://github.com/vamseeachanta/workspace-hub --skill mcp-builder
  • 适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境。

SKILL.md

MCP Builder Skill

Version: 1.2.0 Category: Development Last Updated: 2026-01-02

Overview

This skill teaches how to build high-quality MCP servers that allow large language models to interact with external services through well-designed tools.

Quick Start

# Create and setup MCP server project
mkdir my-mcp-server && cd my-mcp-server
npm init -y
npm install @modelcontextprotocol/sdk zod
npm install -D typescript @types/node

# Create source directory
mkdir src
// src/index.ts - Minimal MCP Server
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";

const server = new Server(
  { name: "my-server", version: "1.0.0" },
  { capabilities: { tools: {} } }
);

server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [{
    name: "hello_world",
    description: "Returns a greeting message",
    inputSchema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] }
  }]
}));

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name === "hello_world") {
    return { content: [{ type: "text", text: `Hello, ${request.params.arguments?.name}!` }] };
  }
  throw new Error(`Unknown tool: ${request.params.name}`);
});

const transport = new StdioServerTransport();
await server.connect(transport);

When to Use

  • Creating integrations for Claude Code with external APIs
  • Building custom tooling for AI-assisted workflows
  • Extending Claude's capabilities with domain-specific tools
  • Automating interactions with third-party services
  • Building reusable MCP servers for team sharing

Four-Phase Development Process

Phase 1: Deep Research and Planning

Study MCP Design Principles:

  • Balance "API coverage vs. workflow tools"
  • Review MCP protocol at modelcontextprotocol.io
  • Learn framework specifics (TypeScript recommended)
  • Analyze target API endpoints

Key Questions:

  1. What actions does the user want to perform?
  2. What API endpoints are available?
  3. Which operations are read-only vs destructive?
  4. How should errors be handled?

Phase 2: Implementation

Project Setup (TypeScript):

mkdir my-mcp-server
cd my-mcp-server
npm init -y
npm install @modelcontextprotocol/sdk zod
npm install -D typescript @types/node

tsconfig.json:

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "outDir": "./dist",
    "strict": true,
    "esModuleInterop": true
  },
  "include": ["src/**/*"]
}

Basic Server Structure:

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
  CallToolRequestSchema,
  ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";

const server = new Server(
  { name: "my-server", version: "1.0.0" },
  { capabilities: { tools: {} } }
);

// List available tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: "my_tool",
      description: "Description of what this tool does",
      inputSchema: {
        type: "object",
        properties: {
          param1: { type: "string", description: "First parameter" },
          param2: { type: "number", description: "Second parameter" }
        },
        required: ["param1"]
      }
    }
  ]
}));

// Handle tool calls
server.setRequestHandler(CallToolRequestSchema, async (request) => {
  const { name, arguments: args } = request.params;

  if (name === "my_tool") {
    // Tool implementation
    return {
      content: [{ type: "text", text: "Result" }]
    };
  }

  throw new Error(`Unknown tool: ${name}`);
});

// Start server
const transport = new StdioServerTransport();
await server.connect(transport);

Phase 3: Review and Test

Code Quality Checklist:

  • No code duplication
  • Full type coverage
  • Proper error handling
  • Input validation
  • Rate limiting (if needed)

Testing with MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js

Phase 4: Create Evaluations

Generate 10 complex, realistic test questions:

  • Independent (no dependencies between questions)
  • Read-only (don't modify external state)
  • Verifiable (clear expected answers)

Key Recommendations

Language Choice

TypeScript preferred for:

  • High-quality SDK support
  • Good compatibility
  • Strong typing

Transport Selection

  • Streamable HTTP: Remote servers
  • stdio: Local servers

Tool Naming

Use consistent, action-oriented prefixes:

github_create_issue
github_list_repos
slack_send_message
slack_list_channels

Error Messages

Provide actionable messages with specific next steps:

throw new Error(
  `Failed to fetch repository: ${error.message}. ` +
  `Check that the repository exists and you have access.`
);

Tool Annotations

{
  name: "delete_file",
  description: "Permanently delete a file",
  inputSchema: { /* ... */ },
  annotations: {
    destructiveHint: true,
    readOnlyHint: false,
    confirmationHint: "Are you sure you want to delete this file?"
  }
}

Advanced Patterns

Pagination

async function listAllItems(apiClient: Client): Promise<Item[]> {
  const items: Item[] = [];
  let cursor: string | undefined;

  do {
    const response = await apiClient.list({ cursor, limit: 100 });
    items.push(...response.items);
    cursor = response.nextCursor;
  } while (cursor);

  return items;
}

Rate Limiting

import Bottleneck from "bottleneck";

const limiter = new Bottleneck({
  maxConcurrent: 1,
  minTime: 100  // 10 requests per second
});

const rateLimitedFetch = limiter.wrap(fetch);

Authentication

const API_KEY = process.env.MY_API_KEY;

if (!API_KEY) {
  throw new Error(
    "MY_API_KEY environment variable is required. " +
    "Get your API key from https://example.com/settings"
  );
}

Integration with Claude Code

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "my-server": {
      "command": "node",
      "args": ["/path/to/dist/index.js"],
      "env": {
        "MY_API_KEY": "your-api-key"
      }
    }
  }
}

Project Configuration (New in 2025)

.mcp.json for Team Sharing

Commit MCP server configs to your repository:

// .mcp.json (project root)
{
  "mcpServers": {
    "project-db": {
      "command": "node",
      "args": ["./tools/mcp-server/dist/index.js"],
      "env": {
        "DB_PATH": "./data/project.db"
      }
    }
  }
}

Scope changes (2025):

  • project scope -> Now called local (per-project)
  • global scope -> Now called user (user-wide)
  • New: Checked-in .mcp.json files for team sharing

Permission Wildcards

Use wildcard syntax for server permissions:

# Allow all tools from a server
mcp__my-server__*

# In settings.json allowlist
{
  "permissions": {
    "allow": ["mcp__database__*", "mcp__github__*"]
  }
}

Timeout Configuration

# Set MCP server startup timeout (default: 30s)
export MCP_TIMEOUT=60000  # 60 seconds

# Debug mode for troubleshooting
claude --mcp-debug

Usage Examples

Example 1: Database Query Tool

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name === "query_database") {
    const { sql, params } = request.params.arguments;
    const result = await db.query(sql, params);
    return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
  }
});

Example 2: API Integration

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name === "fetch_weather") {
    const { city } = request.params.arguments;
    const response = await fetch(`https://api.weather.com/v1/${city}`);
    const data = await response.json();
    return { content: [{ type: "text", text: `Temperature: ${data.temp}F` }] };
  }
});

Best Practices

Do

  1. Use TypeScript for type safety
  2. Validate all inputs with Zod
  3. Provide clear, actionable error messages
  4. Use environment variables for secrets
  5. Implement rate limiting for external APIs
  6. Add tool annotations for destructive operations

Don't

  1. Hardcode API keys or secrets
  2. Skip input validation
  3. Return raw error stack traces
  4. Create overly complex tool schemas
  5. Ignore rate limits on external services

Error Handling

Common Errors

ErrorCauseSolution
ECONNREFUSEDServer not runningStart the MCP server process
Tool not foundIncorrect tool nameCheck ListToolsRequestSchema handler
Invalid argumentsSchema mismatchValidate against inputSchema
Authentication failedMissing/invalid API keySet environment variable correctly
TimeoutSlow responseIncrease MCP_TIMEOUT or optimize handler

Error Template

try {
  const result = await operation();
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
} catch (error) {
  throw new Error(
    `Operation failed: ${error.message}. ` +
    `Please check your configuration and try again.`
  );
}

Execution Checklist

  • Project initialized with TypeScript and MCP SDK
  • tsconfig.json configured for ES2020/NodeNext
  • Server implements ListToolsRequestSchema handler
  • Server implements CallToolRequestSchema handler
  • Input validation with Zod schemas
  • Error handling with actionable messages
  • Environment variables for sensitive config
  • Tested with MCP Inspector
  • Added to claude_desktop_config.json or.mcp.json
  • Documentation complete

Metrics

MetricTargetDescription
Response Time<500msTool execution latency
Error Rate<1%Percentage of failed tool calls
Type Coverage100%TypeScript strict mode compliance
Test Coverage>80%Unit test coverage

Security Best Practices

  1. Use trusted servers - Only from official/verified sources
  2. Least privilege - Grant minimal required permissions
  3. Audit logs - Maintain comprehensive access logs
  4. Environment isolation - Use containers for high-risk automation
  5. No hardcoded secrets - Always use environment variables

Resources

Related Skills


Version History

  • 1.2.0 (2026-01-02): Upgraded to SKILL_TEMPLATE_v2 format with Quick Start, Error Handling, Metrics, Execution Checklist
  • 1.1.0 (2025-12-30): Added.mcp.json project config, permission wildcards, MCP_TIMEOUT, security best practices
  • 1.0.0 (2025-10-15): Initial release with four-phase development process

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.44%
按下载量换算39

windsurf

21.44%
按下载量换算27

trae

17.23%
按下载量换算22

OpenCode

12.18%
按下载量换算15

Cursor

8.36%
按下载量换算10

Codex

3.99%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills