Skip to main content
Glama

Content Core

License: MIT PyPI version Downloads Downloads GitHub stars GitHub forks GitHub issues Ruff

Extrahieren, verarbeiten und fassen Sie Inhalte aus URLs, Dateien und Texten über eine einheitliche asynchrone Python-API, CLI oder einen MCP-Server zusammen.

Unterstützte Formate

Kategorie

Formate

Web

URLs, HTML-Seiten, YouTube-Videos, Reddit-Beiträge

Dokumente

PDF, DOCX, PPTX, XLSX, EPUB, Markdown, Klartext

Medien

MP3, WAV, M4A, FLAC, OGG (Audio); MP4, AVI, MOV, MKV (Video)

Related MCP server: Fetch MCP Server

Schnellstart

pip install content-core
import content_core

result = await content_core.extract_content(url="https://example.com")
print(result.content)

Oder ohne Installation:

uvx content-core extract "https://example.com"

CLI-Nutzung

Content Core bietet einen einheitlichen content-core-Befehl mit Unterbefehlen für Extraktion, Zusammenfassung und MCP-Server.

Extrahieren

# From a URL
content-core extract "https://example.com"

# From a file
content-core extract document.pdf

# With JSON output
content-core extract document.pdf --format json

# With a specific engine
content-core extract "https://example.com" --engine firecrawl

# From stdin
echo "some text" | content-core extract

Zusammenfassen

# Summarize text
content-core summarize "Long article text here..."

# With context
content-core summarize "Long text" --context "bullet points"

# From stdin
cat article.txt | content-core summarize --context "explain to a child"

MCP-Server

content-core mcp

Konfiguration

# Set persistent config
content-core config set llm_provider anthropic
content-core config set llm_model claude-sonnet-4-20250514

# List current config
content-core config list

# Delete a config value
content-core config delete llm_provider

Die Konfiguration wird in ~/.content-core/config.toml gespeichert. Priorität: Befehls-Flags > Umgebungsvariablen > Konfigurationsdatei > Standardwerte.

Installation ohne Installation mit uvx

Alle Befehle funktionieren ohne Installation mit uvx:

uvx content-core extract "https://example.com"
uvx content-core summarize "text" --context "one sentence"
uvx content-core mcp

Python-API

Extraktion

import content_core

# From a URL
result = await content_core.extract_content(url="https://example.com")

# From a file
result = await content_core.extract_content(file_path="document.pdf")

# From text
result = await content_core.extract_content(content="some text")

# With engine override
from content_core import ContentCoreConfig
config = ContentCoreConfig(url_engine="firecrawl")
result = await content_core.extract_content(url="https://example.com", config=config)

Zusammenfassung

import content_core

summary = await content_core.summarize("long article text", context="bullet points")

Konfiguration

from content_core import ContentCoreConfig

config = ContentCoreConfig(
    url_engine="firecrawl",
    document_engine="docling",
    audio_concurrency=5,
)
result = await content_core.extract_content(url="https://example.com", config=config)

MCP-Integration

Content Core enthält einen Model Context Protocol (MCP)-Server zur Verwendung mit Claude Desktop und anderen MCP-kompatiblen Anwendungen.

Fügen Sie dies zu Ihrer claude_desktop_config.json hinzu:

{
  "mcpServers": {
    "content-core": {
      "command": "uvx",
      "args": ["content-core", "mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

Der MCP-Server stellt zwei Tools bereit: extract_content und summarize_content. Beide geben Klartext zurück.

Für eine detaillierte Einrichtung siehe die MCP-Dokumentation.

Claude Code Skill

Content Core enthält eine SKILL.md, die KI-Agenten beibringt, wie sie es zum Extrahieren von Inhalten aus externen Quellen verwenden können. Um sie in Ihrem Claude Code-Projekt verfügbar zu machen, kopieren Sie sie in Ihr Skills-Verzeichnis:

# Download the skill
curl -o .claude/skills/content-core/SKILL.md --create-dirs \
  https://raw.githubusercontent.com/lfnovo/content-core/main/SKILL.md

Nach der Installation kann Claude Code content-core verwenden, um Inhalte aus URLs, Dokumenten und Mediendateien zu extrahieren – entweder über CLI (uvx content-core) oder MCP, falls konfiguriert.

KI-Anbieter

Content Core verwendet Esperanto, um mehrere LLM- und STT-Anbieter zu unterstützen. Wechseln Sie die Anbieter durch Ändern der Konfiguration – es sind keine Codeänderungen erforderlich:

# Use Anthropic for summarization
content-core config set llm_provider anthropic
content-core config set llm_model claude-sonnet-4-20250514

# Use Groq for transcription
content-core config set stt_provider groq
content-core config set stt_model whisper-large-v3

Zu den unterstützten Anbietern gehören OpenAI, Anthropic, Google, Groq, DeepSeek, Ollama und mehr. Die vollständige Liste finden Sie in der Esperanto-Dokumentation.

Konfiguration

Content Core verwendet ContentCoreConfig, basierend auf pydantic-settings. Die Einstellungen werden in Prioritätsreihenfolge aufgelöst: Konstruktor-Argumente > Umgebungsvariablen (CCORE_*) > Konfigurationsdatei (~/.content-core/config.toml) > Standardwerte.

Umgebungsvariablen

Variable

Beschreibung

Standardwert

CCORE_URL_ENGINE

URL-Extraktions-Engine (auto, simple, firecrawl, jina, crawl4ai)

auto

CCORE_DOCUMENT_ENGINE

Dokumenten-Extraktions-Engine (auto, simple, docling)

auto

CCORE_AUDIO_CONCURRENCY

Gleichzeitige Audio-Transkriptionen (1-10)

3

CRAWL4AI_API_URL

Crawl4AI Docker API-URL (für lokalen Browser-Modus weglassen)

-

FIRECRAWL_API_URL

Benutzerdefinierte Firecrawl API-URL für selbst gehostete Instanzen

-

CCORE_FIRECRAWL_PROXY

Firecrawl-Proxy-Modus (auto, basic, stealth)

auto

CCORE_FIRECRAWL_WAIT_FOR

Wartezeit in ms vor der Extraktion

3000

CCORE_LLM_PROVIDER

LLM-Anbieter für Zusammenfassungen

-

CCORE_LLM_MODEL

LLM-Modell für Zusammenfassungen

-

CCORE_STT_PROVIDER

Speech-to-Text-Anbieter

-

CCORE_STT_MODEL

Speech-to-Text-Modell

-

CCORE_STT_TIMEOUT

Speech-to-Text-Timeout in Sekunden

-

CCORE_YOUTUBE_LANGUAGES

Bevorzugte YouTube-Transkriptsprachen

-

API-Schlüssel für externe Dienste werden über deren Standard-Umgebungsvariablen festgelegt (z. B. OPENAI_API_KEY, FIRECRAWL_API_KEY, JINA_API_KEY).

Proxy-Konfiguration

Content Core liest automatisch die Standard-Umgebungsvariablen HTTP_PROXY / HTTPS_PROXY / NO_PROXY. Es ist keine zusätzliche Konfiguration erforderlich.

Optionale Abhängigkeiten

# Docling for advanced document parsing (PDF, DOCX, PPTX, XLSX)
pip install content-core[docling]

# Crawl4AI for local browser-based URL extraction
pip install content-core[crawl4ai]
python -m playwright install --with-deps

# LangChain tool wrappers
pip install content-core[langchain]

# All optional features
pip install content-core[docling,crawl4ai,langchain]

Verwendung mit LangChain

Bei der Installation mit dem langchain-Extra bietet Content Core LangChain-kompatible Tool-Wrapper:

from content_core.tools import extract_content_tool, summarize_content_tool

tools = [extract_content_tool, summarize_content_tool]

Dokumentation

  • Nutzungsanleitung -- Details zur Python-API, Konfiguration und Beispiele

  • Prozessoren -- Wie die Inhaltsextraktion für jedes Format funktioniert

  • MCP-Server -- Claude Desktop und MCP-Integration

Entwicklung

git clone https://github.com/lfnovo/content-core
cd content-core

uv sync --group dev

# Run tests
make test

# Lint
make ruff

Lizenz

Dieses Projekt ist unter der MIT-Lizenz lizenziert.

Mitwirken

Beiträge sind willkommen! Bitte lesen Sie unseren Leitfaden für Mitwirkende für Details.

Install Server
A
security – no known vulnerabilities
A
license - permissive license
B
quality - B tier

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lfnovo/content-core'

If you have feedback or need assistance with the MCP directory API, please join our Discord server