KEMBAR78
Alfresco and the Model Context Protocol (MCP) | PDF
January 23, 2025
©2024 Hyland Software, Inc. and its affiliates. All rights reserved. All Hyland product names are registered or unregistered trademarks of Hyland Software, Inc. or its affiliates in the United States and other countries.
Alfresco and the
Model Context
Protocol (MCP)
Alfresco TTL#164
Angel Borroy
Developer Evangelist
• Semantic Search
• Retrieval-Augmented Generation (RAG)
• Model Context Protocol (MCP)
• Alfresco & MCP
Agenda
Semantic Search
Semantic Search
How can I integrate Alfresco with an external REST API?
1
2
3
4
5
Guide to developing custom integrations with Alfresco
Using Web Scripts to extend Alfresco functionality
Alfresco API Authentication methods explained
Alfresco Integration: External application use cases
Configuring Alfresco to Consume External APIs
Synonyms
Conceptual
Relationships
Contextual
Relevance
Broader
Understanding
Connecting Alfresco to external systems
and consuming external services
Authentication, Web Scripts and Use Cases
Development and configuration
Developer and Admin focused solutions
Semantic Search
Knowledge Base
Alfresco
Embedding
0.12, -0.34, 0.56, 0.78, -0.90, 0.23
Storage
Vector Database
Similarity Search
Vector Database
Documents
Content associated with search
Semantic Search
Embedding Library
SentenceTransformers Transformers spaCy Nomic
Type Sentence embeddings NLP framework Lightweight NLP Embedding
Embedding Type Dense vectors
Dense vectors,
word, or token
Word, document Dense vectors
Ease of Use High Medium to High Very High High
Dimensions 384 to 1024 768 to 1024 300 (default) 768 (default)
Use Cases Similarity, search Broad NLP tasks Lightweight NLP Quick embedding
Cons Resource-intensive High memory usage Static embeddings API Dependency
License Apache License 2.0 Apache License 2.0 MIT MIT
Semantic Search
Vector Database
Weaviate Milvus Vespa Qdrant OpenSearch Elasticsearch
Type Database Database Engine Database Search Engine Search Engine
Indexing HNSW IVF, HNSW k-NN HNSW k-NN k-NN
Ease of Use Easy Moderate Complex Easy Moderate Easy
Use Case RAG
Semantic search
RAG
Recommendations
Real-time
Recommendations
Search
Recommendations
Hybrid search
Analytics
Hybrid search
Analytics
Cons
Schema
management
Complex setup
Steeper
learning curve
Still maturing
Slower on high-
dimension
vectors
Less optimized
for vector-only
queries
License BSL 1.1
Apache
License 2.0
Apache
License 2.0
Apache
License 2.0
Apache
License 2.0
Elastic License
2.0
Semantic Search
https://github.com/aborroy/alfresco-opensearch-neural-search
Retrieval-Augmented Generation
RAG
RAG
How can I integrate Alfresco with an external REST API?
1
2
3
4
5
Guide to developing custom integrations with Alfresco
Using Web Scripts to extend Alfresco functionality
Alfresco API Authentication methods explained
Alfresco Integration: External application use cases
Configuring Alfresco to Consume External APIs
LLM Response
To configure Alfresco for integration with an
external REST API, you can either expose
custom Web Scripts or consume external
APIs directly. For exposing functionality,
create and deploy Web Scripts using Java or
JavaScript, enabling RESTful endpoints to
interact with your external systems. If
consuming APIs, configure HTTP connectors
in Alfresco to make secure calls to external
APIs.
Authentication is key—ensure you have
configured OAuth2 or Basic Authentication for
secure access to Alfresco's APIs. Additionally,
check that your endpoints are properly
formatted, and use tools like Postman to test
API requests.
For document synchronization, use Alfresco’s
REST API to retrieve documents, metadata,
or folder structures.
RAG
User Query
What is Content Federation?
Query Embedding
0.12, -0.34, 0.56, 0.78, -0.90, 0.23
Similarity Search
Vector Database
Contextual Data
Content associated with retrieval
Response Generation
LLM
RAG
LLM (Large Language Model)
Mistral DeepSeek Llama 3 Gemma 2 Qwen-2.5 Phi-3.5
Memory
Efficiency
High Moderate High High High Very High
Inference Speed Fast with GPU Moderate Fast with GPU Moderate Very Fast Fast with GPU
Parameter Size 7B 14B 13B 10B 8B 7B
Features
Efficient for text
generation and
summarization,
retains context well
Reasoning model
with high context
retention for RAG
More accurate and
nuanced; useful for
detailed responses in
RAG tasks
Optimized for
memory usage and
contextual accuracy
in RAG applications
Strong in multilingual
contexts, optimized
for efficient
deployment
Focuses on low
latency, lightweight
and memory-
efficient; suitable for
smaller RAG tasks
License Apache License 2.0
DeepSeek License
Agreement
LLaMA Community
License
Apache License 2.0 Apache License 2.0 MIT
RAG
https://github.com/aborroy/alfresco-ai-framework
Model Context Protocol MCP
Background & Motivation
An open standard designed to unify how applications
communicate context to AI models
MCP
MCP Server
https://github.com/modelcontextprotocol/servers
Architecture
• MCP Hosts: Programs like Claude
Desktop, IDEs, or AI tools that want to
access data through MCP
• MCP Clients: Protocol clients that
maintain 1:1 connections with servers
• MCP Servers: Lightweight programs that
each expose specific capabilities through
the standardized Model Context Protocol
• Local Data Sources: Your computer’s
files, databases, and services that MCP
servers can securely access
• Remote Services: External systems
available over the internet (e.g., through
APIs) that MCP servers can connect to
MCP
MCP Server
Choose your flavor:
• Python SDK: https://github.com/modelcontextprotocol/python-sdk
• TypeScript SDK: https://github.com/modelcontextprotocol/typescript-sdk
MCP servers can provide three main types of capabilities:
• Resources
• File-like data that can be read by clients (like API responses or file contents)
• Prompts
• Pre-written templates that help users accomplish specific tasks
• Tools
• Functions that can be called by the LLM (with user approval)
MCP
Resources
Resources are identified using URIs that follow this format:
[protocol]://[host]/[path]
For example: alfresco:///home/user/documents/report.pdf
• Text resources contain UTF-8 encoded text data. These are suitable
for source code, configuration files, log files, JSON/XML data
• Binary resources contain raw binary data encoded in base64. These
are suitable for Images, PDFs, Audio files, Video files
MCP
Prompts
Prompts in MCP are predefined templates that can:
• Accept dynamic arguments
• Include context from resources
• Chain multiple interactions
• Guide specific workflows
• Surface as UI elements (like slash commands)
MCP
Tools
Tools in MCP allow servers to expose executable functions that can be
invoked by clients and used by LLMs to perform actions.
• Discovery: Clients can list available tools through the tools/list
endpoint
• Invocation: Tools are called using the tools/call endpoint, where
servers perform the requested operation and return results
• Flexibility: Tools can range from simple calculations to complex API
interaction
MCP
Transport
MCP uses JSON-RPC 2.0 as its wire format (request, response and
notification)
Built-in Transport Types:
• Standard Input/Output (stdio) for command-line tools
• Server-Sent Events (SSE) for server-to-client streaming
MCP allows custom transport implementations
MCP
MCP Client
• Connect to the specified server
• List available tools
• Start an interactive chat session where you can:
• Enter queries
• See tool executions
• Get responses from LLM
Some frameworks and apps implementing MCP Client:
• langchain4j, spring-ai-mcp, Claude Desktop App
MCP
Claude APP
• Set up Git MCP Agentic Tooling with Claude Desktop
MCP
Alfresco & MCP
Alfresco & MCP
Alfresco
MCP Server
MCP Client
LLM
TypeScript SDK
https://github.com/aborroy/alfresco-mcp-poc
Alfresco and the Model Context Protocol (MCP)

Alfresco and the Model Context Protocol (MCP)

  • 2.
    January 23, 2025 ©2024Hyland Software, Inc. and its affiliates. All rights reserved. All Hyland product names are registered or unregistered trademarks of Hyland Software, Inc. or its affiliates in the United States and other countries. Alfresco and the Model Context Protocol (MCP) Alfresco TTL#164 Angel Borroy Developer Evangelist
  • 3.
    • Semantic Search •Retrieval-Augmented Generation (RAG) • Model Context Protocol (MCP) • Alfresco & MCP Agenda
  • 4.
  • 5.
    Semantic Search How canI integrate Alfresco with an external REST API? 1 2 3 4 5 Guide to developing custom integrations with Alfresco Using Web Scripts to extend Alfresco functionality Alfresco API Authentication methods explained Alfresco Integration: External application use cases Configuring Alfresco to Consume External APIs Synonyms Conceptual Relationships Contextual Relevance Broader Understanding Connecting Alfresco to external systems and consuming external services Authentication, Web Scripts and Use Cases Development and configuration Developer and Admin focused solutions
  • 6.
    Semantic Search Knowledge Base Alfresco Embedding 0.12,-0.34, 0.56, 0.78, -0.90, 0.23 Storage Vector Database Similarity Search Vector Database Documents Content associated with search
  • 7.
    Semantic Search Embedding Library SentenceTransformersTransformers spaCy Nomic Type Sentence embeddings NLP framework Lightweight NLP Embedding Embedding Type Dense vectors Dense vectors, word, or token Word, document Dense vectors Ease of Use High Medium to High Very High High Dimensions 384 to 1024 768 to 1024 300 (default) 768 (default) Use Cases Similarity, search Broad NLP tasks Lightweight NLP Quick embedding Cons Resource-intensive High memory usage Static embeddings API Dependency License Apache License 2.0 Apache License 2.0 MIT MIT
  • 8.
    Semantic Search Vector Database WeaviateMilvus Vespa Qdrant OpenSearch Elasticsearch Type Database Database Engine Database Search Engine Search Engine Indexing HNSW IVF, HNSW k-NN HNSW k-NN k-NN Ease of Use Easy Moderate Complex Easy Moderate Easy Use Case RAG Semantic search RAG Recommendations Real-time Recommendations Search Recommendations Hybrid search Analytics Hybrid search Analytics Cons Schema management Complex setup Steeper learning curve Still maturing Slower on high- dimension vectors Less optimized for vector-only queries License BSL 1.1 Apache License 2.0 Apache License 2.0 Apache License 2.0 Apache License 2.0 Elastic License 2.0
  • 9.
  • 10.
  • 11.
    RAG How can Iintegrate Alfresco with an external REST API? 1 2 3 4 5 Guide to developing custom integrations with Alfresco Using Web Scripts to extend Alfresco functionality Alfresco API Authentication methods explained Alfresco Integration: External application use cases Configuring Alfresco to Consume External APIs LLM Response To configure Alfresco for integration with an external REST API, you can either expose custom Web Scripts or consume external APIs directly. For exposing functionality, create and deploy Web Scripts using Java or JavaScript, enabling RESTful endpoints to interact with your external systems. If consuming APIs, configure HTTP connectors in Alfresco to make secure calls to external APIs. Authentication is key—ensure you have configured OAuth2 or Basic Authentication for secure access to Alfresco's APIs. Additionally, check that your endpoints are properly formatted, and use tools like Postman to test API requests. For document synchronization, use Alfresco’s REST API to retrieve documents, metadata, or folder structures.
  • 12.
    RAG User Query What isContent Federation? Query Embedding 0.12, -0.34, 0.56, 0.78, -0.90, 0.23 Similarity Search Vector Database Contextual Data Content associated with retrieval Response Generation LLM
  • 13.
    RAG LLM (Large LanguageModel) Mistral DeepSeek Llama 3 Gemma 2 Qwen-2.5 Phi-3.5 Memory Efficiency High Moderate High High High Very High Inference Speed Fast with GPU Moderate Fast with GPU Moderate Very Fast Fast with GPU Parameter Size 7B 14B 13B 10B 8B 7B Features Efficient for text generation and summarization, retains context well Reasoning model with high context retention for RAG More accurate and nuanced; useful for detailed responses in RAG tasks Optimized for memory usage and contextual accuracy in RAG applications Strong in multilingual contexts, optimized for efficient deployment Focuses on low latency, lightweight and memory- efficient; suitable for smaller RAG tasks License Apache License 2.0 DeepSeek License Agreement LLaMA Community License Apache License 2.0 Apache License 2.0 MIT
  • 14.
  • 15.
  • 16.
    Background & Motivation Anopen standard designed to unify how applications communicate context to AI models MCP MCP Server https://github.com/modelcontextprotocol/servers
  • 17.
    Architecture • MCP Hosts:Programs like Claude Desktop, IDEs, or AI tools that want to access data through MCP • MCP Clients: Protocol clients that maintain 1:1 connections with servers • MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol • Local Data Sources: Your computer’s files, databases, and services that MCP servers can securely access • Remote Services: External systems available over the internet (e.g., through APIs) that MCP servers can connect to MCP
  • 18.
    MCP Server Choose yourflavor: • Python SDK: https://github.com/modelcontextprotocol/python-sdk • TypeScript SDK: https://github.com/modelcontextprotocol/typescript-sdk MCP servers can provide three main types of capabilities: • Resources • File-like data that can be read by clients (like API responses or file contents) • Prompts • Pre-written templates that help users accomplish specific tasks • Tools • Functions that can be called by the LLM (with user approval) MCP
  • 19.
    Resources Resources are identifiedusing URIs that follow this format: [protocol]://[host]/[path] For example: alfresco:///home/user/documents/report.pdf • Text resources contain UTF-8 encoded text data. These are suitable for source code, configuration files, log files, JSON/XML data • Binary resources contain raw binary data encoded in base64. These are suitable for Images, PDFs, Audio files, Video files MCP
  • 20.
    Prompts Prompts in MCPare predefined templates that can: • Accept dynamic arguments • Include context from resources • Chain multiple interactions • Guide specific workflows • Surface as UI elements (like slash commands) MCP
  • 21.
    Tools Tools in MCPallow servers to expose executable functions that can be invoked by clients and used by LLMs to perform actions. • Discovery: Clients can list available tools through the tools/list endpoint • Invocation: Tools are called using the tools/call endpoint, where servers perform the requested operation and return results • Flexibility: Tools can range from simple calculations to complex API interaction MCP
  • 22.
    Transport MCP uses JSON-RPC2.0 as its wire format (request, response and notification) Built-in Transport Types: • Standard Input/Output (stdio) for command-line tools • Server-Sent Events (SSE) for server-to-client streaming MCP allows custom transport implementations MCP
  • 23.
    MCP Client • Connectto the specified server • List available tools • Start an interactive chat session where you can: • Enter queries • See tool executions • Get responses from LLM Some frameworks and apps implementing MCP Client: • langchain4j, spring-ai-mcp, Claude Desktop App MCP
  • 24.
    Claude APP • Setup Git MCP Agentic Tooling with Claude Desktop MCP
  • 25.
  • 26.
    Alfresco & MCP Alfresco MCPServer MCP Client LLM TypeScript SDK https://github.com/aborroy/alfresco-mcp-poc