CubeParser MCP Server
A Model Context Protocol (MCP) server that provides access to CubeParser document extraction API. This server can be run directly using uvx with absolute paths for easy deployment and sharing.
🚀 Quick Start with uvx
For End Users (Running the Server)
If someone has shared this project with you, you can run it directly using uvx with the absolute path:
# Replace with the actual absolute path provided to you
uvx --from "C:\path\to\cubeparser_mcp" cubeparser-mcp
Example:
uvx --from "C:\Users\Remy\sensedeal\code\projects\work\CITICS2025\zhangkai\cubeparser_mcp" cubeparser-mcp
For Developers (Setting Up for Sharing)
- Clone and Setup:
git clone <repository-url>
cd cubeparser_mcp
uv sync
- Run Setup Script:
uv run python setup_uvx.py
This creates:
mcp_config.json- MCP client configuration with absolute paths.env.template- Environment variables templaterun_cubeparser_mcp.bat- Quick run script for Windows
- Configure Environment:
cp .env.template .env
# Edit .env with your CubeParser credentials
📋 Features
This MCP server provides three main tools:
- get_templates - Retrieve available extraction templates from CubeParser
- create_task - Upload files and create extraction tasks with specified templates
- download_results - Get extraction results from completed tasks
🛠️ Installation Methods
Method 1: Direct uvx Usage (Recommended for Sharing)
# Run from absolute path (replace with actual path)
uvx --from "/absolute/path/to/cubeparser_mcp" cubeparser-mcp
# Or on Windows
uvx --from "C:\absolute\path\to\cubeparser_mcp" cubeparser-mcp
Method 2: Local Development
# Install dependencies
uv sync
# Run directly
uv run python main.py
# Or use the generated batch file
.\run_cubeparser_mcp.bat # Windows
./run_cubeparser_mcp.sh # Linux/Mac
⚙️ Configuration
Environment Variables
Create a .env file with your CubeParser credentials:
CUBEPARSER_USERNAME=your_username_here
CUBEPARSER_PASSWORD=your_password_here
CUBEPARSER_BASEURL=https://cubeparser.cn/
MCP Client Configuration
Use the generated mcp_config.json file in your MCP client (e.g., Claude Desktop):
{
"mcpServers": {
"cubeparser": {
"command": "uvx",
"args": [
"--from",
"C:\\absolute\\path\\to\\cubeparser_mcp",
"cubeparser-mcp"
],
"env": {
"CUBEPARSER_USERNAME": "your_username",
"CUBEPARSER_PASSWORD": "your_password",
"CUBEPARSER_BASEURL": "https://cubeparser.cn/"
}
}
}
}
🔧 Available Tools
get_templates()
Retrieves a list of available extraction templates from CubeParser.
Returns: List of template objects with IDs, names, and descriptions.
create_task(file_path: str, template_id: str)
Creates an extraction task by uploading a file and specifying a template.
Parameters:
file_path: Absolute path to the file to be processedtemplate_id: ID of the template to use for extraction
Returns: Task information including task ID and status.
download_results(task_id: str)
Downloads extraction results for a completed task.
Parameters:
task_id: ID of the extraction task
Returns: Extraction results and task status information.
🧪 Testing
Test the Installation
# Test that the server starts correctly
uvx --from "C:\your\absolute\path\to\cubeparser_mcp" cubeparser-mcp
# Or use the batch file
.\run_cubeparser_mcp.bat
Run Tests
uv run pytest
📁 Generated Files
After running setup_uvx.py, you'll have:
mcp_config.json- Ready-to-use MCP client configuration.env.template- Template for environment variablesrun_cubeparser_mcp.bat- Windows batch script for easy testingrun_cubeparser_mcp.sh- Linux/Mac shell script for easy testing
🚨 Troubleshooting
Common Issues
- Server won't start: Check that environment variables are set correctly
- uvx command not found: Install uv first:
pip install uv - Permission errors: Ensure the absolute path is accessible
- Network errors: Verify CubeParser API credentials and network access
Debug Mode
Run with verbose logging:
uvx --from "C:\your\path\to\cubeparser_mcp" cubeparser-mcp --verbose
📤 Sharing with Others
To share this MCP server with others:
- Provide the absolute path to your project directory
- Share the uvx command:
uvx --from "C:\your\absolute\path\to\cubeparser_mcp" cubeparser-mcp
- Include environment setup instructions (they need their own CubeParser credentials)
📄 License
MIT License - see LICENSE file for details.
Metadata
Release files for cubeparser-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cubeparser_mcp-0.1.1.tar.gz | 7.1 kB | Without provenance | Details for cubeparser_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cubeparser_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for cubeparser_mcp-0.1.1-py3-none-any.whl |
Total release size: 15.2 kB
Release files / cubeparser_mcp-0.1.1.tar.gz
| Download URL | cubeparser_mcp-0.1.1.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfe9946b67932e8c19e053df791394e4630c83e2d29b4bf292fb82b919e57c7a
|
|
BLAKE2b-256 checksum How to use checksums |
e65c0c740cf7124e28a76fde5afcb08d9305efa372f2cfe9806a3ed6ab5d0504
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.18
|
Release files / cubeparser_mcp-0.1.1-py3-none-any.whl
| Download URL | cubeparser_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e45a967e19704920ceba9f9cecb5cd4926aaad617bc1bd6fcea5b27f1006f71b
|
|
BLAKE2b-256 checksum How to use checksums |
b03f2806db908177878fa8e8e723b818fc10b01b27268d42b2ed22689ac1423a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.18
|
Security for cubeparser-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.