A Model Context Protocol (MCP) server for TelDrive, enabling seamless integration with AI assistants for file management operations.
- File Search: Search and filter files by name, content, category, and type
- File Listing: List files within specific folders with pagination
- Folder Creation: Create new folders at specified paths
- File Reading: Read file contents with support for text, images, and audio
- Resource Templates: Automatic content loading via URI references
- Multiple Content Types: Support for text, image, and audio file formats
curl -sSL instl.vercel.app/tgdrive/teldrive-mcp | bash
powershell -c "irm https://instl.vercel.app/tgdrive/teldrive-mcp?platform=windows|iex"
To start the server with standard input/output transport, run:
./teldrive-mcp -base-url $BASE_URL -token $AUTH_TOKEN
To start the server with HTTP transport, run:
./teldrive-mcp -transport http -base-url $BASE_URL -token $AUTH_TOKEN
The server will start on port 8080 with the following endpoints:
- HTTP Streaming:
http://localhost:8080/mcp/http
- SSE:
http://localhost:8080/mcp/sse
Search for files and folders with various filters.
Parameters:
query
(string): File name or keyword to searchname
(string): Exact file name to findlimit
(number): Maximum results to return (default: 20)page
(number): Page number to return (default: 1)category
(array): Filter by category (document, image, video, audio, archive, other)searchType
(string): "text" for literal matches, "regex" for regular expressionstype
(string): Filter by type (file or folder)
Example:
{
"name": "search_files",
"arguments": {
"query": "report",
"category": ["document"],
"limit": 10
}
}
List files within a specific folder.
Parameters:
folder_id
(string, required): ID of the folder to listlimit
(number): Maximum results to return (default: 50)page
(number): Page number to return (default: 1)
Example:
{
"name": "list_files",
"arguments": {
"folder_id": "folder123",
"limit": 20
}
}
Create a new folder at the specified path.
Parameters:
path
(string, required): Path to create the folder (e.g., /folder1/folder2)name
(string, required): Name of the folder to create
Example:
{
"name": "create_folder",
"arguments": {
"path": "/documents",
"name": "reports"
}
}
Read the content of a file by its ID.
Parameters:
file_id
(string, required): ID of the file to read
Example:
{
"name": "read_file",
"arguments": {
"file_id": "file456"
}
}
The server provides a resource template for accessing file content:
- URI Pattern:
tdrive:///{id}
- Description: Returns file content
- Supported Types: Text, images, and audio files
When an AI assistant references a URI like tdrive:///file123
, the server automatically fetches and returns the file content.
{
"files": [
{
"id": "file123",
"name": "document.pdf",
"mimeType": "application/pdf",
"size": 1024,
"updatedAt": "2023-01-01T00:00:00Z"
}
],
"meta": {
"count": 1,
"totalPages": 1
}
}
{
"name": "search_files",
"arguments": {
"query": "quarterly report",
"category": ["document"],
"limit": 5
}
}
{
"name": "list_files",
"arguments": {
"folder_id": "root",
"limit": 10
}
}
{
"name": "create_folder",
"arguments": {
"path": "/projects",
"name": "2023"
}
}
{
"name": "read_file",
"arguments": {
"file_id": "file789"
}
}
This project is licensed under the MIT License - see the LICENSE file for details.