Keyphrases Mcp

io.github.IvanRublev由 GitHub 帳號 IvanRublev 發布v0.0.4更新於 Oct 24, 2026

An MCP server to extract keyphrases from a text with the BERT model

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

使用以 BERT 為基礎的流程從本機文字檔擷取關鍵詞組,只把關鍵詞組回傳給助理。

可以做什麼
執行 KeyBERT 流程,結合 spaCy 前處理與 BERT 句向量產生候選關鍵詞組,依與文件的餘弦相似度排序,並透過最大邊際相關性選出多樣化的前 N 個結果。助理可以指定擷取數量,也可以提供要忽略的停用詞。它從允許的本機目錄讀取檔案,只向 MCP 用戶端暴露擷取出的關鍵詞組,而非原始檔案內容。
適用情境
適合助理需要依主題摘要或標註文件、又不想把整份檔案放進上下文的場景,例如產生文件中繼資料、找出評論或文章中的主題,或為後續分類與分群產生特徵。
執行需求
以 PyPI 套件(keyphrases-mcp)透過 stdio 在本機執行,通常用 uvx 啟動,因此需要 Python 執行環境與套件下載。它從允許的本機目錄讀取檔案,並需要下載或載入 spaCy 與句向量模型。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
它會讀取被允許存取目錄中的本機檔案,應謹慎限定這些目錄範圍。模型下載與首次執行可能較慢或占用較多資源。未宣告憑證、付費或寫入操作。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Keyphrases Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🔤 Keyphrases-MCP

Empowering LLMs with authentic keyphrase Extraction

Built with the following tools and technologies:

[MCP] [PyTorch] [Python] [uv]


Overview

This Keyphrases MCP Server is a natural language interface designed for agentic applications to extract keyphrasess from provided text. It integrates seamlessly with MCP (Model Content Protocol) clients, enabling AI-driven workflows to extract keyphrases more accurately and with higher relevance using the BERT machine learning model. It works directly with your local files in the allowed directories saving the context tokens for the LLM. The application ensures secure document processing by exposing only extracted keyphrases to the MCP client, not the original file content.

Using this MCP Server, you can ask the following questions:

  • "Extract 7 keyphrases from the file. [ABSOLUTE_FILE_PATH]"
  • "Extract 3 keyphrases from the given file ignoring the stop words. Stop words: former, due, amount, [OTHER_STOP_WORDS]. File: [ABSOLUTE_FILE_PATH]"

Keyphrases help users quickly grasp the main topics and themes of a document without reading it in full and enable the following applications:

  1. tags or metadata for documents, improving organization and discoverability in digital libraries
  2. emerging trends, sentiment, identified from customer reviews, social media, or news articles
  3. features or inputs for other tasks, such as text classification, clustering

Reasoning for keyphrases-mcp

Autoregressive LLM models such as in Claude or ChatGPT process text sequentially, which—not only limits their ability to fully contextualize keyphrases across the entire document—but also suffers from context degradation as the input length increases, causing earlier keyphrases to receive diluted attention.

Bidirectional models like BERT, by considering both left and right context and maintaining more consistent attention across the sequence, generally extract existing keyphrases from texts more accurately and with higher relevance especially when no domain-specific fine-tuning is applied.

However, as autoregressive models adopt longer context windows and techniques such as input chunking, their performance in keyphrase extraction is improving, narrowing the gap with BERT. And domain-specific fine-tuning can make autoregressive LLM model to outperform the BERT solution.

This MCP server combines BERT for keyphrase extraction with an autoregressive LLM for text generation or refinement, enabling seamless text processing.

How it works

The server uses a KeyBERT framework for the multi-step extraction pipeline combining spaCy NLP preprocessing with BERT embeddings:

  1. Candidate Generation: KeyphraseCountVectorizer identifies meaningful keyphrase candidates using spaCy's en_core_web_trf model and discarding stop words
  2. Semantic Encoding: Candidates and document are embedded using paraphrase-multilingual-MiniLM-L12-v2 sentence transformer
  3. Relevance Ranking: KeyBERT calculates cosine similarity between candidate keyphrase and document embeddings
  4. Diversity Selection: Maximal Marginal Relevance (MMR) ensures diverse, non-redundant keyphrases
  5. Final Output: Top N most relevant and diverse keyphrases are selected and sorted alphabetically

See configuration document for details.

Documentation

License

This project is licensed under the MIT License.

Contact

For questions or support, reach out via GitHub Issues.

來源:README.md,提交 006daa8

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.0.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分