MCP.so
ログイン

MCP Swift Example Server

@devyhan

基本情報

カテゴリ

その他

ライセンス

MIT license

トランスポート

stdio

作者

devyhan

MCP Swift Example Server について

Example MCP(Model Context Protocol) Server Impl

#mcp#swift#example-server

MCP Swift Example Server の設定

標準の設定はありません

このサーバーの README には解析可能な MCP 設定ブロックが含まれていません。インストール手順はリポジトリをご確認ください。

リポジトリ

MCP Swift Example Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP Swift Example Server?

A basic example server demonstrating how to create a simple Model Context Protocol (MCP) server using the Swift MCP SDK. It communicates over standard input/output (stdio) and is compatible with applications like Claude Desktop.

How to use MCP Swift Example Server?

Clone the repository, build with swift build -c release, then add the absolute path to the compiled executable to your claude_desktop_config.json under mcpServers. An optional client example is available in the Examples directory.

Key features of MCP Swift Example Server

  • Sets up a basic MCP server using the Swift SDK
  • Defines and registers a custom tool (swift_echo)
  • Handles ListTools and CallTool requests
  • Uses StdioTransport for communication
  • Detailed logging to stderr

Use cases of MCP Swift Example Server

  • Learning how to build an MCP server in Swift
  • Testing the MCP protocol with a simple echo tool
  • Integrating custom tools into Claude Desktop
  • Experimenting with the Swift MCP SDK

よくある質問

1

What are the runtime requirements?

macOS 13 or later and Swift 5.9 or later are required.

2

How does the server communicate?

It communicates over standard input/output (stdio) using the `StdioTransport`.

3

What tool does this server provide?

It provides a single tool named `swift_echo`, which echoes input back to the caller.

4

How do I configure Claude Desktop to use this server?

Add an entry to your `claude_desktop_config.json` with the server name and the absolute path to the compiled executable as the command.

5

Where is the source code located?

The project structure includes `main.swift` (entry point), `MCPServer` (protocol implementation), and `EchoToolbox` (tool provider).

コメント

「その他」の他のコンテンツ