Bookbridge Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Bookbridge Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
🎉 Now available on PyPI! Install with one simple command: ``bash uvx bookbridge-mcp ``>
Or run directly from GitHub: ``bash uvx --from git+https://github.com/Polly2014/BookBridge-MCP-Server bookbridge-mcp ``A powerful Model Context Protocol (MCP) server for Chinese-to-English book translation and document processing, built with FastMCP framework.
BookBridge-MCP provides a comprehensive solution for translating Chinese books and documents to English while preserving formatting and structure. The server follows a client-side LLM architecture, where the MCP server handles document processing and provides translation resources, while LLM interactions are performed on the client side.
uvx bookbridge-mcpuvx┌─────────────────┐ MCP Protocol ┌─────────────────┐
│ │◄──────────────────►│ │
│ MCP Client │ │ BookBridge │
│ │ │ MCP Server │
│ + LLM Calls │ │ │
│ + UI/Logic │ │ + Tools │
│ │ │ + Resources │
│ │ │ + Prompts │
└─────────────────┘ └─────────────────┘
│ │
│ │
v v
┌─────────────────┐ ┌─────────────────┐
│ OpenAI API │ │ Document │
│ (Client-side) │ │ Processing │
│ │ │ (Server-side) │
└─────────────────┘ └─────────────────┘The easiest way - published on PyPI!
# Run directly from PyPI - simple and clean!
uvx bookbridge-mcpUpdate your MCP configuration (mcp.json):
{
"servers": {
"Book-Bridge-MCP": {
"command": "uvx",
"args": ["bookbridge-mcp"],
"type": "stdio"
}
}
}Advantages:
Always get the latest development version:
# Run directly from GitHub
uvx --from git+https://github.com/Polly2014/BookBridge-MCP-Server bookbridge-mcpUpdate your MCP configuration (mcp.json):
{
"servers": {
"Book-Bridge-MCP": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Polly2014/BookBridge-MCP-Server",
"bookbridge-mcp"
],
"type": "stdio"
}
}
}Advantages:
#### 1. Install Dependencies
# Clone the repository
git clone https://github.com/Polly2014/BookBridge-MCP-Server.git
cd BookBridge-MCP-Server
# Automated setup (recommended)
python setup_poetry.py
# Or if Poetry is already installed
poetry install#### 2. Test Environment
# Verify installation
poetry run python test_environment.py
# Test MCP functionality
poetry run python test_simple.py#### 3. Start Server
# Start the MCP server
poetry run python start.py#### 4. Run Client Example
# Test with client example
poetry run python examples/client_example.py#### 5. Development Commands
# Run tests: poetry run pytest
# Format code: poetry run black .
# Type checking: poetry run mypy src/
# All checks: make check (or make.bat check on Windows)| Method | Command | Use Case | Installation Time |
|---|---|---|---|
| PyPI 🌟 | uvx bookbridge-mcp | General use, production | ⚡ Fastest |
| GitHub | uvx --from git+https://... bookbridge-mcp | Latest features, testing | ⚡ Fast |
| Local | poetry install && poetry run ... | Development, contributions | 🐢 Requires setup |
If you prefer traditional pip installation:
# Install from PyPI
pip install bookbridge-mcp
# Run the server (both commands work)
bookbridge-mcp
# or
bookbridge-serverNote: With uvx, you don't need to manually install - it handles everything automatically!
#### Option A: Using Poetry (Recommended)
git clone https://github.com/your-repo/BookBridge-MCP.git
cd BookBridge-MCP
# Automated setup (installs Poetry if needed)
python setup_poetry.py
# Or manual setup if Poetry is already installed
poetry install --with dev --with client#### Option B: Using pip
git clone https://github.com/your-repo/BookBridge-MCP.git
cd BookBridge-MCP
pip install -r requirements.txt#### Using Poetry:
poetry run python start.py
# or
poetry run bookbridge-server
# or using make commands
make run # Unix/Linux/Mac
make.bat run # Windows#### Using pip:
python start.pyThe server will start and listen for MCP connections on the configured port.
The MCP server provides tools, resources, and prompts. Your client application handles the LLM interactions:
from examples.client_example import BookBridgeClient
# Initialize client with your OpenAI API key
client = BookBridgeClient(api_key="your_openai_api_key")
# Translate a document
result = await client.translate_document(
file_path="./my_chinese_book.docx",
content_type="academic" # or "general", "technical", "creative"
)
# Save the translation
output_path = await client.save_translation(
result,
"./output/translated_book.md"
)BookBridge-MCP/
├── server.py # Main MCP server
├── start.py # Server startup script
├── requirements.txt # Dependencies
├── config.env # Configuration
├── src/
│ ├── document_processor.py # Document conversion
│ ├── resource_manager.py # File and project management
│ ├── prompts.py # Translation prompts
│ └── translator.py # Translation utilities
├── examples/
│ └── client_example.py # Client implementation example
├── input_documents/ # Source documents
├── output_documents/ # Translated documents
└── temp_documents/ # Temporary filesYou can configure your MCP client in three ways:
#### Option 1: Using uvx with GitHub (Recommended)
Edit your mcp.json file:
{
"servers": {
"Book-Bridge-MCP": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Polly2014/BookBridge-MCP-Server",
"bookbridge-server"
],
"type": "stdio"
}
}
}Advantages:
#### Option 2: Using Local Installation
{
"servers": {
"Book-Bridge-MCP": {
"command": "python",
"args": [
"D:\\path\\to\\BookBridge-MCP\\server.py"
],
"cwd": "D:\\path\\to\\BookBridge-MCP",
"type": "stdio"
}
}
}#### Option 3: Using npx-like syntax (if published to PyPI)
{
"servers": {
"Book-Bridge-MCP": {
"command": "uvx",
"args": ["bookbridge-mcp"],
"type": "stdio"
}
}
}Edit config.env to customize settings:
# Document Processing Settings
INPUT_DIR=./input_documents
OUTPUT_DIR=./output_documents
TEMP_DIR=./temp_documents
# Translation Settings (for client reference)
SOURCE_LANGUAGE=chinese
TARGET_LANGUAGE=english
# MCP Server Settings
SERVER_NAME=BookBridge-MCP
SERVER_VERSION=1.0.0Poetry provides better dependency management and development workflow:
# Complete development setup
poetry install --with dev --with client
poetry run pre-commit install
# Development commands using Poetry
poetry run python start.py # Start server
poetry run pytest # Run tests
poetry run pytest --cov=src # Tests with coverage
poetry run black . # Format code
poetry run isort . # Sort imports
poetry run flake8 src/ # Lint code
poetry run mypy src/ # Type checkingFor convenience, use the provided Makefile (Unix/Linux/Mac) or make.bat (Windows):
# Unix/Linux/Mac
make dev-setup # Complete development setup
make run # Start server
make test # Run tests
make format # Format code
make lint # Lint code
make type-check # Type checking
make check # Run all checks
make clean # Clean temporary files
# Windows
make.bat dev-setup # Complete development setup
make.bat run # Start server
make.bat test # Run tests
make.bat format # Format code
make.bat lint # Lint code
make.bat type-check # Type checking
make.bat check # Run all checks
make.bat clean # Clean temporary files# Add new dependency
poetry add package_name
# Add development dependency
poetry add --group dev package_name
# Add client dependency (optional for client usage)
poetry add --group client package_name
# Update dependencies
poetry update
# Show installed packages
poetry show
# Environment information
poetry env info# Process and translate a Word document
result = await client.translate_document(
file_path="./books/chinese_novel.docx",
content_type="creative"
)
print(f"Translated {result['summary']['original_words']} words")
print(f"Used {result['summary']['token_usage']} tokens")# Process multiple documents
documents = ["doc1.docx", "doc2.md", "doc3.docx"]
for doc in documents:
result = await client.translate_document(doc, "academic")
await client.save_translation(result, f"./output/{doc}_translated.md")You can request specific translation prompts from the server:
# Get specialized prompt for technical content
prompt = await client.get_translation_prompt("technical")
# Use prompt for custom translation
translation = await client.translate_content(
content="技术文档内容...",
content_type="technical"
)Using Poetry:
# Run all tests
poetry run pytest
# Run tests with coverage
poetry run pytest --cov=src --cov-report=html --cov-report=term
# Run specific test file
poetry run pytest tests/test_document_processor.py
# Run tests in verbose mode
poetry run pytest -v
# Quick test (stop on first failure)
poetry run pytest -xUsing Make commands:
# Unix/Linux/Mac
make test
make test-coverage
make quick-test
# Windows
make.bat test
make.bat test-coverage
make.bat quick-testTest the client example:
# Using Poetry
poetry run python examples/client_example.py
# Using Make
make client-example # Unix/Linux/Mac
make.bat client-example # Windows# Run architecture tests
poetry run python test_architecture.py
# Test individual components
poetry run python test_components.py git clone https://github.com/your-username/BookBridge-MCP.git
cd BookBridge-MCP # Complete setup with Poetry
make dev-setup # Unix/Linux/Mac
make.bat dev-setup # Windows
# Or manually
poetry install --with dev --with client
poetry run pre-commit installgit checkout -b feature/your-feature make check # Unix/Linux/Mac
make.bat check # Windowsgit commit -m "Add your feature"git push origin feature/your-featureThis project uses:
All checks must pass before merging.
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
If you find BookBridge-MCP helpful, please consider:
BookBridge-MCP: Bridging languages, preserving meaning. 🌉📚
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.