PM

phimage/mcp-foundation-models

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 5 forks 质量 53 趋势 14MIT

MCP Server to generate message with Apple FoundationModels

概览

A Model Context Protocol (MCP) server that provides text generation capabilities using Apple's Foundation Models framework. This server enables MCP clients to access Apple's on-device language models for secure, private text generation. - : Leverages Apple's on-device language models for text generation - macOS 26.0 or later (macOS Tahoe) - Xcode 26.0 or later - Swift 6.2 or later - Apple Silicon Mac (for optimal Foundation Models) Edit Claude configuration file '$HOME/Library/Application Support/Claude/claude_desktop_config.json' Add this server full path as "mcpServers" sub object The server supports configuration through environment variables: - SYSTEM_INSTRUCTIONS: Set default system instructions for the AI assistant - DEBUG: Enable debug logging (any non-empty value) - swift-argument-parser: Command line argument parsing - swift-sdk (MCP): Model Context Protocol implementation - swift-service-lifecycle: Graceful service lifecycle management

README

mcp-foundation-models

A Model Context Protocol (MCP) server that provides text generation capabilities using Apple’s Foundation Models framework. This server enables MCP clients to access Apple’s on-device language models for secure, private text generation.

Features

  • Apple Foundation Models Integration: Leverages Apple’s on-device language models for text generation

Requirements

  • macOS 26.0 or later (macOS Tahoe)
  • Xcode 26.0 or later
  • Swift 6.2 or later
  • Apple Silicon Mac (for optimal Foundation Models)

Installation

Building from Source

  1. Clone the repository:

    git clone 
    cd mcp-foundation-models
    
  2. Build the project:

    swift build -c release
    
  3. The executable will be available at:

    .build/release/mcp-foundation-models
    

Use it in Claude Desktop for instance

Edit Claude configuration file ‘$HOME/Library/Application Support/Claude/claude_desktop_config.json’

Add this server full path as “mcpServers” sub object

{
  "mcpServers": {
    "foundation-models": {
      "command": "/path/to/mcp-foundation-models/.build/release/mcp-foundation-models",
      "args": [
      ]
    }

Environment Variables

The server supports configuration through environment variables:

  • SYSTEM_INSTRUCTIONS: Set default system instructions for the AI assistant
  • DEBUG: Enable debug logging (any non-empty value)

Dependencies

TODO

  • manage some session id to keep some conversation history

License

MIT

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "foundation-models": { "command": "/path/to/mcp-foundation-models/.build/release/mcp-foundation-models", "args": [ ] }