Generate Text with On-Device Foundation Models
Runs Apple's on-device Foundation Models framework as an MCP server, for private, local text generation on Apple Silicon Macs.
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Leverage Apple's on-device Foundation Models for secure and private text generation. This MCP server provides local access to language models, ideal for macOS applications requiring AI capabilities without external dependencies.
Outcomes
What it gets done
Integrate with Apple's Foundation Models framework for text generation.
Provide secure, private, and on-device language model access.
Enable text generation for macOS applications on Apple Silicon.
Support system instructions for customized AI responses.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-foundationmodels | bash Capabilities
Tools your agent gets
Generate text using Apple's Foundation Models framework with secure on-device processing.
Overview
FoundationModels MCP Server
This MCP server exposes Apple's on-device Foundation Models framework for private, local text generation, configurable via default system instructions. Use it on Apple Silicon Macs running macOS 26.0+ for private, local text generation. Conversation history/session management is not yet implemented.
What it does
mcp-foundation-models is an MCP server that exposes text generation through Apple's Foundation Models framework, letting MCP clients access Apple's on-device language models for secure, private text generation that runs entirely locally rather than through a cloud API.
When to use - and when NOT to
Use this when you want an MCP client to generate text using Apple's on-device models directly on a Mac, keeping generation private and local rather than routing through a third-party API. It requires macOS 26.0 (Tahoe) or later, Xcode 26.0+, Swift 6.2+, and an Apple Silicon Mac for optimal Foundation Models performance - it will not run on older macOS versions or Intel Macs without those requirements met. Session/conversation history management is listed as a to-do item, not yet implemented, so don't expect multi-turn context to persist automatically across calls.
Capabilities
Text generation via Apple's Foundation Models framework, configurable with SYSTEM_INSTRUCTIONS (default system prompt) and DEBUG (enable debug logging) environment variables.
How to install
git clone <repository-url>
cd mcp-foundation-models
swift build -c release
The executable is produced at .build/release/mcp-foundation-models. Claude Desktop configuration:
{
"mcpServers": {
"foundation-models": {
"command": "/path/to/mcp-foundation-models/.build/release/mcp-foundation-models",
"args": []
}
}
}
Who it's for
macOS developers on Apple Silicon who want private, on-device text generation through Apple's Foundation Models framework instead of a cloud-based LLM API. Licensed MIT.
Source 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
Clone the repository:
git clone <repository-url> cd mcp-foundation-modelsBuild the project:
swift build -c releaseThe 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 assistantDEBUG: Enable debug logging (any non-empty value)
Dependencies
- swift-argument-parser: Command line argument parsing
- swift-sdk (MCP): Model Context Protocol implementation
- swift-service-lifecycle: Graceful service lifecycle management
TODO
- manage some session id to keep some conversation history
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.