aum-mcp服务器
个人MCP服务器分为多个集中服务器,每个服务器只加载所需的工具,使Claude的上下文保持简洁。
| 服务器 | 工具 |
|---|---|
aum-developer | Web/HTTP、文件系统、shell、GitHub、Ollama |
aum-notes | 持久笔记、Word(.docx)、PowerPoint(.pptx) |
aum-communication | Gmail、谷歌日历、谷歌联系人、iMessage |
aum-canvas | Canvas LMS——课程、成绩 |
aum-personal | Spotify |
aum-slurm | 通过SSH(任何HPC集群)进行SLURM作业管理 |
______________________________________________________________________
设置
1.安装依赖项
npm install2.配置环境
cp .env.example .env填写 .env 使用API密钥。中的每个部分 .env.example 解释了在哪里生成它们。
谷歌(Gmail+日历+联系人) 填写后需要OAuth流 GOOGLE_CLIENT_ID 和 GOOGLE_CLIENT_SECRET,运行:
node --env-file=.env scripts/google-auth.mjs这打印了一个 GOOGLE_REFRESH_TOKEN --将其粘贴到 .env一个令牌覆盖了所有三个谷歌服务。
3.建造
npm run build4.向Claude注册
添加 ~/.mcp.json (如果不存在,则创建它)。替换 /path/to/mcp-server 使用此仓库的绝对路径:
{
"mcpServers": {
"aum-developer": {
"command": "node",
"args": [
"--env-file=/path/to/mcp-server/.env",
"/path/to/mcp-server/dist/developer.js"
]
},
"aum-notes": {
"command": "node",
"args": [
"--env-file=/path/to/mcp-server/.env",
"/path/to/mcp-server/dist/notes-server.js"
]
},
"aum-communication": {
"command": "node",
"args": [
"--env-file=/path/to/mcp-server/.env",
"/path/to/mcp-server/dist/communication.js"
]
},
"aum-canvas": {
"command": "node",
"args": [
"--env-file=/path/to/mcp-server/.env",
"/path/to/mcp-server/dist/canvas-server.js"
]
},
"aum-personal": {
"command": "node",
"args": [
"--env-file=/path/to/mcp-server/.env",
"/path/to/mcp-server/dist/personal.js"
]
},
"aum-slurm": {
"command": "node",
"args": [
"--env-file=/path/to/mcp-server/.env",
"/path/to/mcp-server/dist/slurm.js"
]
}
}
}您只能注册所需的服务器,每个服务器都是独立的。
______________________________________________________________________
工具参考
aum-developer
| 工具 | 说明 |
|---|---|
fetch_url | 获取任何URL(GET/POST/PUT/PATCH/DELETE) |
http_status | 在不下载正文的情况下检查HTTP状态 |
call_api | 使用自动序列化调用JSON API |
read_file | 读取文件内容 |
write_file | 将内容写入文件 |
list_directory | 列出文件/dir(可选递归) |
system_info | 主机名、平台、内存、架构 |
current_datetime | 任何IANA时区的当前日期/时间 |
run_command | 执行shell命令 |
get_env | 读取环境变量 |
github_contributions | 过去N天的贡献日历和统计数据 |
github_profile | 个人资料信息——repos、关注者、顶级明星repos |
ollama_models | 按工具使用能力列出已安装的Olama型号 |
ollama_chat | 与最佳本地模型进行代理聊天——自动路由到相关工具 |
aum-notes
| 工具 | 说明 |
|---|---|
note_set | 按键保存持久笔记 |
note_get | 按键检索笔记 |
note_list | 列出所有已保存的笔记键 |
note_delete | 按键删除注释 |
word_read | 从.docx文件中提取文本 |
word_create | 从标题、段落和项目符号创建.docx文件 |
ppt_read | 从.pptx文件中提取幻灯片文本 |
ppt_create | 从幻灯片列表中创建.pptx文件 |
aum-communication
| 工具 | 说明 |
|---|---|
gmail_inbox | 列出最近的Gmail收件箱邮件 |
gmail_search | 按查询搜索Gmail |
gmail_get_message | 阅读完整的电子邮件 |
gmail_send | 发送电子邮件 |
calendar_list | 列出可用的谷歌日历 |
calendar_events | 列出即将到来的日历事件 |
calendar_today | 获取今天的活动 |
calendar_create_event | 创建新的日历事件 |
contacts_search | 按姓名或电子邮件搜索谷歌联系人 |
contacts_get | 获取特定联系人的完整详细信息 |
contacts_list | 列出所有联系人 |
imessage_search | 按联系人或内容搜索邮件 |
imessage_recent | 获取所有聊天记录中的最新消息 |
imessage_chat | 从特定对话中获取消息 |
imessage_contacts | 列出最后一条消息的所有iMessage联系人 |
imessage_send | 通过Messages.app发送iMessage |
aum-canvas
| 工具 | 说明 |
|---|---|
canvas_courses | 当前成绩和分数的活动课程 |
aum-personal
| 工具 | 说明 |
|---|---|
spotify_now_playing | 当前播放曲目 |
spotify_recent | 最近播放的10首曲目 |
spotify_top_artists | 过去约6个月的顶尖艺术家 |
aum-slurm
| 工具 | 说明 |
|---|---|
slurm_run | 通过SSH在HPC集群上运行shell命令 |
slurm_jobs | 列出队列中的SLURM作业 |
slurm_files | 列出远程目录中的文件 |
slurm_read_file | 从HPC集群读取文件 |
slurm_submit_job | 提交SLURM批处理作业脚本 |
slurm_storage | 检查磁盘配额和存储使用情况 |
______________________________________________________________________
Ollama(当地LLM)
ollama_chat 运行一个完全本地的代理循环——不需要云。
先决条件: 奥拉玛 已安装并正在运行,至少有一个型号已被拉出。
ollama pull qwen2.5 # recommended — best tool use, fast
ollama pull llama3.2 # solid alternative
ollama serve # start if not running as a serviceollama_chat 根据提示中的关键字自动选择一个集中的工具子集。破坏性工具(write_file, run_command, gmail_send等)从不自动路由——通过 tools 参数。
______________________________________________________________________
仪表盘
本地web UI运行在 http://localhost:4242 具有服务器状态、注册工具、API集成卡和注释查看器/编辑器。
npm run web______________________________________________________________________
发展
npm run build # compile all servers to dist/
npm run dev:developer # run developer server with tsx
npm run dev:notes # run notes server with tsx
npm run dev:communication # run communication server with tsx
npm run dev:slurm # run slurm server with tsx
npm run web # local dashboard一直跑 npm run build 在重新启动Claude之前进行更改。
______________________________________________________________________
添加新工具
- 创建
src/tools/mytool.ts:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
export function registerMyTools(server: McpServer) {
server.tool("my_tool", "What it does", {
param: z.string().describe("A parameter"),
}, async ({ param }) => {
return { content: [{ type: "text" as const, text: `result` }] };
});
}- 导入并调用相关入口点(
src/developer.ts,src/notes-server.ts等等)。
- 添加到
TOOLS数组insrc/web.ts对于仪表板。
- 跑
npm run build.
______________________________________________________________________
笔记存储
注释保存在 ~/.aum-mcp/notes.json.
