一个原生的macOS Swift应用程序,实现了完整的模型上下文协议(MCP)服务器,用于Things 3和Apple Notes的集成。
状态: ✅ 生产就绪 - 完整的MCP服务器带图形界面监控
<a href="https://glama.ai/mcp/servers/t9cgixg2ah"><img width="380" height="200" src="https://gips2.baidu.com/it/u=903968790,3060702876&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Things Server MCP服务器" /></a>
在你的Claude Desktop MCP服务器配置中添加以下内容:
{
"mcpServers": {
"tasknote-bridge": {
"command": "/path/to/tasknote-bridge/launch_swift_mcp_stdio.sh"
}
}
}
📝 注意: 将
/path/to/tasknote-bridge/替换为你实际的安装目录。例如:
- 如果你下载了发布版:
/Users/[用户名]/Downloads/tasknote-bridge/- 如果你克隆了仓库:
/Users/[用户名]/Projects/tasknote-bridge/- 如果你将其移动到了“应用程序”中:
/Applications/TaskNote Bridge/
在你的VS Code settings.json中添加以下内容:
{
"mcp": {
"inputs": [],
"servers": {
"things-swift": {
"command": "/path/to/tasknote-bridge/launch_swift_mcp_stdio.sh",
"args": []
}
}
}
}
就这样! 🎉 现在你可以通过AI助手创建任务和笔记了。
# 测试stdio服务器(在Things 3中创建任务!)
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "bb7_add-todo", "arguments": {"title": "来自VS Code的问候!", "tags": ["测试"]}}}' | ./launch_swift_mcp_stdio.sh
# 预期输出:
{"jsonrpc":"2.0","id":1,"result":{"content":[{"text":"✅ 在Things 3中创建任务'来自VS Code的问候!'","type":"text"}],"isError":false}}
# ✅ 检查Things 3 - 你的任务会在那里!
# 构建并运行macOS应用
xcodebuild -project "TaskNote Bridge.xcodeproj" -scheme "TaskNote Bridge" build
open "TaskNote Bridge.app"
# 服务器自动启动带有监控界面
从发布页面下载最新的TaskNote Bridge.app
如果你希望从源代码构建,你需要:
克隆仓库并构建:
# 克隆仓库
git clone https://github.com/ragdollKB/taskNote-bridge-mcp.git
cd taskNote-bridge-mcp
# 在Xcode中打开并构建
open "TaskNote Bridge.xcodeproj"
此项目提供了两种不同的MCP服务器实现,以适应不同的使用场景:
launch_swift_mcp_stdio.sh脚本| MCP客户端 | 推荐服务器 | 配置 |
|---|---|---|
| Claude Desktop | ✅ stdio脚本 | command: "/path/to/launch_swift_mcp_stdio.sh" |
| VS Code MCP | ✅ stdio脚本 | 与Claude Desktop相同 |
| 自定义TCP客户端 | 📱 GUI应用 | 连接到localhost:8000 |
| 开发/测试 | 📱 GUI应用 | 视觉监控 + TCP访问 |
💡 关键点: 大多数MCP客户端(包括Claude Desktop)期望基于stdio的通信,而不是TCP连接。
TaskNote Bridge支持多种连接方法,以适应各种MCP客户端。选择最适合你客户端的方法:
配置Claude Desktop以使用基于stdio的MCP服务器:
{
"mcpServers": {
"tasknote-bridge": {
"command": "/path/to/tasknote-bridge/launch_swift_mcp_stdio.sh"
}
}
}
📝 注意: 将
/path/to/tasknote-bridge/替换为你实际的安装目录。常见路径:
- 下载的发布版:
/Users/[用户名]/Downloads/tasknote-bridge/launch_swift_mcp_stdio.sh- 克隆的仓库:
/Users/[用户名]/Projects/tasknote-bridge/launch_swift_mcp_stdio.sh- 应用包安装:
/Applications/TaskNote Bridge.app/Contents/Resources/launch_swift_mcp_stdio.sh
✅ 成功: Claude Desktop现在将通过stdio传输连接,这是推荐且最可靠的方法。
在VS Code中安装MCP扩展:
配置VS Code设置(settings.json):
{
"mcp": {
"servers": {
"tasknote-bridge": {
"command": "/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh",
"args": []
}
}
}
}
{
"command": "/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh",
"args": []
}
~/.continue/config.json){
"mcpServers": [
{
"name": "tasknote-bridge",
"command": "/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh",
"args": []
}
]
}
settings.json:{
"assistant": {
"mcp_servers": {
"tasknote-bridge": {
"command": "/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh"
}
}
}
}
对于任何自定义MCP客户端或应用程序:
localhost8000(默认,可在TaskNote Bridge应用中配置)/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh配置任何客户端后:
测试连接:
# 对于stdio测试
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | /Applications/TaskNote\ Bridge.app/Contents/Resources/launch_mcp_server.sh
# 对于TCP测试(如果服务器正在运行)
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | nc localhost 8000
检查可用工具 - 你应该看到如下的工具:
bb7_add-todobb7_add-projectbb7_get-todaybb7_notes-create测试任务创建:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "bb7_add-todo", "arguments": {"title": "MCP测试!", "tags": ["测试"]}}}' | /Applications/TaskNote\ Bridge.app/Contents/Resources/launch_mcp_server.sh
验证在Things 3中 - 测试任务应该出现在你的收件箱中
/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh~/Library/Logs/Claude/mcp*.loglsof -i :8000ls -la /Applications/TaskNote\ Bridge.app/Contents/Resources/launch_mcp_server.sh首先确保你已经安装并运行了TaskNote Bridge应用。
在VS Code中安装MCP扩展:
配置VS Code设置:
{
"mcp": {
"inputs": [],
"servers": {
"things-swift": {
"command": "/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh",
"args": []
}
}
}
}
注意: 将路径替换为你实际安装应用的位置。如果你将其移动到了“应用程序”文件夹中,请使用:
/Applications/TaskNote Bridge.app/Contents/Resources/launch_mcp_server.sh
一旦连接,你可以使用自然语言与TaskNote Bridge进行交互:
Things 3示例:
Apple Notes示例:
安装并配置MCP扩展后:
此服务器遵循标准的MCP协议,可以与任何兼容MCP的应用程序或AI助手一起工作。只需按照上述方法之一配置你的工具以连接到Swift MCP服务器。
兼容的应用程序包括:
TaskNote Bridge.app/ # macOS Swift应用
├── Contents/
│ ├── MacOS/ # 包含MCP服务器的原生Swift可执行文件
│ │ └── TaskNote Bridge # 主应用,嵌入MCP服务器
│ ├── Resources/ # 应用资源
│ └── Info.plist # 应用包配置
├── TaskNote Bridge.xcodeproj/ # Xcode项目
├── SwiftMCPServer.swift # 核心MCP服务器实现
├── ThingsIntegration.swift #