MCP Template
A barebones MCP server implementation in Swift using loopwork-ai's mcp-swift-sdk.
Overview
MCP Template is a barebones repository designed to help developers build Model Control Protocol (MCP) servers for macOS applications and command line tools using the mcp-swift-sdk.
To use MCP Template, clone or fork the repository, build the package, and modify the EasyMCP implementation to add custom functionality. You can also run the included command line example to see basic usage.
- Basic Swift package structure for easy integration - Command line "hello world" example tool - Direct MCP interaction via command line stdio - Template for creating your own MCP server implementations
- Building custom MCP servers for macOS applications
- Developing command line tools that utilize the MCP protocol
- Learning and experimenting with MCP concepts and the mcp-swift-sdk
Add to your AI client
Use these steps to connect MCP Template in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-template-adamwulf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-template-adamwulf"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-template-adamwulf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-template-adamwulf"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-template-adamwulf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-template-adamwulf"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-template-adamwulf": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-template-adamwulf"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-template-adamwulf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-template-adamwulf"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-template-adamwulf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-template-adamwulf"
]
}
}
}FAQ
Is MCP Template suitable for beginners?
Yes! It provides a simple foundation for understanding MCP integration.
Can I modify the template for my own projects?
Absolutely! The template is designed to be forked and customized.
What programming language is used?
MCP Template is implemented in Swift.