MCP server for Rhubarb document and video understanding capabilities
Project description
Rhubarb MCP Server
A dedicated MCP server package that exposes all of Rhubarb's document and video understanding capabilities through the Model Context Protocol (MCP).
This is a standalone package designed for easy integration with MCP-compatible AI assistants like Cline, Claude Desktop, and other MCP clients.
โจ Features
๐ง Tools (8 total)
analyze_document- Multi-modal document Q&A, summarization, structured extractionstream_document_chat- Streaming conversations with chat historyextract_entities- Named Entity Recognition with 50+ built-in entities + PII detectiongenerate_extraction_schema- AI-assisted JSON schema generationcreate_classification_samples- Vector sample creation for document classificationclassify_document- Document classification using pre-trained samplesview_classification_sample- Classification sample inspectionanalyze_video- Video content analysis with Amazon Nova models
๐ Resources (4 available)
rhubarb://entities/built-in- List of 50+ built-in entity typesrhubarb://models/supported- Supported Bedrock models and capabilitiesrhubarb://schemas/built-in/{type}- Built-in schemas for common use casesrhubarb://classification-samples/{bucket}/{id}- Classification sample details
๐ Quick Start
No Installation Required!
The MCP server automatically installs when first used through uvx or pipx:
# Test the server (optional)
uvx pyrhubarb-mcp@latest --check-deps
# Run with AWS profile (via environment variable)
AWS_PROFILE=my-profile uvx pyrhubarb-mcp@latest
# Run with access keys (via environment variables)
AWS_ACCESS_KEY_ID=AKIA... AWS_SECRET_ACCESS_KEY=secret... uvx pyrhubarb-mcp@latest
๐ง MCP Client Configuration
Cline Integration
{
"rhubarb": {
"command": "uvx",
"args": [
"pyrhubarb-mcp@latest",
"--aws-region", "us-east-1",
"--default-model", "claude-sonnet"
],
"env": {
"AWS_PROFILE": "your-aws-profile"
}
}
}
Claude Desktop Integration
{
"mcpServers": {
"rhubarb": {
"command": "uvx",
"args": [
"pyrhubarb-mcp@latest",
"--default-model", "claude-sonnet"
],
"env": {
"AWS_PROFILE": "your-aws-profile"
}
}
}
}
Using Access Keys (for CI/CD)
{
"rhubarb": {
"command": "uvx",
"args": [
"pyrhubarb-mcp@latest",
"--aws-region", "us-west-2",
"--default-model", "nova-pro"
],
"env": {
"AWS_ACCESS_KEY_ID": "AKIAIOSFODNN7EXAMPLE",
"AWS_SECRET_ACCESS_KEY": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}
}
Alternative: Using pipx
{
"rhubarb": {
"command": "pipx",
"args": [
"run", "pyrhubarb-mcp@latest",
"--default-model", "claude-sonnet"
],
"env": {
"AWS_PROFILE": "your-profile"
}
}
}
๐ Configuration Options
Command-Line Arguments
| Argument | Description | Default |
|---|---|---|
--aws-region |
AWS region | us-east-1 |
--enable-cri |
Enable cross-region inference | false |
--default-model |
Default model | claude-sonnet |
--default-bucket |
S3 bucket for classification samples | - |
--check-deps |
Check dependencies and exit | - |
Environment Variables (AWS Credentials)
| Variable | Description | Example |
|---|---|---|
AWS_PROFILE |
AWS profile name | my-profile |
AWS_ACCESS_KEY_ID |
AWS access key ID | AKIAIOSFODNN7EXAMPLE |
AWS_SECRET_ACCESS_KEY |
AWS secret access key | wJalrXUtnFEMI/K7MDENG... |
AWS_REGION |
AWS region (can also use CLI arg) | us-east-1 |
Supported Models
| Model | Documents | Video | Best For |
|---|---|---|---|
claude-opus |
โ | โ | Complex reasoning, detailed analysis |
claude-sonnet |
โ | โ | Balanced performance and cost |
claude-haiku |
โ | โ | Fast, lightweight tasks |
nova-pro |
โ | โ | High-quality video analysis |
nova-lite |
โ | โ | Cost-effective video processing |
๐ก Usage Examples
Once configured, ask your AI assistant to use Rhubarb's tools:
Document Analysis
Use the analyze_document tool on s3://my-bucket/report.pdf to extract:
- Key findings
- Recommendations
- Financial data
Structure the output as JSON with those three categories.
Entity Extraction
Use extract_entities on ./contract.pdf to find all:
- PERSON entities
- ORGANIZATION entities
- MONEY amounts
- Important dates
- Any PII information
Video Analysis
Use analyze_video on s3://my-bucket/presentation.mp4 to:
- Summarize key points
- Extract any text shown on screen
- Identify main topics discussed
Document Classification
First create classification samples from ./training_manifest.csv in bucket 'my-docs'.
Then classify ./unknown_document.pdf using those samples.
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MCP Client โโโโโโ pyrhubarb-mcp โโโโโโ pyrhubarb โ
โ (Cline, etc.) โ โ (MCP Server) โ โ (Core Library) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโ
โ Amazon Bedrock โ
โ (Claude & Nova) โ
โโโโโโโโโโโโโโโโโโโ
Key Benefits
- ๐ Plug & Play - No pre-installation, auto-installs on first use
- ๐ Native Python - Direct access to Rhubarb capabilities
- ๐ฌ Conversation Memory - Maintains chat history across interactions
- ๐ Resource Discovery - Built-in resources for exploration
- โก High Performance - Optimized for large documents and video processing
๐ ๏ธ Development
Local Development
# Clone and install
git clone https://github.com/awslabs/rhubarb.git
cd rhubarb/pyrhubarb-mcp
poetry install
# Run locally
poetry run pyrhubarb-mcp --check-deps
Dependencies
This package automatically installs:
pyrhubarb- Core Rhubarb document/video processingfastmcp- MCP server frameworkboto3- AWS SDK for Python
๐ Security & Requirements
AWS Credentials
Requires AWS credentials with permissions for:
- Amazon Bedrock - For Claude and Nova model access
- Amazon S3 - For document/video storage (optional but recommended)
Supported Regions
Works in any AWS region with Amazon Bedrock availability. Commonly used regions:
us-east-1(N. Virginia) - Default, supports all modelsus-west-2(Oregon) - All models availableeu-west-1(Ireland) - Most models available
๐ Related Links
- Rhubarb Documentation - Complete docs for the core library
- Rhubarb GitHub - Source code and examples
- Model Context Protocol - Learn about MCP
- FastMCP - The MCP framework we use
๐ License
Apache 2.0 - See LICENSE for details.
๐ค Contributing
This package is part of the larger Rhubarb project. Please see the main CONTRIBUTING.md for contribution guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrhubarb_mcp-0.1.3.tar.gz.
File metadata
- Download URL: pyrhubarb_mcp-0.1.3.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d25359b3b5172a82dd9f89dc1688b28103b0ade6155be31476a855649fa810c5
|
|
| MD5 |
b97dddfc71ecbb66817b2e0ca6b1ea90
|
|
| BLAKE2b-256 |
8ca068a97c1789de46d0c79bd6c7e56a2006958b157dd49f43d87e1b85d1c2d2
|
File details
Details for the file pyrhubarb_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pyrhubarb_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
174e75aef629766ef2596bc11b8e9d6b90df2e05c1d1b1825bd6ce9ceda43f58
|
|
| MD5 |
0eadee35b46e843752fb44a93aacd727
|
|
| BLAKE2b-256 |
c63450440c50b220c152d80805b70393e521431133dedc79069f0c6d5282fc07
|