{"type":"mcp_client","name":"MCPSwiftWrapper","description":"MCPSwiftWrapper is a lightweight wrapper for mcp-swift-sdk, designed to integrate with LLM Swift libraries like SwiftOpenAI and SwiftAnthropic. It simplifies the creation of MCP Clients within macOS applications.","category":"AI","language":"Swift","stars":36,"forks":0,"owner":"jamesrochabrun","github_url":"https://github.com/jamesrochabrun/MCPSwiftWrapper","homepage":null,"setup":"## Setup\n\n1.  **Requirements:**\n    - macOS 14.0+\n    - Swift 6.0+\n    - Xcode 16.0+\n    - [npm/npx](https://www.npmjs.com/package/npx) installed on your system\n\n2.  **Installing npm/npx:**\n    - Install via Homebrew:\n      ```bash\n      brew install node\n      ```\n    - Or download and install directly from the [Node.js website](https://nodejs.org/)\n    - Verify installation:\n      ```bash\n      npx --version\n      ```\n\n3.  **Installation via Swift Package Manager:**\n    - Add the following dependency to your `Package.swift` file:\n      ```swift\n      dependencies: [\n          .package(url: \"https://github.com/jamesrochabrun/MCPSwiftWrapper\", from: \"1.0.0\")\n      ]\n      ```\n    - Or add it directly in Xcode:\n      1.  File > Add Package Dependencies\n      2.  Enter the GitHub URL: `https://github.com/jamesrochabrun/MCPSwiftWrapper`\n      3.  Click Add Package\n\n4.  **Important:** Disable app sandboxing in your app's entitlements file when building a client macOS app.","tools":"## Available Tools\n\n1.  **MCPClient Initialization:** (Initialize an MCP client to connect to a tool provider.)\n2.  **GitHub MCP Client Example:** (Provides an example of creating a GitHub MCP client.)\n3.  **Anthropic Integration:** (Provides methods to get tools for Anthropic and handle tool calls for Anthropic models.)\n4.  **OpenAI Integration:** (Provides methods to get tools for OpenAI and handle tool calls for OpenAI models.)\n5.  **Example Application:** (Includes a complete example application in the `Example/MCPClientChat` directory for a full implementation of a chat application using MCP with both Anthropic and OpenAI models.)","faq":null,"created_at":"2025-03-06T07:15:14+00:00","updated_at":"2025-03-28T18:58:21+00:00","source_url":"https://model-context-protocol.com/clients/swift-mcp-client-wrapper-macos-integration","related_articles":[]}