swift-mcp-server-generator
Generate a complete Model Context Protocol server project in Swift using the official MCP Swift SDK package.
npx skills add github/awesome-copilot --skill swift-mcp-server-generator --agent copilot
Same command for any agent — swap --agent for claude-code, codex, cursor.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Swift MCP Server Generator Generate a complete, production-ready MCP server in Swift using the official Swift SDK package. ## Project Generation When asked to create a Swift MCP server, generate a complete project with this structure: ``` my-mcp-server/ ├── Package.swift ├── Sources/ │ └── MyMCPServer/ │ ├── main.swift │ ├── Server.swift │ ├── Tools/ │ │ ├── ToolDefinitions.swift │ │ └── ToolHandlers.swift │ ├── Resources/ │ │ ├── ResourceDefinitions.swift │ │ └── ResourceHandlers.swift │ └── Prompts/ │ ├── PromptDefinitions.swift │ └── PromptHandlers.swift ├── Tests/ │ └── MyMCPServerTests/ │ └── ServerTests.swift └── README.md ``` ## Package.swift Template ```swift // swift-tools-version: 6.0 import PackageDescription let package = Package( name: "MyMCPServer", platforms: [ .macOS(.v13), .iOS(.v16), .watchOS(.v9), .tvOS(.v16), .visionOS(.v1) ], dependencies: [ .package( url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.10.0" ), .package( url: "https://github.com/apple/swift-log.git", from: "1.5.0" ), .package( url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.0.0" ) ], targets: [ .executableTarget( name: "MyMCPServer", dependencie
- Project Generation
- Package.swift Template
- main.swift Template
- Server.swift Template
- ToolDefinitions.swift Template
- ToolHandlers.swift Template
- ResourceDefinitions.swift Template
- ResourceHandlers.swift Template
- PromptDefinitions.swift Template
- PromptHandlers.swift Template
- ServerTests.swift Template
- README.md Template
- Generation Instructions
- Build and Run
Build swift build Run swift run Test swift test Release build swift build -c release Install cp .build/release/MyMCPServer /usr/local/bin/
What does the swift-mcp-server-generator skill do?
Generate a complete Model Context Protocol server project in Swift using the official MCP Swift SDK package.
How do I install it?
Run `npx skills add github/awesome-copilot --skill swift-mcp-server-generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.