PlugWiki

swift-mcp-server-generator Skill (awesome-copilot): Build a Swift MCP Server

Generates a complete MCP server project in Swift with the official MCP Swift SDK, including tools, resources, prompts and tests.

Installs
8.8K
on skills.sh
Stars
40.7K
on GitHub
Updated
Oct 2026
last repo commit

This skill has your assistant write a full Swift package for an MCP server. It asks for a project name and description, then generates 11 templated files: Package.swift, main.swift, Server.swift, tool, resource and prompt files, tests and a README.

The result runs over stdio and includes example tools, resources and one prompt. It needs Swift 6.0 or newer and downloads three Swift packages on the first build. The skill bundles no scripts.

Good for

  • Swift developers building an MCP server for iOS, macOS or Linux
  • Developers who want a working starting project with logging, graceful shutdown and tests
  • Teams exposing Apple-platform code to AI assistants through MCP

Install swift-mcp-server-generator

Claude Code

  1. 1

    Download the skill folder from https://github.com/github/awesome-copilot/tree/HEAD/skills/swift-mcp-server-generator.

  2. 2

    Put it at ~/.claude/skills/swift-mcp-server-generator/ so that SKILL.md sits directly inside.

  3. 3

    Start a new session; the skill loads when its description matches the task.

Requires Swift 6.0 or newer.

Pick one route. The Copilot plugin route installs swift-mcp-development, which lists this skill and the Swift MCP Expert agent (agents/swift-mcp-expert.agent.md) and no hooks or MCP servers. The skills CLI and folder routes install only this skill. The skill runs Swift commands in your project, so there is no Claude app upload route.

Built from the package data we hold. Not yet tested by us.

What's in the skill

When it loads

Generate a complete Model Context Protocol server project in Swift using the official MCP Swift SDK package.

Sections in SKILL.md

  1. Project Generation
  2. Package.swift Template
  3. main.swift Template
  4. Server.swift Template
  5. ToolDefinitions.swift Template
  6. ToolHandlers.swift Template
  7. ResourceDefinitions.swift Template
  8. ResourceHandlers.swift Template
  9. PromptDefinitions.swift Template
  10. PromptHandlers.swift Template
  11. ServerTests.swift Template
  12. README.md Template
  13. Features
  14. Requirements
  15. Installation
  16. Usage

Key facts

License
MIT
Installs on skills.sh
8,768 (Nov 2, 2026)
Last repo commit
Oct 30, 2026

What it includes

  • A my-mcp-server package with Sources, Tests and README.md.

    Sources hold main.swift, Server.swift and Tools, Resources and Prompts folders with definition and handler files.

    Write · Project structure

  • Swift 6.0 package using the MCP Swift SDK, swift-log and ServiceLifecycle.

    main.swift runs the server over a stdio transport with graceful shutdown.

    Write · Package.swift and main.swift

  • Creates the server and registers tool, resource and prompt handlers.

    Capabilities enable prompts, resources (with subscribe) and tools, each with listChanged.

    Server.swift

  • Two example tools, greet and calculate, with their handlers.

    calculate takes add, subtract, multiply or divide plus two numbers.

    Write · Tools templates

  • Two example resources (Example Data and Configuration) with subscription state.

    Handlers keep subscriptions in an actor for thread safety.

    Write · Resources templates

  • One example prompt, code-review, with language and focus arguments.

    language is required and focus is optional.

    Write · Prompts templates

  • A test file for the handlers.

    Run it with swift test.

    Write · ServerTests.swift

  • Ask for a project name and description, then follow ten rules for the code.

    Rules include actor-based state, swift-log logging, graceful shutdown, tests for all handlers and doc comments.

    Generation instructions

  • swift build, swift run, swift test, release build, and copy the binary to /usr/local/bin.

    Also a claude_desktop_config.json snippet that points command at the built binary.

    Runs code · Build and run

From the official docs

Permissions

Low risk

It writes a new project and suggests building it and copying the binary into /usr/local/bin. Check the folder it writes to before you approve.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • The build downloads Swift packages

    The Package.swift template depends on three GitHub packages, pinned with from: versions. They are fetched on the first swift build. github.com

  • It suggests installing into /usr/local/bin

    The Install step copies the release binary there. Skip it if you would rather run the binary from the build folder. github.com

  • The plugin also adds an agent

    The swift-mcp-development plugin lists the Swift MCP Expert agent. Its file sets a model and no tool list. github.com

Technical details
Turning on read-onlyNo read-only mode. The skill generates files.
Talks togithub.com (SwiftPM downloads modelcontextprotocol/swift-sdk, apple/swift-log and swift-server/swift-service-lifecycle)
Scopes
  • Writes a new Swift package (11 templated files) into your folder

  • Runs swift build, swift run and swift test if you ask for them

  • Copies the release binary to /usr/local/bin in the Build and Run section

Questions

What does swift-mcp-server-generator do?

It makes your assistant generate a full Swift project for an MCP server. The project uses the official MCP Swift SDK and has example tools, resources and prompts, logging, graceful shutdown and tests. It starts by asking for a project name and description.

What do I need to run the result?

Swift 6.0 or newer. The generated README says macOS 13+, iOS 16+ or Linux. The first build downloads three Swift packages: the MCP Swift SDK, swift-log and swift-service-lifecycle.

How do I install it?

Use the install box above. The Copilot CLI tab installs the swift-mcp-development plugin, which adds this skill and a Swift MCP Expert agent. The skills CLI and folder routes install only this skill.

How do I connect the server it generates to Claude Desktop?

The SKILL.md ends with a claude_desktop_config.json snippet. It adds an mcpServers entry whose command is the full path to the built binary. Build a release version first.

Is it safe?

It bundles no scripts. It writes a new project into your folder, and its Build and Run section includes copying the release binary to /usr/local/bin. The first swift build downloads packages from GitHub.

Does it work in Claude?

The SKILL.md names no client. It generates files and runs Swift commands, so it fits an agent that works in your project folder. The install box has Claude Code and Codex routes and no Claude app upload route.

Information

updated Nov 2, 2026

Folder
skills/swift-mcp-server-generator

github/awesome-copilotskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 5
  1. swift-mcp-server-generator SKILL.md · github.com
  2. plugin.json · github.com
  3. swift-mcp-development plugin README · github.com
  4. awesome-copilot README · github.com
  5. swift-mcp-expert.agent.md · github.com

Updated Nov 2, 2026.