AC

adamgustavsson/claimsmcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 8 forks 质量 77 趋势 10Apache-2.0

一个从文本中提取权利要求的MCP服务器

概览

“Claimify”方法论的事实主张提取实现,作为本地模型上下文协议(MCP)服务器提供。该工具实现了Metropolitansky & Larson(2025)学术论文《迈向有效提取与评估事实主张》中详细描述的多阶段主张提取方法。 论文中的 Promps 已修改以适用于结构化输出。这不是官方实现。 Claimify通过复杂的四阶段流程从文本中提取可验证、脱离上下文的事实主张: 1. : 将文本拆分成带有上下文的单个句子 2.: 过滤包含可验证命题的句子,排除观点和推测 3.: 解决歧义或丢弃无法澄清的句子 4.

概述(AI 翻译)

“Claimify”方法论的事实主张提取实现,作为本地模型上下文协议(MCP)服务器提供。该工具实现了Metropolitansky & Larson(2025)学术论文《迈向有效提取与评估事实主张》中详细描述的多阶段主张提取方法。

请点击这里阅读该论文

论文中的论文内容已被修改以适用于结构化输出。 这不是官方实现。

概述

Claimify通过复杂的四阶段流程从文本中提取可验证、脱离上下文的事实主张:

  1. 句子拆分:将文本拆分成带有上下文的单个句子
  2. 选择:包含可验证命题的句子过滤器,排除观点和推测
  3. 消歧义:解决歧义或丢弃无法澄清的句子
  4. 分解:将句子拆解为原子级、自成一体的事实主张

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Claimify: Research-Based Claim Extraction via MCP

An implementation of the “Claimify” methodology for factual claim extraction, delivered as a local Model Context Protocol (MCP) server. This tool implements the multi-stage claim extraction approach detailed in the academic paper “Towards Effective Extraction and Evaluation of Factual Claims” by Metropolitansky & Larson (2025).

Read the paper here

Promps from the paper have been modified for use with Structured Outputs. THIS IS NOT AN OFFICIAL IMPLEMENTATION.

Overview

Claimify extracts verifiable, decontextualized factual claims from text using a sophisticated four-stage pipeline:

  1. Sentence Splitting: Breaks text into individual sentences with surrounding context
  2. Selection: Filters for sentences containing verifiable propositions, excluding opinions and speculation
  3. Disambiguation: Resolves ambiguities or discards sentences that cannot be clarified
  4. Decomposition: Breaks down sentences into atomic, self-contained factual claims

The tool uses OpenAI’s structured outputs feature exclusively for improved reliability and exposes its functionality through the Model Context Protocol, making it available to MCP-compatible clients like Cursor and Claude Desktop.

Features

  • Research-based methodology: Implements the peer-reviewed Claimify approach
  • Structured outputs: Uses OpenAI’s structured outputs for reliable, type-safe responses
  • MCP integration: Seamlessly integrates with development environments
  • Robust parsing: Handles various text formats including lists and paragraphs
  • Context-aware: Uses surrounding sentences to resolve ambiguities
  • Multi-language support: Preserves original language while extracting claims
  • Resource storage: Automatically stores extracted claims as MCP resources for easy retrieval
  • Comprehensive logging: Detailed logging of all LLM calls, responses, and pipeline stages
  • Production-ready: Includes error handling, monitoring, and configuration management

Requirements

  • OpenAI API: Requires an OpenAI API key (if your MCP host does not support sampling (Github Copilot in vsCode does))
  • Compatible Model: Must use a model that supports structured outputs:
    • gpt-4o (recommended)
    • gpt-4o-mini (faster and cheaper)
  • Python 3.10+: For proper type hints and Pydantic support

Quick Start

1. Installation

# Clone the repository
git clone 
cd ClaimsMCP

# Create and activate a virtual environment
python -m venv claimify-env
source claimify-env/bin/activate  # On Windows: claimify-env\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Download required NLTK data (done automatically on first run)
python -c "import nltk; nltk.download('punkt_tab')"

2. Configuration

Create a .env file in the project root:

# Copy the example file
cp env.example .env
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "claimify-local": { "command": "/path/to/your/claimify-env/bin/python", "args": [ "/path/to/your/project/claimify_server.py" ] } } }