Skip to main content
Glama

qsw-mcp

Smart Doc MCP Server - 为 AI Agent 提供统一的文档读取能力

功能特性

  • read_url: 读取网页内容,返回标题、纯文本和 Markdown 格式(无登录状态)

  • read_url_browser: 使用浏览器读取网页(支持登录状态、Cookie、SPA 页面)

  • read_clipboard_image: 从系统剪贴板读取图片并识别文字(OCR),支持中英文等多种语言

Related MCP server: MCP Browser

安装

npm install
npm run build

Playwright 浏览器安装(read_url_browser 需要)

npx playwright install chromium

使用方法

在 Claude Desktop 中配置

编辑 Claude Desktop 配置文件:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

添加以下配置:

{
  "mcpServers": {
    "qsw-mcp": {
      "command": "node",
      "args": ["path/to/qswMCP/dist/index.js"]
    }
  }
}

在 VSCode Agent 中配置

.vscode/settings.json 中添加:

{
  "claude.mcpServers": {
    "qsw-mcp": {
      "command": "node",
      "args": ["path/to/qswMCP/dist/index.js"]
    }
  }
}

工具说明

read_url

读取网页内容(无登录状态)。

输入参数

  • url (string): 要读取的网页 URL

输出示例

{
  "success": true,
  "data": {
    "title": "网页标题",
    "content": "网页纯文本内容...",
    "markdown": "# 网页标题\n\n网页 Markdown 内容...",
    "url": "https://example.com",
    "length": 1234
  }
}

read_url_browser

使用浏览器读取网页,支持登录状态、Cookie 和 SPA 页面。

输入参数

  • url (string): 要读取的网页 URL

  • waitFor (number, 可选): 等待页面加载的时间(毫秒),默认 2000ms

  • useExisting (boolean, 可选): 是否连接已打开的 Chrome(需要 Chrome 调试模式),默认使用新浏览器

输出示例

{
  "success": true,
  "data": {
    "title": "网页标题",
    "content": "网页纯文本内容...",
    "markdown": "# 网页标题\n\n网页 Markdown 内容...",
    "url": "https://example.com/final",
    "originalUrl": "https://example.com",
    "length": 1234,
    "mode": "browser"
  }
}

连接已有 Chrome 浏览器

# 以调试模式启动 Chrome
chrome.exe --remote-debugging-port=9222

read_clipboard_image

从系统剪贴板读取图片并进行 OCR 文字识别。

输入参数

  • language (string, 可选): 识别语言,默认 chi_sim+eng

    • chi_sim: 简体中文

    • chi_tra: 繁体中文

    • eng: 英文

    • jpn: 日文

    • kor: 韩文

    • chi_sim+eng: 简体中文+英文

    • chi_tra+eng: 繁体中文+英文

  • preprocess (boolean, 可选): 是否预处理图片(提高识别准确率),默认开启

输出示例

{
  "success": true,
  "data": {
    "text": "识别出的文字内容...",
    "confidence": 95.5,
    "statistics": {
      "characters": 123,
      "words": 45,
      "lines": 10,
      "blocks": 5
    },
    "language": "chi_sim+eng",
    "preprocess": "已预处理(灰度、对比度标准化、锐化)",
    "blocks": [...],
    "source": "clipboard",
    "savedPath": "clipboard/clipboard_2026-05-31T00-52-00.png"
  }
}

使用步骤

  1. 复制图片(右键 → 复制图片,或 Win+Shift+S 截图)

  2. 调用此工具进行 OCR 识别

开发

# 开发模式运行
npm run dev

# 编译
npm run build

# 监听模式
npm run watch

技术栈

  • TypeScript

  • MCP SDK (@modelcontextprotocol/sdk)

  • axios

  • cheerio

  • turndown

  • playwright

  • sharp

  • tesseract.js

  • zod

许可证

MIT

Available Tools

3 tools
read_clipboard_imageA

从系统剪贴板读取图片并识别文字(OCR),支持中英文等多种语言

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNo识别语言:chi_sim=简体中文, chi_tra=繁体中文, eng=英文, jpn=日文, kor=韩文chi_sim+eng
preprocessNo是否预处理图片(提高识别准确率,默认开启)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, but it only states the basic read/OCR function. It does not disclose what happens if the clipboard lacks an image, whether clipboard content is modified, or what the return format is.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, information-dense sentence with no filler or redundant content, making it concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with two optional parameters, but the absence of an output schema and annotations means the description should mention return format or prerequisites (e.g., clipboard must contain an image). The current description is partially complete but lacks these contextual details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents both parameters completely (100% coverage), so the description adds no additional parameter context. A baseline of 3 is appropriate given the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (read from system clipboard and OCR) and the resource (clipboard image), and it distinguishes itself from sibling URL-reading tools by focusing on clipboard source.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context is implied (use when an image is in the clipboard and you need OCR), but there is no explicit guidance on when to use this tool versus alternatives, nor any mention of exclusions such as whether it works with non-image clipboard content.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_urlB

读取网页内容,返回标题、纯文本和 Markdown 格式(无登录状态)

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes要读取的网页 URL

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden. It discloses the return types (title, plain text, Markdown) and the absence of login state, but does not mention JS rendering, redirects, or error handling, leaving important behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no fluff. It efficiently communicates both the action and the expected output in minimal space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description covers the essentials but lacks details on response structure, error cases, or authentication limitations. It is minimally adequate but could be more informative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage for the single 'url' parameter is 100%, so the schema already documents it fully. The description adds no additional parameter-specific details, making a baseline score of 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reads web content and returns title, plain text, and Markdown format, with a note about no login state. It does not explicitly differentiate from the sibling read_url_browser, but the core purpose is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The '无登录状态' note implies a limitation but does not state preferred use cases or when to choose read_url_browser instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_url_browserA

使用浏览器读取网页(支持登录状态、Cookie、SPA 页面)

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes要读取的网页 URL
waitForNo等待页面加载的时间(毫秒),默认 2000ms
useExistingNo是否连接已打开的 Chrome(需要 Chrome 调试模式),默认使用新浏览器

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses browser-based execution and support for authentication/dynamic content, which suggests JavaScript rendering. However, it omits behavioral traits like potential slowness, failure modes, or whether it can be headless. Some transparency is given, but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence that immediately conveys the core functionality and distinguishing features. It contains no filler and is perfectly front-loaded, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema or annotations, the description must compensate but does not explain what the tool returns (e.g., text, HTML, screenshot) or any limitations of browser-based reading. Given the complexity of the tool, this is a significant gap, making the description incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% description coverage for all parameters, including url, waitFor, and useExisting. The tool description adds no additional parameter-level meaning beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb+resource: '使用浏览器读取网页' (use browser to read web pages), and the parenthetical features (login state, cookies, SPA pages) distinguish it from sibling tools like read_url which likely performs simple HTTP fetches. This provides a clear differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for scenarios requiring login, cookies, or SPA rendering through the parenthetical remark, but it does not explicitly state when to prefer this over read_url or provide exclusions. Guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedread_clipboard_image
    • First observedread_url
    • First observedread_url_browser

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation3/5

read_url and read_url_browser both fetch web content, creating potential confusion; the browser variant's features like login and SPA support help distinguish them, but the overlap remains. read_clipboard_image is clearly distinct.

Naming Consistency5/5

All tools follow a consistent 'read_' prefix with a clear object suffix (url, url_browser, clipboard_image), forming a predictable verb_noun pattern throughout the set.

Tool Count4/5

With only 3 tools, the set is minimal but appropriately scoped for a content-reading utility covering two modes of web reading and OCR. It is slightly thin but not unreasonably so.

Completeness4/5

The domain of reading content is reasonably covered: simple URLs, browser-dependent URLs, and clipboard image OCR. Minor gaps like text clipboard reading or local file support exist, but core use cases are addressed.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that enables AI assistants to fetch web content in multiple formats (HTML, JSON, text, Markdown) with intelligent content extraction, chunk management, and browser automation support.
    5
    44 npm
    15
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server that lets AI assistants browse the web through your real Chrome with your cookies, sessions, and fingerprint, avoiding bot detection and CAPTCHAs. Enables web browsing, content extraction, and multi-step workflows via persistent tabs.
    15
    5 npm
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for web scraping and browser automation, enabling AI agents to extract clean, token-efficient content from web pages.
    1
    MIT