fangcloud-mcp 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,6 @@
2
2
  FangCloud MCP - Model Context Protocol (MCP) 服务器实现,提供与 FangCloud 云存储服务的集成
3
3
  """
4
4
 
5
- __version__ = "0.1.4"
6
-
7
5
  from .fangcloud import main
8
6
  from .fangcloud_api import FangcloudAPI
9
7
 
@@ -1,176 +1,179 @@
1
- Metadata-Version: 2.4
2
- Name: fangcloud-mcp
3
- Version: 0.1.5
4
- Summary: FangCloud MCP 是一个 Model Context Protocol (MCP) 服务器实现,提供与 FangCloud 云存储服务的集成
5
- Home-page: https://github.com/example/fangcloud
6
- Author: FangCloud Developer
7
- Author-email: FangCloud Developer <dev@example.com>
8
- Keywords: fangcloud,mcp,cloud storage,api
9
- Classifier: Development Status :: 4 - Beta
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.12
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Topic :: Software Development :: Libraries
16
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
- Requires-Python: >=3.12
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: aiohttp>=3.8.6
21
- Requires-Dist: mcp[cli]>=1.7.1
22
- Dynamic: author
23
- Dynamic: home-page
24
- Dynamic: license-file
25
- Dynamic: requires-python
26
-
27
- # FangCloud MCP
28
-
29
- FangCloud MCP 是一个 Model Context Protocol (MCP) 服务器实现,提供与 FangCloud 云存储服务的集成。通过该服务,AI 助手可以直接与 FangCloud 进行交互,实现文件和文件夹的管理操作。
30
-
31
- ## 功能特点
32
-
33
- FangCloud MCP 提供以下功能:
34
-
35
- - 文件操作
36
- - 获取文件信息
37
- - 上传文件
38
- - 下载文件
39
- - 更新文件名称和描述
40
- - 文件夹操作
41
- - 获取文件夹信息
42
- - 创建文件夹
43
- - 列出文件夹内容
44
- - 列出个人空间项目
45
- - 搜索功能
46
- - 按关键词搜索文件和文件夹
47
- - 支持多种过滤和排序选项
48
-
49
- ## 安装要求
50
-
51
- - Python 3.12 或更高版本
52
- - 依赖项:
53
- - aiohttp >= 3.11.18
54
- - mcp[cli] >= 1.7.1
55
-
56
- ## 安装方法
57
-
58
- ### 从 PyPI 安装(推荐)
59
-
60
- ```bash
61
- pip install fangcloud
62
- ```
63
-
64
- ## 使用方法
65
-
66
- ### 启动服务器
67
-
68
- 服务器需要 FangCloud API 访问令牌才能运行:
69
-
70
- ```bash
71
- python fangcloud.py --access_token <your-access-token>
72
- ```
73
-
74
- 或者使用简短参数形式:
75
-
76
- ```bash
77
- python fangcloud.py -c <your-access-token>
78
- ```
79
-
80
- ### 日志
81
-
82
- 服务器日志保存在`fangcloud-mcp.log`文件中,同时也会输出到控制台。
83
-
84
- ## API 参考
85
-
86
- ### 文件操作
87
-
88
- #### 获取文件信息
89
-
90
- ```python
91
- get_file_info(file_id: str)
92
- ```
93
-
94
- 获取指定文件 ID 的详细信息。
95
-
96
- #### 上传文件
97
-
98
- ```python
99
- upload_file(parent_folder_id: str, local_file_path: str)
100
- ```
101
-
102
- 将本地文件上传到指定的 FangCloud 文件夹。
103
-
104
- #### 下载文件
105
-
106
- ```python
107
- download_file(file_id: str, local_path: str)
108
- ```
109
-
110
- 下载指定 ID 的文件到本地路径。
111
-
112
- #### 更新文件
113
-
114
- ```python
115
- update_file(file_id: str, name: Optional[str] = None, description: Optional[str] = None)
116
- ```
117
-
118
- 更新文件的名称和/或描述。
119
-
120
- ### 文件夹操作
121
-
122
- #### 获取文件夹信息
123
-
124
- ```python
125
- get_folder_info(folder_id: str)
126
- ```
127
-
128
- 获取指定文件夹 ID 的详细信息。
129
-
130
- #### 创建文件夹
131
-
132
- ```python
133
- create_folder(name: str, parent_id: str, target_space_type: Optional[str] = None, target_space_id: Optional[str] = None)
134
- ```
135
-
136
- 在指定的父文件夹中创建新文件夹。
137
-
138
- #### 列出文件夹内容
139
-
140
- ```python
141
- list_folder_contents(folder_id: str, page_id: Optional[int] = 0, page_capacity: Optional[int] = 20, type_filter: Optional[str] = "all", sort_by: Optional[str] = "date", sort_direction: Optional[str] = "desc")
142
- ```
143
-
144
- 列出指定文件夹中的文件和子文件夹。
145
-
146
- #### 列出个人空间项目
147
-
148
- ```python
149
- list_personal_items(page_id: Optional[int] = 0, page_capacity: Optional[int] = 20, type_filter: Optional[str] = "all", sort_by: Optional[str] = "date", sort_direction: Optional[str] = "desc")
150
- ```
151
-
152
- 列出个人空间中的文件和文件夹。
153
-
154
- ### 搜索功能
155
-
156
- ```python
157
- search_items(query_words: str, search_type: Optional[str] = "all", page_id: Optional[int] = 0, search_in_folder: Optional[str] = None, query_filter: Optional[str] = "all", updated_time_range: Optional[str] = None)
158
- ```
159
-
160
- 搜索文件和文件夹,支持多种过滤选项。
161
-
162
- ## 开发
163
-
164
- ### 项目结构
165
-
166
- - `fangcloud.py` - 主入口点,包含 MCP 服务器实现和工具函数
167
- - `fangcloud_api.py` - FangCloud API 客户端实现
168
- - `pyproject.toml` - 项目配置和依赖声明
169
-
170
- ### 日志记录
171
-
172
- 项目使用 Python 的标准 logging 模块记录日志,配置为同时输出到控制台和文件。
173
-
174
- ## 许可证
175
-
176
- [添加许可证信息]
1
+ Metadata-Version: 2.1
2
+ Name: fangcloud-mcp
3
+ Version: 0.1.6
4
+ Summary: FangCloud MCP 是一个 Model Context Protocol (MCP) 服务器实现,提供与 FangCloud 云存储服务的集成
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: aiohttp>=3.8.6
7
+ Requires-Dist: mcp[cli]>=1.7.1
8
+ Description-Content-Type: text/markdown
9
+
10
+ # FangCloud MCP
11
+
12
+ FangCloud MCP 是一个 Model Context Protocol (MCP) 服务器实现,提供与 FangCloud 云存储服务的集成。通过该服务,AI 助手可以直接与 FangCloud 进行交互,实现文件和文件夹的管理操作。
13
+
14
+ ## 功能特点
15
+
16
+ FangCloud MCP 提供以下功能:
17
+
18
+ - 文件操作
19
+ - 获取文件信息
20
+ - 上传文件
21
+ - 下载文件
22
+ - 更新文件名称和描述
23
+ - 文件夹操作
24
+ - 获取文件夹信息
25
+ - 创建文件夹
26
+ - 列出文件夹内容
27
+ - 列出个人空间项目
28
+ - 搜索功能
29
+ - 按关键词搜索文件和文件夹
30
+ - 支持多种过滤和排序选项
31
+
32
+ ## 安装要求
33
+
34
+ - Python 3.12 或更高版本
35
+ - 依赖项:
36
+ - aiohttp >= 3.8.6
37
+ - mcp[cli] >= 1.7.1
38
+
39
+ ## 安装方法
40
+
41
+ ### 从 PyPI 安装(推荐)
42
+
43
+ ```bash
44
+ pip install fangcloud-mcp
45
+ ```
46
+
47
+ ## 使用方法
48
+
49
+ ### 启动服务器
50
+
51
+ 服务器需要 FangCloud API 访问令牌才能运行:
52
+
53
+ ```bash
54
+ fangcloud --access_token <your-access-token>
55
+ ```
56
+
57
+ 或者使用简短参数形式:
58
+
59
+ ```bash
60
+ fangcloud -c <your-access-token>
61
+ ```
62
+
63
+ ### 日志
64
+
65
+ 服务器日志保存在`fangcloud-mcp.log`文件中,同时也会输出到控制台。
66
+
67
+ ## API 参考
68
+
69
+ ### 文件操作
70
+
71
+ #### 获取文件信息
72
+
73
+ ```python
74
+ get_file_info(file_id: str)
75
+ ```
76
+
77
+ 获取指定文件 ID 的详细信息。
78
+
79
+ #### 上传文件
80
+
81
+ ```python
82
+ upload_file(parent_folder_id: str, local_file_path: str)
83
+ ```
84
+
85
+ 将本地文件上传到指定的 FangCloud 文件夹。
86
+
87
+ #### 下载文件
88
+
89
+ ```python
90
+ download_file(file_id: str, local_path: str)
91
+ ```
92
+
93
+ 下载指定 ID 的文件到本地路径。
94
+
95
+ #### 更新文件
96
+
97
+ ```python
98
+ update_file(file_id: str, name: Optional[str] = None, description: Optional[str] = None)
99
+ ```
100
+
101
+ 更新文件的名称和/或描述。
102
+
103
+ ### 文件夹操作
104
+
105
+ #### 获取文件夹信息
106
+
107
+ ```python
108
+ get_folder_info(folder_id: str)
109
+ ```
110
+
111
+ 获取指定文件夹 ID 的详细信息。
112
+
113
+ #### 创建文件夹
114
+
115
+ ```python
116
+ create_folder(name: str, parent_id: str, target_space_type: Optional[str] = None, target_space_id: Optional[str] = None)
117
+ ```
118
+
119
+ 在指定的父文件夹中创建新文件夹。
120
+
121
+ #### 列出文件夹内容
122
+
123
+ ```python
124
+ list_folder_contents(folder_id: str, page_id: Optional[int] = 0, page_capacity: Optional[int] = 20, type_filter: Optional[str] = "all", sort_by: Optional[str] = "date", sort_direction: Optional[str] = "desc")
125
+ ```
126
+
127
+ 列出指定文件夹中的文件和子文件夹。
128
+
129
+ #### 列出个人空间项目
130
+
131
+ ```python
132
+ list_personal_items(page_id: Optional[int] = 0, page_capacity: Optional[int] = 20, type_filter: Optional[str] = "all", sort_by: Optional[str] = "date", sort_direction: Optional[str] = "desc")
133
+ ```
134
+
135
+ 列出个人空间中的文件和文件夹。
136
+
137
+ ### 搜索功能
138
+
139
+ ```python
140
+ search_items(query_words: str, search_type: Optional[str] = "all", page_id: Optional[int] = 0, search_in_folder: Optional[str] = None, query_filter: Optional[str] = "all", updated_time_range: Optional[str] = None)
141
+ ```
142
+
143
+ 搜索文件和文件夹,支持多种过滤选项。
144
+
145
+ ## 开发
146
+
147
+ ### 项目结构
148
+
149
+ - `fangcloud.py` - 主入口点,包含 MCP 服务器实现和工具函数
150
+ - `fangcloud_api.py` - FangCloud API 客户端实现
151
+ - `pyproject.toml` - 项目配置和依赖声明
152
+
153
+ ### 日志记录
154
+
155
+ 项目使用 Python 的标准 logging 模块记录日志,配置为同时输出到控制台和文件。
156
+
157
+ ## 许可证
158
+
159
+ MIT License
160
+
161
+ Copyright (c) 2025 FangCloud Developer
162
+
163
+ Permission is hereby granted, free of charge, to any person obtaining a copy
164
+ of this software and associated documentation files (the "Software"), to deal
165
+ in the Software without restriction, including without limitation the rights
166
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
167
+ copies of the Software, and to permit persons to whom the Software is
168
+ furnished to do so, subject to the following conditions:
169
+
170
+ The above copyright notice and this permission notice shall be included in all
171
+ copies or substantial portions of the Software.
172
+
173
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
174
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
175
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
176
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
177
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
178
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
179
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ fangcloud_mcp/__init__.py,sha256=sNSVoR1IBLBiMvnIY9KQZlURRfheArJL6U8YNJ51h0k,229
2
+ fangcloud_mcp/fangcloud.py,sha256=g5Q6por1kA5_KmYINmtusEEQhyWuGEBtHJRGpSD5Mb4,14661
3
+ fangcloud_mcp/fangcloud_api.py,sha256=QQWB8neT-XKfc854yhhZ9WihyN-aI5D_MbV_RRjf-VM,26579
4
+ fangcloud_mcp-0.1.6.dist-info/METADATA,sha256=jamRK7uSuy2iedJtDUtX60BiaSeoFcwe-u50Fy2ZfCQ,4700
5
+ fangcloud_mcp-0.1.6.dist-info/WHEEL,sha256=sb4ZHsmozXdkdXRvpMHZmhxsxQvL8DERDUEGA9tAfc8,83
6
+ fangcloud_mcp-0.1.6.dist-info/entry_points.txt,sha256=Rx2NYFMpIfV0Yc81Bpn_N-INU1LOxo59neT1Cicltwk,53
7
+ fangcloud_mcp-0.1.6.dist-info/license_files/LICENSE,sha256=PLXgT5nqTcwqGoalBG1tGoXtGUHFunt4gK0M-GxPl6o,1097
8
+ fangcloud_mcp-0.1.6.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: hatch 0.22.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ fangcloud-mcp = fangcloud_mcp:main
@@ -1,9 +0,0 @@
1
- fangcloud/__init__.py,sha256=xUeOczwkR-HFR0bI1EBHHuNCw_eQdZ7A35ob5swB4bM,254
2
- fangcloud/fangcloud.py,sha256=g5Q6por1kA5_KmYINmtusEEQhyWuGEBtHJRGpSD5Mb4,14661
3
- fangcloud/fangcloud_api.py,sha256=QQWB8neT-XKfc854yhhZ9WihyN-aI5D_MbV_RRjf-VM,26579
4
- fangcloud_mcp-0.1.5.dist-info/licenses/LICENSE,sha256=PLXgT5nqTcwqGoalBG1tGoXtGUHFunt4gK0M-GxPl6o,1097
5
- fangcloud_mcp-0.1.5.dist-info/METADATA,sha256=Di9bs7fLz6-nkUOOpHk9aiohNYhTRTf5nWpEpDk_A80,4528
6
- fangcloud_mcp-0.1.5.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
7
- fangcloud_mcp-0.1.5.dist-info/entry_points.txt,sha256=n3xxtybuLoNxx4J3OKlUOlaYrRbeTrnG6ANj5yhMRsc,55
8
- fangcloud_mcp-0.1.5.dist-info/top_level.txt,sha256=AugWwWUaSzLQQ1vZjMo8GoW-xHK7yyqLdyve4HuFfzg,10
9
- fangcloud_mcp-0.1.5.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- fangcloud = fangcloud.fangcloud:main
@@ -1 +0,0 @@
1
- fangcloud
File without changes
File without changes