npx claudepluginhub psychquant/psychquant-claude-plugins --plugin mcp-toolsThis skill is limited to using the following tools:
互動式建立完整的 MCP Server 專案結構。
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
互動式建立完整的 MCP Server 專案結構。
部署專案請用 /mcp-tools:mcp-deploy
$1 = 專案名稱(可選,如 che-notes-mcp)如果沒有提供 $1,使用 AskUserQuestion 詢問:
專案名稱規則:
{prefix}-{name}-mcp(如 che-notes-mcp)mcp 結尾使用 AskUserQuestion 詢問以下資訊:
Notes Manager)預設位置:/Users/che/Library/CloudStorage/Dropbox/che_workspace/projects/mcp/{project-name}
根據選擇的語言,建立對應的專案結構。
mkdir -p {project-path}
mkdir -p {project-path}/mcpb/server
mkdir -p {project-path}/docs
mkdir -p {project-path}/Sources/{ProjectName}
mkdir -p {project-path}/Sources/{ProjectName}Core
mkdir -p {project-path}/Tests/{ProjectName}Tests
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "{ProjectName}",
platforms: [.macOS(.v13)],
products: [
.library(name: "{ProjectName}Core", targets: ["{ProjectName}Core"])
],
dependencies: [
.package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.10.2")
],
targets: [
.target(
name: "{ProjectName}Core",
dependencies: [.product(name: "MCP", package: "swift-sdk")],
path: "Sources/{ProjectName}Core"
),
.executableTarget(
name: "{ProjectName}",
dependencies: ["{ProjectName}Core"],
path: "Sources/{ProjectName}"
),
.testTarget(
name: "{ProjectName}Tests",
dependencies: ["{ProjectName}Core"],
path: "Tests/{ProjectName}Tests"
)
]
)
// Sources/{ProjectName}/main.swift
import Foundation
import {ProjectName}Core
do {
let server = try await {ProjectName}Server()
try await server.run()
} catch {
fputs("Error: \(error)\n", stderr)
exit(1)
}
// Sources/{ProjectName}Core/Server.swift
import Foundation
import MCP
public class {ProjectName}Server {
private let server: Server
private let transport: StdioTransport
private let tools: [Tool]
public init() async throws {
tools = Self.defineTools()
server = Server(
name: "{project-name}",
version: "0.1.0",
capabilities: .init(tools: .init())
)
transport = StdioTransport()
await registerHandlers()
}
public func run() async throws {
try await server.start(transport: transport)
await server.waitUntilCompleted()
}
// MARK: - Tool Definitions
private static func defineTools() -> [Tool] {
[
Tool(
name: "hello_world",
description: "A simple hello world tool",
inputSchema: .object([
"type": .string("object"),
"properties": .object([
"name": .object([
"type": .string("string"),
"description": .string("Name to greet")
])
]),
"required": .array([])
])
)
]
}
// MARK: - Handler Registration
private func registerHandlers() async {
await server.withMethodHandler(ListTools.self) { _ in
ListTools.Result(tools: self.tools)
}
await server.withMethodHandler(CallTool.self) { params in
try await self.handleToolCall(params)
}
}
private func handleToolCall(_ params: CallTool.Request) async throws -> CallTool.Result {
switch params.name {
case "hello_world":
let name = (params.arguments?["name"] as? String) ?? "World"
return CallTool.Result(
content: [.text("Hello, \(name)!")],
isError: false
)
default:
return CallTool.Result(
content: [.text("Unknown tool: \(params.name)")],
isError: true
)
}
}
}
mkdir -p {project-path}/src/{project_name}
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "{project-name}"
version = "0.1.0"
description = "{description}"
requires-python = ">=3.10"
dependencies = [
"mcp>=1.0.0",
]
[project.scripts]
{project-name} = "{project_name}:main"
# src/{project_name}/__init__.py
from .server import main
__all__ = ["main"]
# src/{project_name}/__main__.py
from .server import main
if __name__ == "__main__":
main()
# src/{project_name}/server.py
import asyncio
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent
app = Server("{project-name}")
@app.list_tools()
async def list_tools() -> list[Tool]:
return [
Tool(
name="hello_world",
description="A simple hello world tool",
inputSchema={
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name to greet"
}
},
"required": []
}
)
]
@app.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
if name == "hello_world":
greeting_name = arguments.get("name", "World")
return [TextContent(type="text", text="Hello, " + greeting_name + "!")]
raise ValueError("Unknown tool: " + name)
def main():
async def run():
async with stdio_server() as (read_stream, write_stream):
await app.run(read_stream, write_stream, app.create_initialization_options())
asyncio.run(run())
if __name__ == "__main__":
main()
mkdir -p {project-path}/src
{
"name": "{project-name}",
"version": "0.1.0",
"description": "{description}",
"type": "module",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0"
},
"devDependencies": {
"typescript": "^5.0.0",
"@types/node": "^20.0.0"
}
}
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
},
"include": ["src/**/*"]
}
// src/index.ts
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: "{project-name}", version: "0.1.0" },
{ capabilities: { tools: {} } }
);
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "hello_world",
description: "A simple hello world tool",
inputSchema: {
type: "object",
properties: {
name: { type: "string", description: "Name to greet" }
},
required: []
}
}
]
}));
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === "hello_world") {
const name = (request.params.arguments as any)?.name || "World";
return { content: [{ type: "text", text: "Hello, " + name + "!" }] };
}
throw new Error("Unknown tool: " + request.params.name);
});
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
}
main().catch(console.error);
cd {project-path}
git init
根據語言建立對應的 .gitignore:
Swift:
.build/
.swiftpm/
Package.resolved
*.xcodeproj
*.xcworkspace
DerivedData/
Python:
__pycache__/
*.py[cod]
.venv/
venv/
dist/
*.egg-info/
TypeScript:
node_modules/
dist/
*.js.map
*.mcpb filter=lfs diff=lfs merge=lfs -text
mcpb/server/* filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text binary
git lfs install
git add .gitattributes
重要:MCPB 0.3 規範對欄位格式有嚴格要求,錯誤會導致 Claude Desktop 顯示 "Invalid manifest"。
{
"manifest_version": "0.3",
"name": "{project-name}",
"version": "0.1.0",
"description": "{description}",
"author": {
"name": "Che Cheng"
},
"license": "MIT",
"homepage": "https://github.com/kiki830621/{project-name}",
"repository": {
"type": "git",
"url": "https://github.com/kiki830621/{project-name}"
},
"server": {
"type": "binary",
"entry_point": "server/{BinaryName}",
"mcp_config": {
"command": "$DIRNAME/server/{BinaryName}",
"args": [],
"env": {}
}
},
"keywords": []
}
不要使用的欄位(會被拒絕):
idname 即可platformscapabilitiesdisplay_nametools# Privacy Policy
## Data Collection
This MCP server:
- Runs entirely locally on your Mac
- Does not collect or transmit any personal data
- Does not connect to external servers
- Only accesses local system resources as required for functionality
## Data Storage
No data is stored by this extension beyond what is necessary for its operation.
## Third-Party Services
This extension does not use any third-party services.
## Contact
For questions about this privacy policy, please open an issue at:
https://github.com/kiki830621/{project-name}/issues
# {project-name}
{description}
## Installation
### Claude Code CLI
```bash
mkdir -p ~/bin
# Download binary from releases
chmod +x ~/bin/{BinaryName}
claude mcp add --scope user --transport stdio {project-name} -- ~/bin/{BinaryName}
| Tool | Description |
|---|---|
hello_world | A simple hello world tool |
MIT
### Step 7: CHANGELOG.md
```markdown
# Changelog
## [0.1.0] - {date}
### Added
- Initial release
- `hello_world` tool
MIT License
Copyright (c) {year} Che Cheng
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# MCP 專案建立完成
## 專案資訊
- 名稱: {project-name}
- 語言: Swift / Python / TypeScript
- 位置: {project-path}
## 建立的檔案
### 核心檔案
- [ ] Package.swift / pyproject.toml / package.json
- [ ] Server 程式碼
### Git 設定
- [ ] .gitignore
- [ ] .gitattributes (LFS)
### MCPB 套件(用於 Claude Desktop Extension Marketplace)
- [ ] mcpb/manifest.json - 套件 metadata
- [ ] mcpb/PRIVACY.md - 隱私政策
- [ ] mcpb/server/ - Binary 存放目錄
- [ ] mcpb/{project}.mcpb - 打包後的套件檔(部署時產生)
### 文件
- [ ] README.md
- [ ] CHANGELOG.md
- [ ] LICENSE
## 下一步
1. **編輯 Server 程式碼**,加入你的功能
2. **測試編譯**:
- Swift: `swift build`
- Python: `pip install -e .`
- TypeScript: `npm install && npm run build`
3. **部署**:使用 `/mcp-tools:mcp-deploy`
- 會自動編譯、打包 .mcpb、發布到 GitHub Release
| 輸入 | 專案名 | Binary 名 | 類別名 |
|---|---|---|---|
che-notes-mcp | che-notes-mcp | CheNotesMCP | CheNotesMCPServer |
my-tool-mcp | my-tool-mcp | MyToolMCP | MyToolMCPServer |
| 情境 | 推薦語言 |
|---|---|
| macOS 原生整合(AppleScript, EventKit) | Swift |
| 快速原型開發 | Python |
| Node.js 生態系整合 | TypeScript |
| 跨平台需求 | Python / TypeScript |