Cynthiaflora

mcp-starter

Community Cynthiaflora
Updated

mcp-starter

一个本地MCP服务器,暴露7个工具,分3类:通用小工具、本地笔记存储、关键词检索知识库。用Streamable HTTP传输,跑成一个长期进程,本机上的多个agent/客户端可以共用同一个server和同一份数据。

安装

npm install
npm run build

启动server

npm run dev     # 开发模式,用tsx直接跑 src/index.ts
# 或
npm run build && npm start   # 生产模式

默认监听 http://localhost:3000/mcp,可用 PORT 环境变量改端口。

注册到Claude Code

先确保server已经在跑(见上一步),再注册:

claude mcp add --transport http mcp-starter http://localhost:3000/mcp

注册后,工具会以 mcp__mcp-starter__<tool_name> 的形式出现在agent可用工具列表里。因为是共用同一个server进程,不同agent/session看到的notes/kb数据是同一份。

工具列表

工具 类别 说明
get_current_time 通用工具 返回当前服务器时间(ISO 8601)
web_fetch 通用工具 抓取URL,返回去除HTML标签的纯文本
notes_add 笔记 新增一条笔记(标题+内容)
notes_list 笔记 列出所有笔记
notes_delete 笔记 按id删除笔记
kb_add_document 知识库 存入一段文本(可带tags/source)
kb_search 知识库 关键词检索知识库

数据持久化到 data/notes.jsondata/kb.json(已gitignore,首次写入时自动创建)。

手动验证清单

  1. 调用 get_current_time —— 确认MCP链路连通
  2. notes_addnotes_list —— 确认笔记持久化
  3. kb_add_document 后用匹配关键词 kb_search —— 确认检索生效
  4. web_fetch 一个真实URL —— 确认外部抓取正常

单元测试

npm test

测试文件在 test/,覆盖 fileStoreutilitynoteskb 里的纯逻辑函数;MCP服务器接入本身通过上面的手动验证清单确认。

MCP Server · Populars

MCP Server · New

    Bevel-Software

    hexis

    Git-backed skills, tools & context for AI agents

    Community Bevel-Software
    jonashertner

    OpenCaseLaw

    Open Swiss legal corpus + MCP server: 1M+ court decisions (1875–today), 21k laws, 10M-edge citation graph, 42 MCP tools. CC0 data, MIT code. Live at mcp.opencaselaw.ch

    Community jonashertner
    SystemCraftsman

    Strimzi Kafka CLI

    Command Line Interface for the Strimzi Kafka Operator

    Community SystemCraftsman
    DROOdotFOO

    Raxol

    Write one app, render it to a terminal, a browser, or as agent tools. The terminal for your Gundam.

    Community DROOdotFOO
    morluto

    REA: Reverse Engineer Anything

    Reverse engineer anything with agents, from app behavior down to native binaries.

    Community morluto