en un clic
mcp-new-app
互動式建立新 MCP Server 專案(Swift/Python/TypeScript)
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
互動式建立新 MCP Server 專案(Swift/Python/TypeScript)
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Turn a journal / reference article PDF into a faithful, compile-verified LaTeX "article record" — metadata frontmatter + every theorem, definition and numbered equation (original numbers preserved) + references + flagged editorial notes — saved next to the PDF as year_author_title.tex. Reach for this whenever the user wants to transcribe, OCR, extract, "make a record of", or pull the theorems / equations out of a paper or PDF into LaTeX, or adds a reference PDF and wants it turned into a structured .tex — even when they literally say "OCR it": this skill checks for a text layer first and deliberately avoids OCR on born-digital PDFs, because re-recognizing rendered math is less accurate than reading the embedded text. Especially valuable for math-heavy papers where equation fidelity matters.
發布或更新 MCP Server 到官方 MCP Registry 及第三方平台(Glama、awesome-mcp-servers)
Unblock Apple notarization / signed releases when blocked by an updated or expired Apple Developer Program License Agreement (the notarytool / Transporter HTTP 403 "A required agreement is missing or has expired"). Accepts the pending agreement on developer.apple.com via Safari + AppleScript, then re-verifies and resumes the release. Use when: `xcrun notarytool` / `make release-signed` fails with 403 "required agreement", or user says "notarization blocked", "公證被擋", "Apple 協議過期", "accept apple agreement", "Program License Agreement", "notary 403", "release 卡在 Apple 協議". Do NOT use for 401 "Invalid credentials" (that is an app-specific-password / key problem — re-run `xcrun notarytool store-credentials`, a user-only action).
macOS native browser automation via Safari + AppleScript. Use when the user needs to automate websites that require login (Plaud, Elementor, banking, social media) — Safari preserves localStorage and cookies permanently. Also use when agent-browser fails due to session/auth issues, or when the user explicitly asks to use Safari. Triggers on: "login to site", "automate with Safari", "use Safari", "session expired with agent-browser", "Plaud upload", or any website automation where persistent auth is needed.
更新 Plugin 到最新版本(marketplace.json 同步 + marketplace update + plugin update + 安裝檢查)。當修改了任何 plugin 原始碼後需要同步、或用戶提到「更新 plugin」、「同步 plugin」、「plugin 沒生效」、「reload plugins」時使用。
LaTeX source 編譯前的 static check — punct_check(半形/全形標點)+ fonts_check(字型缺字,需既有 .log)+ source-level pattern audit。當用戶說「precompile check」「編譯前檢查」「跑 make check」「source audit」「掃半形標點」「掃缺字」時使用。對應暑期班 typesetting-checklist 的
| name | mcp-new-app |
| description | 互動式建立新 MCP Server 專案(Swift/Python/TypeScript) |
| argument-hint | ["project-name"] |
| allowed-tools | Write, Read, Bash(mkdir:*), Bash(git:*), Bash(chmod:*), Bash(swift:*), Bash(npm:*), Bash(python:*), Glob, AskUserQuestion |
| disable-model-invocation | true |
互動式建立完整的 MCP Server 專案結構。
部署專案請用 /mcp-tools:mcp-deploy
$1 = 專案名稱(可選,如 che-notes-mcp)動任何事之前先用 TaskCreate 建 todo list:
TaskCreate(name="collect_info", description="Phase 0: 確認專案名稱 + 收集資訊 + 確認位置")
TaskCreate(name="create_structure", description="Phase 1: 建立專案結構(Package.swift + Sources + Tests + mcpb)")
TaskCreate(name="setup_git_and_mcpb", description="Phase 2: Git init + .gitignore + .gitattributes + mcpb/manifest + PRIVACY + README + CHANGELOG + LICENSE")
TaskCreate(name="report", description="Phase 3: 完成報告")
完成每一步立即 TaskUpdate → completed。靜默完成 = 違規。
如果沒有提供 $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 會用到 macOS 隱私 API**(EventKit / AppleEvents / Photos / Mic / Camera / Full Disk Access)→ **裝簽章 pipeline**:使用 `/mcp-tools:mcp-sign-pipeline`
- macOS 26 的 TCC 不再對 ad-hoc 簽章的 binary 開放 permission dialog;若要 outside-MAS distribution 必須走 Developer ID + hardened runtime + notarization
- 此 skill 會自動把 `scripts/sign-and-notarize.sh` + `Makefile release-signed` + `Sources/<Target>/Entitlements.plist` + README + CHANGELOG 補進你新建的 MCP
- 純檔案 I/O / HTTP / 字串處理 MCP 不需要(簽章只影響 Gatekeeper warning,不影響功能)
4. **部署**:使用 `/mcp-tools:mcp-deploy`
- 會自動編譯、打包 .mcpb、發布到 GitHub Release
- 若已裝 sign-pipeline,可用 `make release-signed` 跑 signed release(macOS 26 必要)
| 輸入 | 專案名 | 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 |