Skip to main content
Glama

Alfresco MCP Server

by stevereiner
Apache 2.0
2
  • Linux
  • Apple

Python Alfresco MCP Server 🚧 (Preview)

Python based Model Context Protocol server for Alfresco Content Services

Provides AI-native access to Alfresco content management operations through the Model Context Protocol.

🚀 Features

Comprehensive Content Management Tools

  • Search API: Advanced text search with AFTS query language
  • Document Lifecycle: Upload, download, checkin, checkout, cancel checkout
  • Version Management: Create major/minor versions with comments
  • Folder Operations: Create and delete folders with metadata
  • Property Management: Get and set document/folder properties and names
  • Node Operations: Delete documents and folders (trash or permanent)

Enterprise-Ready Architecture

  • Multiple Transports: stdio (direct MCP) and FastAPI (HTTP/testing)
  • Type Safety: Full Pydantic v2 models and async support
  • Configuration: Environment variables and config file support
  • Logging: Comprehensive logging with configurable levels
  • Error Handling: Graceful error handling with detailed messages

AI Integration

  • MCP Tools: 9 comprehensive tools for content operations
  • MCP Resources: Repository metadata and status
  • MCP Prompts: AI-friendly templates for common workflows

📋 Requirements

  • Python 3.8+
  • Alfresco Content Services (Community or Enterprise)
  • python-alfresco-api >= 1.0.0

🛠️ Installation

1. Install Dependencies

# Install MCP server pip install -e . # Or with development dependencies pip install -e .[dev]

2. Configure Alfresco Connection

Environment Variables (recommended):

export ALFRESCO_URL="http://localhost:8080" export ALFRESCO_USERNAME="admin" export ALFRESCO_PASSWORD="admin" export ALFRESCO_VERIFY_SSL="false"

Or Config File (config.yaml):

alfresco_url: "http://localhost:8080" username: "admin" password: "admin" verify_ssl: false

🚀 Usage

stdio Transport (MCP Client)

# Run MCP server with stdio transport alfresco-mcp-server --transport stdio # Or directly python -m alfresco_mcp_server.main --transport stdio

FastAPI Transport (HTTP/Testing)

# Run HTTP server for testing alfresco-mcp-server --transport fastapi # Server runs on http://localhost:8000 # API docs at http://localhost:8000/docs

MCP Client Example

import asyncio from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client async def main(): server_params = StdioServerParameters( command="python", args=["-m", "alfresco_mcp_server.main", "--transport", "stdio"] ) async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: await session.initialize() # Search for documents result = await session.call_tool( "search_content", arguments={"query": "important document", "max_results": 10} ) print(result)

🛠️ Available Tools

ToolDescriptionParameters
search_contentSearch documents and foldersquery (str), max_results (int)
download_documentDownload document contentnode_id (str)
upload_documentUpload new documentfilename (str), content_base64 (str), parent_id (str), description (str)
checkout_documentCheck out for editingnode_id (str)
checkin_documentCheck in after editingnode_id (str), comment (str), major_version (bool)
create_folderCreate new folderfolder_name (str), parent_id (str), description (str)
delete_nodeDelete document/foldernode_id (str), permanent (bool)
get_node_propertiesGet node metadatanode_id (str)
update_node_propertiesUpdate node metadatanode_id (str), properties (dict), name (str)

🔧 Configuration Options

Environment VariableDefaultDescription
ALFRESCO_URLhttp://localhost:8080Alfresco server URL
ALFRESCO_USERNAMEadminUsername for authentication
ALFRESCO_PASSWORDadminPassword for authentication
ALFRESCO_VERIFY_SSLfalseVerify SSL certificates
ALFRESCO_TIMEOUT30Request timeout (seconds)
FASTAPI_HOSTlocalhostFastAPI host
FASTAPI_PORT8000FastAPI port
LOG_LEVELINFOLogging level
MAX_FILE_SIZE100000000Max upload size (bytes)

🏗️ Architecture

┌─────────────────────────────────────┐ │ MCP Client │ │ (Claude, Custom App, etc.) │ └─────────────┬───────────────────────┘ │ stdio/HTTP ┌─────────────▼───────────────────────┐ │ Alfresco MCP Server │ │ ┌─────────────┬─────────────────┐ │ │ │ MCP Tools │ MCP Resources │ │ │ │ MCP Prompts │ FastAPI API │ │ │ └─────────────┴─────────────────┘ │ └─────────────┬───────────────────────┘ │ python-alfresco-api ┌─────────────▼───────────────────────┐ │ Alfresco Content Services │ │ (Community/Enterprise Edition) │ └─────────────────────────────────────┘

🧪 Development

Setup Development Environment

git clone <repository> cd python-alfresco-mcp-server # Create virtual environment python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows # Install development dependencies pip install -e .[dev] # Install python-alfresco-api (local development) pip install -e ../python-alfresco-api

Run Tests

# Run test suite pytest # Run with coverage pytest --cov=alfresco_mcp_server # Run specific test pytest tests/test_server.py -v

Code Quality

# Format code black alfresco_mcp_server/ # Type checking mypy alfresco_mcp_server/ # Linting ruff check alfresco_mcp_server/

📚 Examples

See the examples/ directory for:

  • basic_client.py - Basic MCP client usage
  • fastapi_client.py - HTTP API testing
  • document_workflow.py - Complete document lifecycle
  • search_examples.py - Advanced search patterns

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the Alfresco 2.0 License - see the LICENSE file for details.

🙋‍♂️ Support


Built using python-alfresco-api and the Model Context Protoco Python SDK

Related MCP Servers

  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
    Last updated -
    2
    Python
    MIT License
    • Apple
  • -
    security
    F
    license
    -
    quality
    A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
    Last updated -
    1
    Python
    • Linux
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that enables AI assistants to interact with Confluence content, supporting operations like retrieving, searching, creating, and updating pages and spaces.
    Last updated -
    9
    3
    TypeScript
    MIT License
  • -
    security
    F
    license
    -
    quality
    A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
    Last updated -
    16
    TypeScript

View all related MCP servers

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/stevereiner/python-alfresco-mcp-server'

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