Back to MCP directory
publicPublicdnsLocal runtime

Image Reader

一个基于TypeScript的MCP服务器,实现简单的笔记系统

article

README

🚀 图像阅读器 MCP 服务器

图像阅读器 MCP 服务器是一个基于 TypeScript 构建的项目,它实现了一个简单的笔记系统。该系统通过展示核心的 MCP 概念,让用户可以通过 note:// URI 和元数据访问、列出文本笔记资源,还具备创建新笔记的工具以及自动生成笔记摘要的提示功能。

🚀 快速开始

图像阅读器 MCP 服务器提供了便捷的开发和使用方式。你可以按照以下步骤进行操作:

开发步骤

  1. 安装依赖
npm install
  1. 构建服务器
npm run build
  1. 带有自动重建功能的开发
npm run watch

安装步骤

要在 Claude Desktop 中使用该服务器,请添加以下服务器配置:

  • 在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
  • 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json

配置示例如下:

{
  "mcpServers": {
    "image-reader": {
      "command": "/path/to/image-reader/build/index.js"
    }
  }
}

调试建议

由于 MCP 服务器通过标准输入输出进行通信,调试可能具有挑战性。我们推荐使用 MCP Inspector,这是一个作为包脚本提供的工具。你可以使用以下命令启动它:

npm run inspector

Inspector 将提供一个可在浏览器中访问的调试工具 URL。

✨ 主要特性

资源管理

  • 可以列出并访问使用 note:// URI 的笔记。
  • 每个笔记包含标题、内容和元数据。
  • 使用简单的纯文本 MIME 类型进行内容访问。

实用工具

  • create_note:用于创建新的文本笔记。它接受标题和内容作为必填参数,并将笔记存储在服务器状态中。

智能提示

  • summarize_notes:生成所有存储笔记的摘要。它会将所有笔记内容作为嵌入资源,并返回结构化的提示以供 LLM 进行总结。

📦 安装指南

要在 Claude Desktop 中使用图像阅读器 MCP 服务器,需要进行如下配置:

  • MacOS 系统:在 ~/Library/Application Support/Claude/claude_desktop_config.json 文件中添加配置。
  • Windows 系统:在 %APPDATA%/Claude/claude_desktop_config.json 文件中添加配置。

配置示例如下:

{
  "mcpServers": {
    "image-reader": {
      "command": "/path/to/image-reader/build/index.js"
    }
  }
}
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client