fangcloud-mcp 0.1.4__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.
- {fangcloud → fangcloud_mcp}/__init__.py +0 -2
- {fangcloud_mcp-0.1.4.dist-info → fangcloud_mcp-0.1.6.dist-info}/METADATA +179 -176
- fangcloud_mcp-0.1.6.dist-info/RECORD +8 -0
- {fangcloud_mcp-0.1.4.dist-info → fangcloud_mcp-0.1.6.dist-info}/WHEEL +1 -2
- fangcloud_mcp-0.1.6.dist-info/entry_points.txt +2 -0
- fangcloud_mcp-0.1.4.dist-info/RECORD +0 -9
- fangcloud_mcp-0.1.4.dist-info/entry_points.txt +0 -2
- fangcloud_mcp-0.1.4.dist-info/top_level.txt +0 -1
- {fangcloud → fangcloud_mcp}/fangcloud.py +0 -0
- {fangcloud → fangcloud_mcp}/fangcloud_api.py +0 -0
- {fangcloud_mcp-0.1.4.dist-info/licenses → fangcloud_mcp-0.1.6.dist-info/license_files}/LICENSE +0 -0
@@ -1,176 +1,179 @@
|
|
1
|
-
Metadata-Version: 2.
|
2
|
-
Name: fangcloud-mcp
|
3
|
-
Version: 0.1.
|
4
|
-
Summary: FangCloud MCP 是一个 Model Context Protocol (MCP) 服务器实现,提供与 FangCloud 云存储服务的集成
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
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,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.4.dist-info/licenses/LICENSE,sha256=PLXgT5nqTcwqGoalBG1tGoXtGUHFunt4gK0M-GxPl6o,1097
|
5
|
-
fangcloud_mcp-0.1.4.dist-info/METADATA,sha256=PvzrzNkUN_4lugUkPJ6OMVKpvB7qMm8bIZscre2C-8c,4530
|
6
|
-
fangcloud_mcp-0.1.4.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
7
|
-
fangcloud_mcp-0.1.4.dist-info/entry_points.txt,sha256=n3xxtybuLoNxx4J3OKlUOlaYrRbeTrnG6ANj5yhMRsc,55
|
8
|
-
fangcloud_mcp-0.1.4.dist-info/top_level.txt,sha256=AugWwWUaSzLQQ1vZjMo8GoW-xHK7yyqLdyve4HuFfzg,10
|
9
|
-
fangcloud_mcp-0.1.4.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
fangcloud
|
File without changes
|
File without changes
|
{fangcloud_mcp-0.1.4.dist-info/licenses → fangcloud_mcp-0.1.6.dist-info/license_files}/LICENSE
RENAMED
File without changes
|