-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
92 lines (85 loc) · 2.61 KB
/
Makefile
File metadata and controls
92 lines (85 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Swift Developer MCP Server Makefile
.PHONY: build clean install path help
# Variables
EXECUTABLE_NAME = SwiftDeveloperMCPServer
BUILD_DIR = .build
RELEASE_DIR = $(BUILD_DIR)/release
EXECUTABLE_PATH = $(RELEASE_DIR)/$(EXECUTABLE_NAME)
# Default target
help:
@echo "Swift Developer MCP Server"
@echo "=========================="
@echo ""
@echo "Available targets:"
@echo " build - Build the server in release mode"
@echo " path - Build and display/copy executable path"
@echo " clean - Clean build artifacts"
@echo " install - Build and install to /usr/local/bin"
@echo " help - Show this help message"
@echo ""
# Build the server
build:
@echo "Building Swift Developer MCP Server..."
swift build -c release
@echo "✓ Build complete: $(EXECUTABLE_PATH)"
# Build and show path (with clipboard copy)
path: build
@echo ""
@echo "Executable path:"
@echo "$(shell pwd)/$(EXECUTABLE_PATH)"
@echo ""
@echo "$(shell pwd)/$(EXECUTABLE_PATH)" | pbcopy 2>/dev/null || echo "$(shell pwd)/$(EXECUTABLE_PATH)" | xclip -selection clipboard 2>/dev/null || echo "Clipboard copy not available"
@echo "✓ Path copied to clipboard"
@echo ""
@echo "Configuration examples:"
@echo ""
@echo "Cursor (.cursor-settings/settings.json):"
@echo '{'
@echo ' "mcp": {'
@echo ' "servers": {'
@echo ' "swift-developer": {'
@echo ' "command": "$(shell pwd)/$(EXECUTABLE_PATH)",'
@echo ' "args": [],'
@echo ' "env": {}'
@echo ' }'
@echo ' }'
@echo ' }'
@echo '}'
@echo ""
@echo "Windsurf (.windsurf/mcp_servers.json):"
@echo '{'
@echo ' "servers": {'
@echo ' "swift-developer": {'
@echo ' "command": "$(shell pwd)/$(EXECUTABLE_PATH)",'
@echo ' "args": [],'
@echo ' "env": {}'
@echo ' }'
@echo ' }'
@echo '}'
@echo ""
@echo "Claude Desktop (~/.config/claude/claude_desktop_config.json):"
@echo '{'
@echo ' "mcpServers": {'
@echo ' "swift-developer": {'
@echo ' "command": "$(shell pwd)/$(EXECUTABLE_PATH)",'
@echo ' "args": [],'
@echo ' "env": {}'
@echo ' }'
@echo ' }'
@echo '}'
@echo ""
@echo "Claude Code (Terminal Application):"
@echo "claude mcp add swift-developer $(shell pwd)/$(EXECUTABLE_PATH)"
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
swift package clean
rm -rf $(BUILD_DIR)
@echo "✓ Clean complete"
# Install to system
install: build
@echo "Installing to /usr/local/bin..."
sudo cp $(EXECUTABLE_PATH) /usr/local/bin/$(EXECUTABLE_NAME)
@echo "✓ Installed to /usr/local/bin/$(EXECUTABLE_NAME)"
@echo ""
@echo "You can now use 'SwiftDeveloperMCPServer' in your MCP client configuration"