Python Mcp

com.files由 files.com 發布v2.0.24更新於 Nov 8, 2026

Local-only Python MCP server for the Files.com API.

概覽

AI 產生的概覽

本機 STDIO MCP 伺服器,讓助理操作 Files.com 站台:傳輸檔案、瀏覽資料夾、管理使用者與分享連結,並讀取記錄。

可以做什麼
  • 上傳與下載檔案,並複製、移動、刪除、壓縮、解壓縮、加密或解密檔案
  • 瀏覽資料夾、依路徑尋找檔案、建立資料夾
  • 建立、更新與刪除分享連結及其收件者與通知
  • 建立、更新與刪除使用者、群組與權限
  • 列出自動化、遠端伺服器,以及站台活動、登入、傳輸與 API 記錄
適用情境
當助理需要在本機 MCP 用戶端(例如 Claude Desktop)中操作 Files.com 站台裡的檔案時使用,例如依需求取回或封存檔案、開設使用者與資料夾、稽核站台活動。透過網路連線 MCP 的用戶端應改用 Files.com 託管的 MCP 服務。
執行需求
支援啟動 STDIO 伺服器的本機 MCP 用戶端,以及 uv(或 Docker);第 2 版需要 Python 3.11 或更新版本。需在 FILES_COM_API_KEY 環境變數中提供 Files.com API 金鑰,並需要連線至 Files.com API 的外送網路。可選用 FILES_COM_LOCAL_ROOT(既有的絕對目錄)限制本機傳輸路徑。
安裝前請注意
此 API 金鑰讓助理能在你的站台執行真實操作,請使用依需求限定範圍的專用金鑰。工具可刪除檔案與資料夾、建立與刪除使用者、群組與權限,並建立會對外暴露檔案的分享連結。下載會在本機寫入新檔案;未設定 FILES_COM_LOCAL_ROOT 時允許伺服器可存取的任意路徑,且此設定無法隔離作業系統帳號。所有操作都會以 API 用戶端活動被記錄。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Python Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Files.com MCP Server

The files-com-mcp Python package lets your AI application interact with Files.com. It is for local use only and supports STDIO only: your MCP client starts the package as a subprocess on the same machine.

For MCP connections over a network, use the Files.com hosted MCP service.

Set FILES_COM_API_KEY in the environment your client passes to the subprocess. The local package makes outbound requests to the Files.com API to perform site operations.

Files.com is the cloud-native, next-gen MFT, SFTP, and secure file-sharing platform that replaces brittle legacy servers with one always-on, secure fabric. Automate mission-critical file flows—across any cloud, protocol, or partner—while supporting human collaboration and eliminating manual work.

With universal SFTP, AS2, HTTPS, and 50+ native connectors backed by military-grade encryption, Files.com unifies governance, visibility, and compliance in a single pane of glass.

Introduction

The Files.com Python MCP package lets Claude Desktop and other local MCP clients upload and download files, query folders, manage users, and run automations on your Files.com site. It uses the permissions of your API key, and its actions are logged like those of any other API client.

The Python package supports local use over STDIO (standard input and output) only. Your MCP client starts it on the same machine and communicates directly with that process, without a network listener. The package still needs outbound access to the Files.com API.

What MCP Is

The Model Context Protocol (MCP) is a standard interface through which a Large Language Model calls real APIs as part of its work. An MCP server hands the model a set of tools, and each Files.com tool is an authenticated operation in your site. With the server connected, the model can:

  • Transfer files between cloud and on-premises systems
  • Query folders and file metadata
  • Create and manage users
  • Automate workflows such as archiving or sharing

Common Use Cases

Assistants for operations teams. An internal chatbot fetches or archives files on request.

Automated workflows. An agent reacts to an incoming support request, then retrieves or uploads the files the case needs.

Developer copilots. A development-focused LLM creates users, provisions folders, or reads files while debugging.

Local vs. Hosted MCP

Use the local Python package with clients that launch STDIO servers, including Claude Desktop.

For clients that connect to MCP over a network, use the Files.com hosted MCP service. Files.com operates the server, so you do not need to install the Python package. Running the Python package as an HTTP or SSE service is unsupported, including during development.

Install uv, register uvx --python ">=3.11" files-com-mcp as an MCP server in your LLM client, and give it a Files.com API key in the FILES_COM_API_KEY environment variable.

text
https://pypi.org/project/files-com-mcp/

Installation

The files-com-mcp Python package lets your MCP client call the Files.com API through a process running on your machine. It supports local use over STDIO (standard input and output) only. For clients that connect to MCP over a network, use the Files.com hosted MCP service.

Requirements

Your MCP client must be able to start a local STDIO server. Your machine needs outbound access to the Files.com API.

The examples run the server with uvx, which is part of uv. It runs a Python tool in an isolated environment of its own, so there is nothing to install or configure by hand beyond uv itself. Install uv first. You can also run the server in Docker.

Version 2 of the package needs Python 3.11 or newer; version 1 releases also support Python 3.10. The examples pass --python ">=3.11" so that uvx runs the server with Python 3.11 or newer. Without it, uvx uses whichever Python uv selects by default, which can be older.

Registering The Server

Set your client's local STDIO server command to uvx with --python, >=3.11 and files-com-mcp as its arguments, in that order. uvx downloads the package on first use and starts it each time your client launches the server.

The Claude Desktop configuration shows these settings in JSON. For other clients, follow their instructions for adding a local STDIO server.

Authentication

The server authenticates to Files.com with an API key, read from the FILES_COM_API_KEY environment variable that your client passes to it. Use a dedicated key with the permissions the agent needs. A user key follows its account's permissions, narrowed by the key's permission scope, Workspace, and any path restriction on file operations. API Keys explains how to choose that scope and manage the credential's lifecycle.

Restricting Local File Transfers

Optionally set FILES_COM_LOCAL_ROOT in your client's server environment to an existing absolute directory path, such as /home/user/Documents. This limits the local paths the upload and download tools accept for your client's requests to that directory and its subdirectories. When the variable is omitted or empty, transfers can use any local path accessible to the server.

The server resolves .. and symbolic links when checking each path and rejects paths that resolve outside the configured directory. Relative transfer paths are resolved from the server's working directory. A download can create a new file there if its parent directory exists. A nonempty value must name an existing absolute directory; otherwise, the server will not start.

This setting does not separate operating-system accounts; operating-system permissions do that. Give only the account running the server write access to the configured directory and its subdirectories. Another account with write access there can redirect transfers outside the directory by placing or changing symbolic links, even after a path has been checked.

This setting applies to local transfer paths. Files.com paths continue to follow the API key's permissions.

shell
uvx --python ">=3.11" files-com-mcp
shell
FILES_COM_API_KEY=your-api-key uvx --python ">=3.11" files-com-mcp
shell
FILES_COM_API_KEY=your-api-key FILES_COM_LOCAL_ROOT=/home/user/Documents uvx --python ">=3.11" files-com-mcp

Using With Claude

Claude Desktop uses the Files.com Python MCP package to call the Files.com API from your machine. This setup supports local use over STDIO (standard input and output) only. For a network connection to MCP, use the Files.com hosted MCP service.

Claude Desktop reads its MCP servers from claude_desktop_config.json. Add the entry on the right under mcpServers, replace the FILES_COM_API_KEY value with a Files.com API key, and restart Claude Desktop. The MCP quickstart shows where the file lives on each operating system, walking through the same steps for another server.

The entry starts the server with uvx, so uv has to be installed first; see Installation. Its --python and >=3.11 arguments have uvx run the server with Python 3.11 or newer, which version 2 of the package needs.

Once Claude has restarted, the Files.com tools appear in its tool list. Tools lists them by category and explains why it pays to enable only the ones a task needs.

To restrict local uploads and downloads, optionally add "FILES_COM_LOCAL_ROOT": "/home/user/Documents" alongside FILES_COM_API_KEY in the env object, using an existing absolute directory on your machine. Restart Claude Desktop after changing it. See Restricting Local File Transfers for details.

json
{  "mcpServers": {    "Files.com": {      "type": "stdio",      "command": "uvx",      "args": [        "--python",        ">=3.11",        "files-com-mcp"      ],      "env": {        "FILES_COM_API_KEY": "your-api-key"      }    }  }}

Running In Docker

The files-mcp repository includes a Dockerfile that packages the MCP server with Python 3.11 and every dependency it needs, so the machine running your MCP client needs Docker but not Python or uv.

The container is still a local STDIO server. Your MCP client starts it with docker run and sends and receives protocol messages over standard input and output. The container stops when the client closes standard input. It does not listen on a port or start an HTTP server. For clients that connect to MCP over a network, use the Files.com hosted MCP service.

Building The Image

Build the image once, and again when you want a newer release. By default, Docker builds the image for the builder's native architecture. Add #v and a release number to the repository address to build a specific release.

The image contains the package from the repository you build and the latest release of the files-com Python SDK that it depends on. To install a specific SDK release instead, add --build-arg FILES_COM_SDK_VERSION= and the version number.

Registering The Server

Set your client's local STDIO server command to docker with the arguments in the example, and put your API key in the server's environment as FILES_COM_API_KEY. Replace 501:20 with your own user and group IDs from id -u and id -g, and replace /Users/you with your home folder.

  • -i keeps the container's standard input open for the protocol. Do not add -t. A terminal combines the output streams and breaks the protocol.
  • --rm removes the container when the session ends. --init runs a small init process as the container's first process, which forwards stop signals to the server and reaps child processes.
  • --user runs the server with your user and group IDs, so it can write to the downloads folder you create and the files it downloads belong to you.
  • -e FILES_COM_API_KEY, without a value, copies the key from the environment your client passes, so the key does not appear in the command line.

The server writes its logs to standard error.

Uploads And Downloads

Mount host folders to make their files available inside the container. The image sets FILES_COM_LOCAL_ROOT=/work to restrict local uploads and downloads to /work. Create both host folders before starting the server, and make the downloads folder writable by the container's user. Mount the folder containing upload files at /work/uploads with read-only access and the downloads folder at /work/downloads with write access. Use their absolute host paths in the client configuration.

Docker may create missing host folders with permissions that prevent downloads. Create the folders with mkdir -p first, as shown in the example, and make sure the container's user can write to the downloads folder.

Transfer tools take paths inside the container, not paths on your machine. When you ask the model to transfer a file, give a container path under /work/uploads or /work/downloads, such as /work/downloads/report.pdf. The absolute host paths belong only in the -v mount arguments.

shell
docker build -t files-com-mcp https://github.com/Files-com/files-mcp.git
shell
mkdir -p "$HOME/Files.com/uploads" "$HOME/Files.com/downloads"
json
{  "mcpServers": {    "Files.com": {      "type": "stdio",      "command": "docker",      "args": [        "run", "-i", "--rm", "--init",        "--user", "501:20",        "-e", "FILES_COM_API_KEY",        "-v", "/Users/you/Files.com/uploads:/work/uploads:ro",        "-v", "/Users/you/Files.com/downloads:/work/downloads",        "files-com-mcp"      ],      "env": {        "FILES_COM_API_KEY": "your-api-key"      }    }  }}
shell
FILES_COM_API_KEY=your-api-key docker run -i --rm --init \  --user "$(id -u):$(id -g)" \  -e FILES_COM_API_KEY \  -v "$HOME/Files.com/uploads:/work/uploads:ro" \  -v "$HOME/Files.com/downloads:/work/downloads" \  files-com-mcp

Tools

The Files.com MCP server exposes the tools below, grouped by category: files, folders, sharing, users, logs, automations and the other Files.com resources. Each tool is one operation in your site, run with the permissions of the API key the server holds.

Keep The Toolset Focused

A model picks the right tool more reliably from a short list. If the LLM uses Files.com tools inconsistently, it is most likely choosing among too many. Most clients let you enable and disable an MCP server's tools one by one; enable only the ones the agent's task needs.

Automations

ToolDescription
Find_AutomationShow Automation
List_AutomationList Automations

File System

ToolDescription
Begin_Delete_FileDelete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion.
Copy_FileCopy File/Folder
Create_FolderCreate Folder
Delete_FileDelete File/Folder
Find_FileFind File/Folder by Path
Gpg_Decrypt_FileDecrypt a GPG-encrypted file and save it to a destination path.
Gpg_Encrypt_FileEncrypt a file with GPG and save it to a destination path.
List_For_FolderList Folders by Path
Move_FileMove File/Folder
Transform_FileTransform a file and save the output to a destination path.
Unzip_FileExtract a ZIP file to a destination folder.
Zip_FileCreate a ZIP from one or more paths and save it to a destination path.
Zip_List_Contents_FileList the contents of a ZIP file.

Integrations

ToolDescription
Find_Remote_ServerShow Remote Server
List_Remote_ServerList Remote Servers

Logging

ToolDescription
List_Action_LogList Action Logs
List_Api_Request_LogList API Request Logs
List_Automation_LogList Automation Logs
List_Email_LogList Email Logs
List_Exavault_Api_Request_LogList Exavault API Request Logs
List_External_EventList External Events
List_File_Migration_LogList File Migration Logs
List_For_File_HistoryList history for specific file.
List_For_Folder_HistoryList history for specific folder.
List_For_User_HistoryList history for specific user.
List_Ftp_Action_LogList FTP Action Logs
List_HistoryList site full action history.
List_Inbound_S3_LogList Inbound S3 Logs
List_Logins_HistoryList site login history.
List_Outbound_Connection_LogList Outbound Connection Logs
List_Public_Hosting_Request_LogList Public Hosting Request Logs
List_Scim_LogList Scim Logs
List_Settings_ChangeList Settings Changes
List_Sftp_Action_LogList SFTP Action Logs
List_Sync_LogList Sync Logs
List_Web_Dav_Action_LogList WebDAV Action Logs

Sharing / Share Links

ToolDescription
Create_BundleCreate Share Link
Create_Bundle_NotificationCreate Share Link Notification
Create_Bundle_RecipientCreate Share Link Recipient
Delete_BundleDelete Share Link
Delete_Bundle_NotificationDelete Share Link Notification
Find_BundleShow Share Link
Find_Bundle_NotificationShow Share Link Notification
List_BundleList Share Links
List_Bundle_DownloadList Share Link Downloads
List_Bundle_NotificationList Share Link Notifications
List_Bundle_RecipientList Share Link Recipients
List_Bundle_RegistrationList Share Link Registrations
Update_BundleUpdate Share Link
Update_Bundle_NotificationUpdate Share Link Notification

User Accounts

ToolDescription
Create_GroupCreate Group
Create_PermissionCreate Permission
Create_UserCreate User
Delete_GroupDelete Group
Delete_PermissionDelete Permission
Delete_UserDelete User
Find_GroupShow Group
Find_UserShow User
List_GroupList Groups
List_PermissionList Permissions
List_UserList Users
Update_GroupUpdate Group
Update_UserUpdate User

Authentication

The Files.com MCP uses API key authentication.

Authenticate with an API Key

Authenticating with an API key is the recommended authentication method for most scenarios, and is the method used in the examples on this site.

To use an API Key, first generate an API key from the web interface or via the API or an SDK.

A user key follows its account's permissions, narrowed by the key's permission scope, Workspace, and any path restriction on file operations. It can perform administrative operations only when both the account and key permit them. API Keys explains credential scope and lifecycle; Workspaces explains request context and delegated administration.

Don't forget to replace the placeholder, YOUR_API_KEY, with your actual API key.

Sort and Filter

Several of the Files.com API resources have list operations that return multiple instances of the resource. The List operations can be sorted and filtered.

Sorting

To sort the returned data, pass in the sort_by method argument.

Each resource supports a unique set of valid sort fields and can only be sorted by one field at a time.

Special note about the List Folder Endpoint

For historical reasons, and to maintain compatibility with a variety of other cloud-based MFT and EFSS services, Folders will always be listed before Files when listing a Folder. This applies regardless of the sorting parameters you provide. These will be used, after the initial sort application of Folders before Files.

Filtering

Filters apply selection criteria to the underlying query that returns the results. They can be applied individually or combined with other filters, and the resulting data can be sorted by a single field.

Each resource supports a unique set of valid filter fields, filter combinations, and combinations of filters and sort fields.

Filter Types
FilterTypeDescription
filterExactFind resources that have an exact field value match to a passed in value. (i.e., FIELD_VALUE = PASS_IN_VALUE).
filter_prefixPatternFind resources where the specified field is prefixed by the supplied value. This is applicable to values that are strings.
filter_gtRangeFind resources that have a field value that is greater than the passed in value. (i.e., FIELD_VALUE > PASS_IN_VALUE).
filter_gteqRangeFind resources that have a field value that is greater than or equal to the passed in value. (i.e., FIELD_VALUE >= PASS_IN_VALUE).
filter_ltRangeFind resources that have a field value that is less than the passed in value. (i.e., FIELD_VALUE < PASS_IN_VALUE).
filter_lteqRangeFind resources that have a field value that is less than or equal to the passed in value. (i.e., FIELD_VALUE <= PASS_IN_VALUE).

Paths

Files.com preserves the spelling of file and folder paths while comparing them using shared case and Unicode rules. Use the SDK comparison helpers when matching paths locally.

Capitalization

Files.com uses case-insensitive path matching based on its fixed Unicode comparison map.

For example, the following paths have the same comparison key:

Path VariantComparison Key
Documents/Reports/Q1.pdfdocuments/reports/q1.pdf
documents/reports/q1.PDFdocuments/reports/q1.pdf
DOCUMENTS/REPORTS/Q1.PDFdocuments/reports/q1.pdf

This behavior applies across:

  • API requests
  • Folder and file lookup operations
  • Automations and workflows

See also: Case Sensitivity Documentation

Slashes

Use / between folder and file names, without leading or trailing slashes. SDK normalization helpers convert backslashes to /, remove duplicate separators, and discard exact . and .. components. Discarding .. leaves the preceding folder name intact.

InputNormalized path
folder/subfolder/file.txtfolder/subfolder/file.txt
/folder/subfolder/file.txtfolder/subfolder/file.txt
folder/subfolder/file.txt/folder/subfolder/file.txt
//folder//file.txtfolder/file.txt
folder/../file.txtfolder/file.txt

Unicode and Path Comparison

Files.com compares paths using a fixed mapping shared by the server and SDKs. It treats case and many accent differences as equivalent: Résumé.txt and resume.txt identify the same file, as do q followed by a combining acute accent and q. The mapping also handles other equivalences, such as Hiragana and Katakana. Lowercasing or applying a standard Unicode normalization form alone does not reproduce these rules.

SDK comparison helpers normalize path separators and dot segments, then apply the bundled versioned comparison map. The shared examples give exact comparison results for integrations that implement their own matching. The map uses hexadecimal Unicode scalar values as keys: a missing entry preserves the character, an empty replacement removes it, and other replacements may contain several characters. Apply each replacement once without normalizing or lowercasing the result again.

Use comparison results only for matching. Send the original path spelling in API requests and preserve it for display and local filenames; comparison results can have a different spelling or length.

Trailing whitespace is significant for comparison. report.txt and report.txt are different file paths, and SDK helpers preserve spaces, tabs, and newlines. Folder names cannot end in whitespace. See Unicode Normalization for the complete path rules.

Workspaces

A Workspace groups files, users, groups, Partners, integrations, and workflows within a Files.com Site. An integration can provision a Workspace for a department or project and delegate its operation to a team without making that team Site Administrators. Every Site has a Default Workspace, with ID 0; additional Workspaces have their own IDs and root folders.

Account membership, request context, and permission grants serve different purposes. Creating an account in a Workspace determines where it belongs. Selecting a Workspace determines which resources a request operates on. A permission grant determines what the caller can do there. Selecting a Workspace never grants access to it.

Accounts and Administrative Access

A user's or group's workspace_id identifies the Workspace the account belongs to. Accounts belonging to a Custom Workspace stay within it. Default Workspace users and groups can receive permissions in one or more Custom Workspaces while keeping their existing accounts in Workspace 0.

AccountWorkspace Administrator assignmentScope
User belonging to a Custom WorkspaceSet the user's workspace_admin to true.That user's own Custom Workspace.
Default Workspace userCreate an admin Permission for the user on a Custom Workspace's root folder.Each Custom Workspace with a root grant.
Default Workspace groupCreate an admin Permission for the group on a Custom Workspace's root folder.Every member inherits administration of each Workspace with a root grant.

workspace_admin is not a summary of a user's effective administrative access. A Default Workspace user can administer a Custom Workspace through a direct or group root grant while their workspace_admin remains false. Groups have no workspace_admin field. See Users and Groups for account fields.

An admin grant on the Custom Workspace root provides full Workspace Administrator authority over its files, users, groups, Partners, workflows, and integrations. An admin grant on a subfolder provides Folder Admin authority over that folder and its descendants; it does not provide Workspace administration. Other permission levels provide their corresponding folder access without Workspace administration. Permissions defines the levels.

Site Administrators manage cross-Workspace assignments to Default Workspace accounts. Workspace Administrators manage accounts and permissions within their own scope. Site Administrators retain access to every Workspace; adding a Workspace grant does not narrow Site Administrator authority. The product documentation explains the administrator's operational scope and site-wide controls.

Request Context and API Keys

You can include the X-Files-Workspace-Id REST header to select a Workspace for a request. SDK request options and CLI configuration send that same selection. When a Workspace is selected, Workspace-scoped resources are listed, created, and changed within that context, and ordinary paths are relative to its root.

A resource's workspace_id request field describes the resource's Workspace membership. It is separate from the SDK's Workspace request option or REST header. Creating a Workspace-scoped resource in a Custom Workspace defaults its workspace_id to the selected Workspace; a mismatching membership value is rejected with not-authorized/insufficient-permission-for-params.

Selecting another Workspace with an API key requires a Full Access key created in the Default Workspace. A user key follows that user's current access, including group permissions. A site-wide Full Access key created in the Default Workspace has Site Administrator authority in every Workspace. A Files Only key stays in its creation Workspace, even if its user has cross-Workspace access. Any key created in a Custom Workspace stays within that Workspace. Selecting another context with these confined keys is rejected with bad-request/invalid-workspace-id-header.

An account belonging to a Custom Workspace is scoped there when it authenticates normally. For a Default Workspace user, explicitly select the intended Workspace for an integration rather than relying on an interactive login preference. API Keys and Authentication cover credentials.

The adjacent request uses the member's own Default Workspace Full Access user key to list the root of Workspace 123, after access has been assigned.

shell
curl 'https://YOUR_SUBDOMAIN.files.com/api/rest/v1/folders/' \  -H 'X-FilesAPI-Key: YOUR_MEMBER_API_KEY' \  -H 'X-Files-Workspace-Id: 123'

Delegating a Workspace to an Existing Group

An operations team already represented by a Default Workspace group can administer a Custom Workspace through one root Permission. The group and its members stay in the Default Workspace, so the same team can receive different access in other Workspaces.

First retrieve the target Workspace and Group IDs as a Site Administrator in Workspace 0. The examples use Workspace 123, group 456, and member user 789; replace them with your own IDs. Confirm that the group belongs to Workspace 0 and that the intended user is a member.

Create the Permission using a Default Workspace Full Access site-wide key or a Full Access user key belonging to a Site Administrator. Keep the request context at 0 and use the qualified root path _/Workspaces/123. Set group_id to the group's ID, permission to admin, and recursive to true. Save the returned Permission id for later removal. For an individual Default Workspace user, use user_id instead of group_id.

For a Default Workspace group, a Site Administrator can also select Workspace 123 and use an empty path to grant access to its root. The qualified path in Workspace 0 works for both Default Workspace users and groups and keeps the account scope and target Workspace explicit. Appending a subfolder to the path would grant Folder Admin access instead of Workspace Administrator authority.

After the grant, make a request as the member, using their own credential with Workspace 123 selected, such as listing that Workspace's root folder. That member can work with the Workspace's files and perform Workspace Administrator operations, such as managing its users, Partners, and integrations. A Site Administrator's successful request does not establish that the member has the intended access.

shell
curl 'https://YOUR_SUBDOMAIN.files.com/api/rest/v1/workspaces' \  -H 'X-FilesAPI-Key: YOUR_SITE_ADMIN_API_KEY' \  -H 'X-Files-Workspace-Id: 0'curl 'https://YOUR_SUBDOMAIN.files.com/api/rest/v1/groups' \  -H 'X-FilesAPI-Key: YOUR_SITE_ADMIN_API_KEY' \  -H 'X-Files-Workspace-Id: 0'
shell
curl 'https://YOUR_SUBDOMAIN.files.com/api/rest/v1/permissions' \  -X POST \  -H 'X-FilesAPI-Key: YOUR_SITE_ADMIN_API_KEY' \  -H 'X-Files-Workspace-Id: 0' \  -H 'Content-Type: application/json' \  -d '{"path":"_/Workspaces/123","group_id":456,"permission":"admin","recursive":true}'

Permission Inspection and Removal

List the member's Permissions with user_id and include_groups=true to include grants inherited through group membership. Listing only direct user grants can miss the Permission that provides Workspace administration. In Workspace 0, the Custom Workspace root appears as _/Workspaces/123; in Workspace 123, paths are relative to that root. Inspect the root path and permission=admin, rather than treating the user's workspace_admin field as their effective administrative access.

Permission lists show individual grants, rather than a single flag for effective administrative access. Membership in several groups combines their access. A Permission using group_ids instead of group_id requires membership in all the specified groups; it is not a shorthand for assigning the same grant to several independent groups.

Removing a member ends access received through that group. Deleting the root Permission ends the group's Workspace Administrator grant for every member. These changes leave independent direct and other group grants in place, so review all applicable grants when withdrawing access. Default Workspace user API keys follow those permission changes without being recreated.

Group membership maintained through SCIM follows the same rule. A Group Admin allowed to add members can give those users the group's existing Workspace Administrator access. Choose who manages the group with that authority in mind.

Delete the Permission by its returned id as the Site Administrator in Workspace 0. The removal examples use Permission ID 9001; replace it with the ID returned by your create request. Permissions are created and deleted, rather than updated in place. If narrower folder access is still needed, assign it explicitly; deleting a broad grant does not restore narrower grants it previously replaced.

shell
curl 'https://YOUR_SUBDOMAIN.files.com/api/rest/v1/permissions?user_id=789&include_groups=true' \  -H 'X-FilesAPI-Key: YOUR_SITE_ADMIN_API_KEY' \  -H 'X-Files-Workspace-Id: 0'curl 'https://YOUR_SUBDOMAIN.files.com/api/rest/v1/permissions/9001' \  -X DELETE \  -H 'X-FilesAPI-Key: YOUR_SITE_ADMIN_API_KEY' \  -H 'X-Files-Workspace-Id: 0'

Foreign Language Support

The Files.com MCP will soon be updated to support localized responses by using a configuration method. When available, it can be used to guide the API in selecting a preferred language for applicable response content.

Language support currently applies to select human-facing fields only, such as notification messages and error descriptions.

If the specified language is not supported or the value is omitted, the API defaults to English.

Errors

Mock Server

Files.com publishes a mock Files.com API server, which is useful for testing your use of the Files.com SDKs and other direct integrations against the Files.com API in an integration test environment. It never checks credentials: send any placeholder API key, such as YOUR_API_KEY, and never use real Files.com credentials with it.

The server has two modes, chosen when it starts:

  • Legacy mode (the default) checks required parameters and parameter types, then returns a fixed example response for each API endpoint. It does not maintain state and it does not deeply inspect your submissions for correctness, which makes it useful for testing basic network operations and JSON encoding for your SDK or API client.
  • Simulation mode keeps records, files and folders in memory, so a test can create, list, update and delete resources, upload a file and download the same bytes, and make chosen requests fail, stall or lose their connection on purpose. Requests it does not simulate fail with a clear error instead of returning an example response.

Quick Start with Docker

With Docker installed, start the published image from Docker Hub with the command shown. It runs legacy mode at http://127.0.0.1:4041, reachable from your machine only: point your integration's Files.com API base URL there and use a placeholder API key. Stop it with Ctrl+C; --rm removes its container.

The published image is built for linux/amd64 only, so the command asks for that platform; without it, Docker on a machine of another architecture, such as an Apple silicon Mac, looks for an image the tag does not have. The latest tag moves to whichever server was published last, and --pull=always fetches it again each time, so it need not include simulation mode. To run simulation mode, build the image from the source as below.

shell
docker run --platform linux/amd64 --rm --pull=always -p 127.0.0.1:4041:4041 filescom/files-mock-server:latest
## In another terminal, with a placeholder API key:curl -H "X-FilesAPI-Key: YOUR_API_KEY" http://127.0.0.1:4041/api/rest/v1/users

Simulation Mode in Docker

To run exactly the server the source's README describes, simulation mode included, build the image from a checkout of the source on GitHub and run it by the image ID you record with your test results. Only linux/amd64 builds of the source have been checked, so both commands ask for that platform.

Simulation mode listens only on loopback unless told otherwise, so the command binds it to the container's interfaces with -b tcp://0.0.0.0:4041 and publishes the port on your machine's loopback address only. FILES_MOCK_TRANSFER_ORIGIN tells it the address your tests use, so the upload and download URLs it returns point at the published port.

Simulation mode keeps its state only in the server process. Its control endpoints under /__files_mock/v1 report when the server is ready, reset it with your fixtures, add fault rules and return the journal of the requests it received. It refuses work over its limits instead of truncating it. The README in the source describes all of these, the operations it simulates and how to configure its limits.

shell
## In a checkout of the source:docker build --platform linux/amd64 -t files-mock-server:local .image=$(docker image inspect --format '{{.Id}}' files-mock-server:local)echo "$image"   # record this ID with your test resultsdocker run --platform linux/amd64 --rm -e FILES_MOCK_MODE=simulation \  -e FILES_MOCK_TRANSFER_ORIGIN=http://127.0.0.1:40410 \  -p 127.0.0.1:40410:4041 "$image" -b tcp://0.0.0.0:4041
## In another terminal:curl http://127.0.0.1:40410/__files_mock/v1/ready

From the Source with Ruby

Start the server from its source with Ruby and Bundler. FILES_MOCK_MODE is read once at startup: leaving it unset or setting it to legacy starts legacy mode, simulation starts simulation mode, and any other value stops startup with an error. Legacy mode listens on port 4041 on all IPv4 interfaces, and simulation mode on 127.0.0.1:4041.

shell
bundle install
## Legacy modebundle exec puma
## Simulation modeFILES_MOCK_MODE=simulation bundle exec puma

Compatibility

Version 2 of files-com-mcp needs Python 3.11 or newer, up from the previous Python 3.10 minimum, and version 2 of the Files.com Python SDK (files-com>=2.0.0,<3), which it installs itself. To use version 2, make sure your client starts the server with Python 3.11 or newer, for example with uvx --python ">=3.11" files-com-mcp.

Changes in version 2:

  • A tool call that fails, such as for a missing required input, an API key the site rejects, a permission or not-found error, a local path outside FILES_COM_LOCAL_ROOT or a failed transfer, now returns an MCP tool result with isError set. The message text is unchanged.
  • List tools that return one page of results at a time take the cursor their response gives for the next page, and a per_page page size.
  • Tool calls run concurrently. Cancelling a call, or closing the connection, stops its request or transfer before the call ends: the client receives the cancellation only after the call has stopped, and an interrupted download does not leave a partial file.
  • The server no longer prints a banner or checks PyPI for FastMCP updates when it starts. files-com-mcp --version prints its version.
  • The package installs FastMCP 3.4.7 as fastmcp-slim with the requirements of its server extra, but with the memory and file-tree key-value stores only, not the keyring store (and the keyring package it brings). The server uses neither keyring nor that store. Python code that embeds this package and configures FastMCP's KeyringStore must now install py-key-value-aio[keyring] itself.
  • It requires exactly the FastMCP (3.4.7) and mcp (1.30.0) releases whose internals it adapts, and refuses to start with others. It adapts them by replacing methods on their classes when create_mcp() first builds a server (the STDIO server calls it), so from then on the changed cancellation and end-of-input handling apply to every FastMCP server in the process, including those of other applications hosted beside this package.

Development

Run the Python MCP package locally over STDIO when developing or modifying tools. Upload and Download tools rely on the file system where the MCP is running. For network connections, use the Files.com hosted MCP service.

pyproject.toml lists FastMCP's server requirements itself, so upgrading FastMCP means reconciling that list with the new release's metadata: ./test.sh fails until the list matches fastmcp-slim's server extra, apart from the deviations it explains, and the adapters in files_com_mcp/patches must be checked against the new FastMCP and mcp internals before files_com_mcp/framework.py accepts them.

The server depends on the Files.com Python SDK generated with it. ./test.sh checks formatting, lint and types and runs the tests without changing any file; set FILES_COM_SDK to that SDK's wheel, or generate the python target next to this one and it is built for you. PYTHON chooses the interpreter (3.11 or newer). scripts/tasks.py also builds and tests the wheel and sdist (package) and resolves the hash-pinned requirements in requirements/ (lock).

To test LLM tools we recommend a popular command-line program called inspector. This will start a WebUI on a local port, the output of the command will give you the link to the inspector GUI. Ex: http://127.0.0.1:6274

Development - STDIO

FILES_COM_API_KEY="dummyKey" npx @modelcontextprotocol/inspector uv run -m files_com_mcp

uv run resolves the package's dependencies, and cannot find the unreleased SDK version that a development build requires; run it in an environment that already has that SDK installed, or use an environment built by scripts/tasks.py.

Development Claude Config

{  "mcpServers": {    "Files.com": {      "type": "stdio",      "command": "uv",      "args": [        "--directory",        "/path/to/folder-containing-files_com_mcp",        "run",        "-m",        "files_com_mcp"      ],      "env": {        "FILES_COM_API_KEY": "CHangeME"      }    }  }}

Development - Shared Mock Server

tests/shared_user_find.py checks the generated Find_User tool end to end against the mock server's shared users-find scenario. It starts this package as a child MCP STDIO server pointed at the mock server, and compares the user the tool returns with the scenario's expected_user.

In the generator repository, generate this target, python and mock-server, install the mock server's gems (see its README), and run pip3 install ../python . in generated/python-mcp to install the SDK generated beside this package with it. Then run from that directory:

ruby ../mock-server/with-scenario.rb --scenario users-find --out "$(mktemp -d)" -- python3 -m unittest -v tests.shared_user_find

The launcher passes the mock server's address, a placeholder API key and the scenario file. The test gives the address and key to the server it starts as FILES_COM_BASE_URL and FILES_COM_API_KEY. unittest discover does not run it, and it fails when run without the launcher.

MCP Registry Metadata

mcp-name: com.files/python-mcp

來源:README.md,提交 e1c27c6

工具

67

Download_File_to_Local

Download File to Local

Download a file from my Files.com site.

輸入參數local_path必填remote_path必填

Upload_File_from_Local

Upload File from Local

Upload a file to my Files.com site.

輸入參數local_path必填remote_path必填

List_Bundle

List Bundle

List Share Links

輸入參數cursorfieldsper_page

Find_Bundle

Find Bundle

Show Share Link

輸入參數id

Create_Bundle

Create Bundle

Create Share Link

輸入參數notepathsmax_usespasswordexpires_atdescriptionpermissionsrequire_registration

Update_Bundle

Update Bundle

Update Share Link

輸入參數idexpires_atpermissions

Delete_Bundle

Delete Bundle

Delete Share Link

輸入參數id

List_Bundle_Download

List Bundle Download

List Share Link Downloads

輸入參數cursorfieldsper_pagebundle_id

List_Bundle_Notification

List Bundle Notification

List Share Link Notifications

輸入參數cursorfieldsper_page

Find_Bundle_Notification

Find Bundle Notification

Show Share Link Notification

輸入參數id

Create_Bundle_Notification

Create Bundle Notification

Create Share Link Notification

輸入參數bundle_idnotify_user_idnotify_on_uploadnotify_on_registration

Update_Bundle_Notification

Update Bundle Notification

Update Share Link Notification

輸入參數idnotify_on_uploadnotify_on_registration

Delete_Bundle_Notification

Delete Bundle Notification

Delete Share Link Notification

輸入參數id

List_Bundle_Recipient

List Bundle Recipient

List Share Link Recipients

輸入參數cursorfieldsper_pagebundle_id

Create_Bundle_Recipient

Create Bundle Recipient

Create Share Link Recipient

輸入參數namenotecompanybundle_idrecipientshare_after_create

List_Bundle_Registration

List Bundle Registration

List Share Link Registrations

輸入參數cursorfieldsper_pagebundle_id

Delete_File

Delete File

Delete File/Folder

輸入參數path

Find_File

Find File

Find File/Folder by Path

輸入參數path

Zip_List_Contents_File

Zip List Contents File

List the contents of a ZIP file.

輸入參數pathfields

Begin_Delete_File

Begin Delete File

Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion.

輸入參數path

Copy_File

Copy File

Copy File/Folder

輸入參數pathdestination

Move_File

Move File

Move File/Folder

輸入參數pathdestination

Transform_File

Transform File

Transform a file and save the output to a destination path.

輸入參數pathdestinationtarget_formattransform_type

Gpg_Decrypt_File

Gpg Decrypt File

Decrypt a GPG-encrypted file and save it to a destination path.

輸入參數pathdestination

Gpg_Encrypt_File

Gpg Encrypt File

Encrypt a file with GPG and save it to a destination path.

輸入參數pathdestination

Unzip_File

Unzip File

Extract a ZIP file to a destination folder.

輸入參數pathdestination

Zip_File

Zip File

Create a ZIP from one or more paths and save it to a destination path.

輸入參數pathsdestination

List_For_Folder

List For Folder

List Folders by Path

輸入參數pathcursorfieldsper_page

Create_Folder

Create Folder

Create Folder

輸入參數path

List_Group

List Group

List Groups

輸入參數cursorfieldsper_page

Find_Group

Find Group

Show Group

輸入參數id

Create_Group

Create Group

Create Group

輸入參數namenotesuser_idsadmin_ids

Update_Group

Update Group

Update Group

輸入參數idnamenotesuser_idsadmin_ids

Delete_Group

Delete Group

Delete Group

輸入參數id

List_User

List User

List Users

輸入參數cursorfieldsper_page

Find_User

Find User

Show User

輸入參數id

Create_User

Create User

Create User

輸入參數nameemailnotescompanypasswordusernamegroup_idsuser_homeuser_rootdav_permissionftp_permissionsftp_permission另有 4 個

Update_User

Update User

Update User

輸入參數idnameemailnotescompanypasswordusernamegroup_idsuser_homeuser_rootdav_permissionftp_permission另有 5 個

Delete_User

Delete User

Delete User

輸入參數id

List_Action_Log

List Action Log

List Action Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_Api_Request_Log

List Api Request Log

List API Request Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_Automation

List Automation

List Automations

輸入參數cursorfieldsper_page

Find_Automation

Find Automation

Show Automation

輸入參數id

List_Automation_Log

List Automation Log

List Automation Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_Email_Log

List Email Log

List Email Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteq

List_Exavault_Api_Request_Log

List Exavault Api Request Log

List Exavault API Request Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_External_Event

List External Event

List External Events

輸入參數cursorfieldsfiltersort_byper_pagefilter_gtfilter_ltfilter_gteqfilter_lteq

List_File_Migration_Log

List File Migration Log

List File Migration Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteq

List_Ftp_Action_Log

List Ftp Action Log

List FTP Action Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_For_File_History

List For File History

List history for specific file.

輸入參數pathcursorend_atfieldsdisplaysort_byper_pagestart_at

List_For_Folder_History

List For Folder History

List history for specific folder.

輸入參數pathcursorend_atfieldsdisplaysort_byper_pagestart_at

List_For_User_History

List For User History

List history for specific user.

輸入參數cursorend_atfieldsdisplaysort_byuser_idper_pagestart_at

List_Logins_History

List Logins History

List site login history.

輸入參數cursorend_atfieldsdisplaysort_byper_pagestart_at

List_History

List History

List site full action history.

輸入參數cursorend_atfieldsfilterdisplaysort_byper_pagestart_atfilter_prefix

List_Inbound_S3_Log

List Inbound S3 Log

List Inbound S3 Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_Outbound_Connection_Log

List Outbound Connection Log

List Outbound Connection Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_Permission

List Permission

List Permissions

輸入參數pathcursorfieldsuser_idgroup_idper_page

Create_Permission

Create Permission

Create Permission

輸入參數pathuser_idgroup_idpermission

Delete_Permission

Delete Permission

Delete Permission

輸入參數id

List_Public_Hosting_Request_Log

List Public Hosting Request Log

List Public Hosting Request Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_Remote_Server

List Remote Server

List Remote Servers

輸入參數cursorfieldsper_page

Find_Remote_Server

Find Remote Server

Show Remote Server

輸入參數id

List_Scim_Log

List Scim Log

List Scim Logs

輸入參數cursorfieldssort_byper_page

List_Settings_Change

List Settings Change

List Settings Changes

輸入參數cursorfieldsfiltersort_byper_page

List_Sftp_Action_Log

List Sftp Action Log

List SFTP Action Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

List_Sync_Log

List Sync Log

List Sync Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteq

List_Web_Dav_Action_Log

List Web Dav Action Log

List WebDAV Action Logs

輸入參數cursorfieldsfilterper_pagefilter_gtfilter_ltfilter_gteqfilter_lteqfilter_prefix

版本歷史

30
  1. v2.0.20Nov 7, 2026
  2. v2.0.8Nov 6, 2026
  3. v2.0.5Nov 5, 2026
  4. v2.0.3Nov 5, 2026
  5. v2.0.2Nov 5, 2026
  6. v2.0.1Nov 5, 2026
  7. v1.0.107Nov 4, 2026
  8. v1.0.106Nov 3, 2026
  9. v1.0.105Nov 1, 2026
  10. v1.0.104Oct 29, 2026
  11. v1.0.103Oct 26, 2026
  12. v1.0.102Oct 22, 2026
  13. v1.0.101Oct 14, 2026
  14. v1.0.100Oct 13, 2026
  15. v1.0.99Oct 11, 2026
  16. v1.0.97Oct 10, 2026
  17. v1.0.96Oct 7, 2026
  18. v1.0.95Oct 7, 2026
  19. v1.0.94Oct 6, 2026
  20. v1.0.93Oct 3, 2026
  21. v1.0.91Sep 30, 2026
  22. v1.0.90Sep 23, 2026
  23. v1.0.89Sep 22, 2026
  24. v1.0.88Sep 21, 2026
  25. v1.0.87Sep 20, 2026
  26. v1.0.86Sep 18, 2026
  27. v1.0.85Sep 18, 2026
  28. v1.0.84Sep 17, 2026
  29. v1.0.83Sep 16, 2026
  30. v1.0.82Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分