🚀 Python Alfresco MCP Server v1.1
A full - featured MCP server for Alfresco in search and content management areas

🚀 Quick Start
The Python Alfresco MCP Server v1.1 is a powerful tool for Alfresco content management and search. Built with FastMCP 2.0, it offers a wide range of content management and search tools, as well as comprehensive documentation and examples.
✨ Features
Content Management and Search Tools
- Search Tools:
- Full Text Search (
search_content): Basic content search with wildcard support.
- Advanced Search: Utilize AFTS query language with date filters, sorting, and field targeting.
- Metadata Search: Conduct property - based queries with operators like equals, contains, and date ranges.
- CMIS Search: Perform SQL - like queries for complex content discovery.
- Document Lifecycle: Support for upload, download, check - in, checkout, and cancel checkout operations.
- Version Management: Create major/minor versions with comments.
- Folder Operations: Create and delete folder nodes.
- Property Management: Get and set document/folder properties and names.
- Node Operations: Delete nodes (documents and folders) either to trash or permanently.
- Repository Info: Retrieve repository status, version, edition (Community or Enterprise), and module configuration.
MCP Architecture
- FastMCP 2.0 Framework: A modern, high - performance MCP server implementation.
- Multiple Transports:
- STDIO (direct MCP protocol): Default and fastest option.
- HTTP (RESTful API): Ideal for web services and testing.
- SSE (Server - Sent Events): Enable real - time streaming updates.
- Enterprise Security: Optional OAuth 2.1 support.
- Type Safety: Full Pydantic v2 models.
- In - Memory Testing: Facilitate faster client testing.
- Configuration: Support for environment variables and
.env files.
Alfresco Integration
Compatible with both Alfresco Community (tested) and Enterprise editions.
📦 Installation
Install Python
You need Python 3.10+ installed. Download the latest 3.13.x version from Python.org Downloads.
UV/UVX Setup (Recommended)
UV is a modern Python package manager written in Rust that provides uv (package manager) and uvx (tool runner). It's much faster than pip due to its compiled nature and optimized dependency resolution.
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
curl -LsSf https://astral.sh/uv/install.sh | sh
pip install uv
uv --version
uvx --version
UV Reference Links:
Option A: UVX - Modern Tool Runner (Recommended for Users)
UVX is UV's tool runner, similar to pipx but faster and more modern. It automatically handles isolation and global availability.
uvx python-alfresco-mcp-server --help
Option B: UV - Modern Package Manager (Recommended for Development)
uv tool install python-alfresco-mcp-server
uv tool run python-alfresco-mcp-server --help
git clone https://github.com/stevereiner/python-alfresco-mcp-server.git
cd python-alfresco-mcp-server
uv run python-alfresco-mcp-server --help
Option C: Traditional Methods (pip and pipx)
For traditional Python package management approaches, see the Installation with pip and pipx.
Source Installation (For Development)
git clone https://github.com/stevereiner/python-alfresco-mcp-server.git
cd python-alfresco-mcp-server
uv run python-alfresco-mcp-server --help
uv sync
uv sync --extra dev
uv sync --extra test
uv sync --extra all
Configure Alfresco Connection
Option 1: Environment Variables
export ALFRESCO_URL="http://localhost:8080"
export ALFRESCO_USERNAME="admin"
export ALFRESCO_PASSWORD="admin"
export ALFRESCO_VERIFY_SSL="false"
$env:ALFRESCO_URL="http://localhost:8080"
$env:ALFRESCO_USERNAME="admin"
$env:ALFRESCO_PASSWORD="admin"
$env:ALFRESCO_VERIFY_SSL="false"
set ALFRESCO_URL=http://localhost:8080
set ALFRESCO_USERNAME=admin
set ALFRESCO_PASSWORD=admin
set ALFRESCO_VERIFY_SSL=false
Option 2: .env file (recommended - cross - platform):
cp sample-dot-env.txt .env
copy sample-dot-env.txt .env
ALFRESCO_URL=http://localhost:8080
ALFRESCO_USERNAME=admin
ALFRESCO_PASSWORD=admin
ALFRESCO_VERIFY_SSL=false
⚠️ Important Note
The .env file is not checked into git for security. Use sample-dot-env.txt as a template.
📖 See Configuration Guide for complete setup options
Alfresco Installation
If you don't have an Alfresco server installed, you can get a docker for the Community version from Github.
git clone https://github.com/Alfresco/acs-deployment.git
Move to Docker Compose directory
cd acs-deployment/docker-compose
Edit community-compose.yaml
- Note: you will likely need to comment out activemq ports other than 8161.
ports:
- "8161:8161"
Start Alfresco with Docker Compose
docker-compose -f community-compose.yaml up
💻 Usage Examples
MCP Server Startup
With UVX (Recommended - Automatic isolation and global availability):
uvx python-alfresco-mcp-server
uvx python-alfresco-mcp-server --transport http --host 127.0.0.1 --port 8003
uvx python-alfresco-mcp-server --transport sse --host 127.0.0.1 --port 8001
With UV (For development or source installations):
uv run python-alfresco-mcp-server
uv run python-alfresco-mcp-server --transport http --host 127.0.0.1 --port 8003
uv run python-alfresco-mcp-server --transport sse --host 127.0.0.1 --port 8001
With Traditional Methods (pip/pipx):
See the Installation with pip and pipx for pip and pipx usage instructions.
MCP Client Setup and Use
🤖 Claude Desktop for Windows (tested) and MacOS (not tested)
📖 Complete Setup Guide: Claude Desktop Setup Guide
📥 Download Claude Desktop (Free and Pro versions):
- Download Claude Desktop - Official Anthropic download page.
- Available for Windows and macOS only (no Linux version).
- Free tier includes full MCP support and Claude Sonnet 4 access with limits, older Claude models (Claude Opus 4 only in Pro).
🔧 Claude Desktop Configuration by Installation Method:
1. UVX (Recommended - Modern tool runner):
{
"command": "uvx",
"args": ["python-alfresco-mcp-server", "--transport", "stdio"]
}
2. UV (Development or source installations):
{
"command": "uv",
"args": ["run", "python-alfresco-mcp-server", "--transport", "stdio"],
"cwd": "C:\\path\\to\\python-alfresco-mcp-server"
}
3. Traditional Methods (pipx/pip):
For traditional installation methods, see the Installation with pip and pipx.
🔐 Tool - by - Tool Permission System:
Claude Desktop will prompt you individually for each tool on first use. You can choose "Allow once" or "Always allow".
Using the Tools:
- Chat naturally about document management and search tasks.
- Mention "Alfresco" to ensure the MCP server is used.
- Use tool - related keywords.
- Follow - up prompts will use previous context.
Example 1: Document Management
- Upload a simple text document: "Please create a file called 'claude_test_doc-25 07 25 101 0 AM.txt' in the repository shared folder with this content: 'This is a test document created by Claude via MCP.' description 'Test document uploaded via Claude MCP'"
- Update properties: "Set the description property of this document to 'my desc'"
- Check out the document
- Cancel checkout
- Check out again
- Check in as a major version
- Download the document
- Upload a second document from "C:\1 sample files\cmispress.pdf"
Example 2: Search Operations
"With Alfresco please test all 3 search methods and CMIS query:"
- Basic search for "txt" documents, return max 10.
- Advanced search for documents created after 2024 - 01 - 01, return max 25.
- Metadata search for documents where cm:title contains "test", limit to 50.
- CMIS search to find all txt documents, limit to 50.
More Examples: Create Folder, Browse Folders, Get Repository Info
- "Create a folder called '25 07 25 01 18 am' in shared folder"
- "List docs and folders in shared folder" (will use -shared-)
- "Can you show me what's in my Alfresco home directory?" (will use browse_repository -my-)
- "Get info on Alfresco" (will use repository_info tool)
Chat Box Buttons
- Use the Search and tools button (two horizontal lines with circles icon) in the chat box and choose "python-alfresco-mcp-server" to enable/disable all tools or individual tools.
- Click the + Button → "Add from alfresco" for quick access to resources and prompts.
Search and Analyze Prompt:
- Provides a form with a query field for full - text search.
- Analysis types: summary, detailed, trends, or compliance.
- Generates template text to copy/paste into chat for editing.
Repository Info Resource (and Tool):
- Provides status information in text format for viewing or copying.
Examples:
- See for examples testing the tools.
🔍 MCP Inspector (Development/Testing)
📖 Setup Guide: Complete MCP Inspector setup and connection instructions in MCP Inspector Setup Guide
📥 Install MCP Inspector:
- Prerequisites: Requires Node.js 18+ - Download from nodejs.org
- Install Command:
npm install -g @modelcontextprotocol/inspector
- Or run directly:
npx @modelcontextprotocol/inspector (no global install needed)
Working Method (Recommended):
1. Start MCP Server with HTTP transport:
uvx python-alfresco-mcp-server --transport http --port 8003
uv run python-alfresco-mcp-server --transport http --port 8003
2. Start MCP Inspector with config:
UVX Installation (Recommended):
npx @modelcontextprotocol/inspector --config mcp-inspector-stdio-uvx-config.json --server python-alfresco-mcp-server
npx @modelcontextprotocol/inspector --config mcp-inspector-http-uvx-config.json --server python-alfresco-mcp-server
UV Installation (Development):
npx @modelcontextprotocol/inspector --config mcp-inspector-stdio-uv-config.json --server python-alfresco-mcp-server
npx @modelcontextprotocol/inspector --config mcp-inspector-http-uv-config.json --server python-alfresco-mcp-server
Traditional Methods (pipx/pip):
See the Installation with pip and pipx for pipx and pip configuration options.
3. Open browser with pre - filled token:
- Use the URL provided in the output (includes authentication token).
- Example:
http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<token>
🛠️ Available Tools (15 Total)
🔍 Search Tools (4)
| Tool |
Description |
Parameters |
search_content |
Search documents and folders |
query (str), max_results (int), node_type (str) |
advanced_search |
Advanced search with filters |
query (str), content_type (str), created_after (str), etc. |
search_by_metadata |
Search by metadata properties |
property_name (str), property_value (str), comparison (str) |
cmis_search |
CMIS SQL queries |
cmis_query (str), preset (str), max_results (int) |
🛠️ Core Tools (11)
| Tool |
Description |
Parameters |
browse_repository |
Browse repository folders |
node_id (str) |
repository_info |
Get repository information |
None |
upload_document |
Upload new document |
filename (str), content_base64 (str), parent_id (str), description (str) |
download_document |
Download document content |
node_id (str), save_to_disk (bool) |
create_folder |
Create new folder |
folder_name (str), parent_id (str), description (str) |
get_node_properties |
Get node metadata |
node_id (str) |
update_node_properties |
Update node metadata |
node_id (str), name (str), title (str), description (str), author (str) |
delete_node |
Delete document/folder |
node_id (str), permanent (bool) |
checkout_document |
Check out for editing |
node_id (str), download_for_editing (bool) |
checkin_document |
Check in after editing |
node_id (str), comment (str), major_version (bool), file_path (str) |
cancel_checkout |
Cancel checkout/unlock |
node_id (str) |
📖 See API Reference for detailed tool documentation
📊 Available Resources
Repository Information
| Resource |
Description |
Access Method |
repository_info |
Get comprehensive repository information including version, edition, license details, installed modules, and system status |
Available as both MCP resource and tool |
The repository_info resource provides:
- Repository Details: ID, edition (Community/Enterprise), version information.
- License Information: Issued/expires dates, remaining days, license holder, entitlements.
- System Status: Read - only mode, audit enabled, quick share, thumbnail generation.
- Installed Modules: Up to 10 modules with ID, title, version, and installation state.
📖 See API Reference for detailed resource documentation
🎯 Available Prompts
Search and Analyze Prompt
| Prompt |
Description |
Parameters |
search_and_analyze |
Interactive form for guided content search and analysis |
query (search terms), analysis_type (summary/detailed/trends/compliance) |
The search_and_analyze prompt provides:
- Interactive Form: A user - friendly interface with a query input field.
- Analysis Options: Choose from summary, detailed analysis, trends, or compliance reporting.
- Template Generation: Creates copyable template text for chat conversations.
- Query Assistance: Helps users structure effective search queries.
- Multiple Search Types: Integrates with all 4 search tools (content, advanced, metadata, CMIS).
📖 See API Reference for detailed prompt documentation
🔧 Configuration Options
| Environment Variable |
Default |
Description |
ALFRESCO_URL |
http://localhost:8080 |
Alfresco server URL |
ALFRESCO_USERNAME |
admin |
Username for authentication |
ALFRESCO_PASSWORD |
admin |
Password for authentication |
ALFRESCO_VERIFY_SSL |
false |
Verify SSL certificates |
ALFRESCO_TIMEOUT |
30 |
Request timeout (seconds) |
FASTAPI_HOST |
localhost |
FastAPI host |
FASTAPI_PORT |
8000 |
FastAPI port |
LOG_LEVEL |
INFO |
Logging level |
MAX_FILE_SIZE |
100000000 |
Max upload size (bytes) |
⚙️ See Configuration Guide for deployment options
🏗️ Architecture
┌─────────────────────────────────────────────────────┐
│ MCP Clients │
│ Claude Desktop │ MCP Inspector │ Cursor │ Claude │
│ Code │ n8n │ LangFlow │ Custom MCP Client App │
└─────────────────┬───────────────────────────────────┘
│ stdio/HTTP/SSE
┌─────────────────▼───────────────────────────────────┐
│ FastMCP 2.0 MCP Server │
│ ┌─────────────┬─────────────┬─────────────────┐ │
│ │ MCP Tools │ MCP │ HTTP/SSE API │ │
│ │ (15 total) │ Resources │ │ │
│ │ │ MCP Prompts │ │ │
│ └─────────────┴─────────────┴─────────────────┘ │
└─────────────────┬───────────────────────────────────┘
│ python-alfresco-api
┌─────────────────▼───────────────────────────────────┐
│ Alfresco Content Services │
│ (Community/Enterprise Edition) │
└─────────────────────────────────────────────────────┘
🧪 Testing & Quality
Test Suite Overview
- 143 Total Tests: 100% passed - Comprehensive coverage of all functionality.
- 122 Unit Tests: 100% passed - Validate core functionality with mocking.
- 21 Integration Tests: 100% passed - Conduct live server testing for search, upload, download, and document lifecycle operations.
- Performance Validated: Search operations complete in <1s, support concurrent operations and resource access.
Coverage Report (Post - Cleanup)
- Overall Coverage: 51% (1,829 statements tested).
- FastMCP 2.0 Core: Well - tested with comprehensive unit coverage.
- Configuration Module: 93% coverage - Fully tested.
- Package Initialization: 100% coverage (5/5 lines) - Complete.
Run Tests
pytest
pytest --cov=alfresco_mcp_server --cov-report=term-missing
pytest -m "unit"
pytest -m "fastmcp"
pytest -m "integration"
🧪 See Testing Guide for detailed testing strategies
🧪 Test Categories and Execution
The project includes 4 levels of testing:
- 📋 Unit Tests (122 tests) - Fast, mocked, isolated component testing.
- 🔗 Integration Tests (21 tests) - Live Alfresco server testing.
- 📝 Comprehensive Tests - Automated core document lifecycle scenarios.
- 📊 Coverage Tests - Cover edge cases and error paths.
🧪 Development
Setup Development Environment
git clone <repository>
cd python-alfresco-mcp-server
uv sync --extra dev
uv sync --extra test
uv sync --extra all
uv run python-alfresco-mcp-server --help
uv add --editable ../python-alfresco-api
Traditional Development Setup:
See the Installation with pip and pipx for pip - based development setup.
💡 Examples
Real - world implementation patterns from beginner to enterprise:
- 💡 Examples Library - Complete navigation and learning paths.
- 🏃 Quick Start - 5 - minute introduction and basic operations.
- 📋 Document Lifecycle - Complete process demonstration.
- 🚀 Transport Examples - STDIO, HTTP, and SSE protocols.
- ⚡ Batch Operations - High - performance bulk processing.
- 🛡️ Error Handling - Resilience patterns.
- 📊 Examples Summary - Overview and statistics.
🤝 Contributing
- Fork the repository.
- Create a feature branch (
git checkout -b feature/new-feature).
- Commit your changes (
git commit -m 'Add new feature').
- Push to the branch (
git push origin feature/new-feature).
- Open a Pull Request.
📄 License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
🔗 Related Projects and References
🙋♂️ Support
- 📚 Documentation: Complete guides in .
- 💡 Examples: Implementation patterns in .
- 🧪 Testing: Quality assurance in .
- 🔍 MCP Inspector: Development testing in .
- 🛠️ Troubleshooting: Problem solving in .
- 🐛 Issues: GitHub Issues
🚀 MCP server built with python-alfresco-api and FastMCP 2.0