codeocean-mcp-server 0.5.0__tar.gz → 0.7.0__tar.gz
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.
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/CHANGELOG.md +9 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/PKG-INFO +3 -3
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/README.md +1 -1
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/pyproject.toml +5 -2
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/tools/capsules.py +14 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/tools/computations.py +8 -8
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/tools/custom_metadata.py +1 -5
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/tools/data_assets.py +9 -9
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/tests/test_tool_calling.py +3 -3
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/uv.lock +5 -5
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/.gitignore +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/.python-version +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/LICENSE +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/RELEASE.md +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/__init__.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/file_utils.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/models.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/server.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/tools/__init__.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/tests/bedrock_call.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/tests/bedrock_tools_converter.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/tests/mcp_client.py +0 -0
- {codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/tests/test_multi_tool_calling.py +0 -0
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
CHANGELOG
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## 0.7.0 (2025-10-21)
|
|
5
|
+
|
|
6
|
+
- [#15](https://github.com/codeocean/codeocean-mcp-server/pull/15) feat: update codeocean sdk and search_pipelines tool
|
|
7
|
+
|
|
8
|
+
## 0.6.0 (2025-10-10)
|
|
9
|
+
|
|
10
|
+
- [#13](https://github.com/codeocean/codeocean-mcp-server/pull/13) feat: Updates for Code Ocean v4.0
|
|
11
|
+
- **Minimum Code Ocean platform version updated to `4.0.0`.**
|
|
12
|
+
|
|
4
13
|
## 0.5.0 (2025-09-01)
|
|
5
14
|
|
|
6
15
|
- [#9](https://github.com/codeocean/codeocean-mcp-server/pull/9) feat: Updates for Code Ocean v3.9
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeocean-mcp-server
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Code Ocean MCP Server
|
|
5
5
|
Project-URL: Homepage, https://github.com/codeocean/codeocean-mcp-server
|
|
6
6
|
Project-URL: Issues, https://github.com/codeocean/codeocean-mcp-server/issues
|
|
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Requires-Python: >=3.10
|
|
15
|
-
Requires-Dist: codeocean<0.
|
|
15
|
+
Requires-Dist: codeocean<0.13.0,>=0.12.0
|
|
16
16
|
Requires-Dist: mcp<1.13.0,>=1.12.0
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
|
|
@@ -220,7 +220,7 @@ Windsurf (Cascade) uses mcp_config.json under ~/.codeium/windsurf/ (or via the C
|
|
|
220
220
|
You can test the MCP server locally during development with [MCP Inspector](https://modelcontextprotocol.io/legacy/tools/inspector):
|
|
221
221
|
|
|
222
222
|
```bash
|
|
223
|
-
npx @modelcontextprotocol/inspector
|
|
223
|
+
npx @modelcontextprotocol/inspector uv tool run codeocean-mcp-server
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
This will start a web server where you can:
|
|
@@ -202,7 +202,7 @@ Windsurf (Cascade) uses mcp_config.json under ~/.codeium/windsurf/ (or via the C
|
|
|
202
202
|
You can test the MCP server locally during development with [MCP Inspector](https://modelcontextprotocol.io/legacy/tools/inspector):
|
|
203
203
|
|
|
204
204
|
```bash
|
|
205
|
-
npx @modelcontextprotocol/inspector
|
|
205
|
+
npx @modelcontextprotocol/inspector uv tool run codeocean-mcp-server
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
This will start a web server where you can:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codeocean-mcp-server"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.7.0"
|
|
4
4
|
authors = [{ name = "Code Ocean", email = "dev@codeocean.com" }]
|
|
5
5
|
description = "Code Ocean MCP Server"
|
|
6
6
|
readme = "README.md"
|
|
@@ -11,7 +11,7 @@ classifiers = [
|
|
|
11
11
|
"Operating System :: OS Independent",
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"codeocean>=0.
|
|
14
|
+
"codeocean>=0.12.0,<0.13.0",
|
|
15
15
|
"mcp>=1.12.0,<1.13.0",
|
|
16
16
|
]
|
|
17
17
|
license = "MIT"
|
|
@@ -44,6 +44,9 @@ exclude = ["/.circleci"]
|
|
|
44
44
|
[tool.hatch.build.targets.wheel]
|
|
45
45
|
packages = ["src/codeocean_mcp_server"]
|
|
46
46
|
|
|
47
|
+
[tool.hatch.metadata]
|
|
48
|
+
allow-direct-references = true
|
|
49
|
+
|
|
47
50
|
[tool.hatch.envs.default.scripts]
|
|
48
51
|
test = "pytest"
|
|
49
52
|
|
{codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/tools/capsules.py
RENAMED
|
@@ -34,6 +34,20 @@ def add_tools(mcp: FastMCP, client: CodeOcean):
|
|
|
34
34
|
params = CapsuleSearchParams(**search_params.model_dump(exclude_none=True))
|
|
35
35
|
return client.capsules.search_capsules(params)
|
|
36
36
|
|
|
37
|
+
@mcp.tool(
|
|
38
|
+
description=(
|
|
39
|
+
str(client.capsules.search_pipelines.__doc__)
|
|
40
|
+
+ "Use only for pipeline searches. "
|
|
41
|
+
"Provide only the minimal required parameters (e.g. limit=10); "
|
|
42
|
+
"do not include optional params "
|
|
43
|
+
"like sort_by or sort_order unless requested."
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
def search_pipelines(search_params: CapsuleSearchParamsModel) -> CapsuleSearchResults:
|
|
47
|
+
"""Search for pipelines matching specified criteria."""
|
|
48
|
+
params = CapsuleSearchParams(**search_params.model_dump(exclude_none=True))
|
|
49
|
+
return client.capsules.search_pipelines(params)
|
|
50
|
+
|
|
37
51
|
@mcp.tool(
|
|
38
52
|
description=(
|
|
39
53
|
str(client.capsules.attach_data_assets.__doc__)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from codeocean import CodeOcean
|
|
2
2
|
from codeocean.computation import (
|
|
3
3
|
Computation,
|
|
4
|
-
|
|
4
|
+
FileURLs,
|
|
5
5
|
Folder,
|
|
6
6
|
RunParams,
|
|
7
7
|
)
|
|
@@ -26,7 +26,7 @@ def add_tools(mcp: FastMCP, client: CodeOcean):
|
|
|
26
26
|
str(client.computations.run_capsule.__doc__)
|
|
27
27
|
+ "Typical workflow: 1) run_capsule() to start execution "
|
|
28
28
|
"2) wait_until_completed() to monitor progress "
|
|
29
|
-
"3) list_computation_results() and
|
|
29
|
+
"3) list_computation_results() and get_result_file_urls() "
|
|
30
30
|
"to retrieve outputs."
|
|
31
31
|
)
|
|
32
32
|
)
|
|
@@ -53,10 +53,10 @@ def add_tools(mcp: FastMCP, client: CodeOcean):
|
|
|
53
53
|
return client.computations.list_computation_results(computation_id)
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
@mcp.tool(description=(client.computations.
|
|
57
|
-
def
|
|
58
|
-
"""Get download
|
|
59
|
-
return client.computations.
|
|
56
|
+
@mcp.tool(description=(client.computations.get_result_file_urls.__doc__))
|
|
57
|
+
def get_result_file_urls(computation_id: str, file_path: str) -> FileURLs:
|
|
58
|
+
"""Get view and download URLs for a specific result file from computation."""
|
|
59
|
+
return client.computations.get_result_file_urls(computation_id, file_path)
|
|
60
60
|
|
|
61
61
|
@mcp.tool(
|
|
62
62
|
description=(
|
|
@@ -65,5 +65,5 @@ def add_tools(mcp: FastMCP, client: CodeOcean):
|
|
|
65
65
|
)
|
|
66
66
|
def download_and_read_a_file_from_computation(computation_id: str, file_path: str) -> str:
|
|
67
67
|
"""Download a file using the provided URL and return its content."""
|
|
68
|
-
|
|
69
|
-
return download_and_read_file(
|
|
68
|
+
file_urls = client.computations.get_result_file_urls(computation_id, file_path)
|
|
69
|
+
return download_and_read_file(file_urls.download_url)
|
|
@@ -2,15 +2,11 @@ from codeocean import CodeOcean
|
|
|
2
2
|
from codeocean.custom_metadata import CustomMetadata
|
|
3
3
|
from mcp.server.fastmcp import FastMCP
|
|
4
4
|
|
|
5
|
-
from codeocean_mcp_server.models import dataclass_to_pydantic
|
|
6
|
-
|
|
7
|
-
CustomMetadataModel = dataclass_to_pydantic(CustomMetadata)
|
|
8
|
-
|
|
9
5
|
|
|
10
6
|
def add_tools(mcp: FastMCP, client: CodeOcean):
|
|
11
7
|
"""Add custom_metadata tools to the MCP server."""
|
|
12
8
|
|
|
13
9
|
@mcp.tool(description=client.custom_metadata.get_custom_metadata.__doc__)
|
|
14
|
-
def get_custom_metadata() ->
|
|
10
|
+
def get_custom_metadata() -> CustomMetadata:
|
|
15
11
|
"""Retrieve custom metadata."""
|
|
16
12
|
return client.custom_metadata.get_custom_metadata()
|
|
@@ -7,7 +7,7 @@ from codeocean.data_asset import (
|
|
|
7
7
|
DataAssetSearchParams,
|
|
8
8
|
DataAssetSearchResults,
|
|
9
9
|
DataAssetUpdateParams,
|
|
10
|
-
|
|
10
|
+
FileURLs,
|
|
11
11
|
Folder,
|
|
12
12
|
)
|
|
13
13
|
from mcp.server.fastmcp import FastMCP
|
|
@@ -39,16 +39,16 @@ def add_tools(mcp: FastMCP, client: CodeOcean):
|
|
|
39
39
|
|
|
40
40
|
@mcp.tool(
|
|
41
41
|
description=(
|
|
42
|
-
str(client.data_assets.
|
|
42
|
+
str(client.data_assets.get_data_asset_file_urls.__doc__)
|
|
43
43
|
+ "Call only when the data asset is already created and in a ready "
|
|
44
44
|
"state. If the asset may not yet be ready, first use "
|
|
45
45
|
"`wait_until_ready` to poll until readiness, then retrieve the "
|
|
46
46
|
"download URL."
|
|
47
47
|
)
|
|
48
48
|
)
|
|
49
|
-
def
|
|
50
|
-
"""Get
|
|
51
|
-
return client.data_assets.
|
|
49
|
+
def get_data_asset_file_urls(data_asset_id: str, file_path: str) -> FileURLs:
|
|
50
|
+
"""Get view and download URLs for a specific file in a data asset."""
|
|
51
|
+
return client.data_assets.get_data_asset_file_urls(data_asset_id, file_path)
|
|
52
52
|
|
|
53
53
|
@mcp.tool(
|
|
54
54
|
description=(
|
|
@@ -57,13 +57,13 @@ def add_tools(mcp: FastMCP, client: CodeOcean):
|
|
|
57
57
|
)
|
|
58
58
|
def download_and_read_a_file_from_data_asset(data_asset_id: str, file_path: str) -> str:
|
|
59
59
|
"""Download a file using the provided URL and return its content."""
|
|
60
|
-
|
|
61
|
-
return download_and_read_file(
|
|
60
|
+
file_urls = client.data_assets.get_data_asset_file_urls(data_asset_id, file_path)
|
|
61
|
+
return download_and_read_file(file_urls.download_url)
|
|
62
62
|
|
|
63
63
|
@mcp.tool(description=client.data_assets.list_data_asset_files.__doc__)
|
|
64
|
-
def list_data_asset_files(data_asset_id: str) -> Folder:
|
|
64
|
+
def list_data_asset_files(data_asset_id: str, path: str = "") -> Folder:
|
|
65
65
|
"""List files in a data asset."""
|
|
66
|
-
return client.data_assets.list_data_asset_files(data_asset_id)
|
|
66
|
+
return client.data_assets.list_data_asset_files(data_asset_id, path)
|
|
67
67
|
|
|
68
68
|
@mcp.tool(description=client.data_assets.update_metadata.__doc__)
|
|
69
69
|
def update_metadata(
|
|
@@ -346,12 +346,12 @@ test_response = [
|
|
|
346
346
|
# ==============================================================================================================
|
|
347
347
|
# data assets tests
|
|
348
348
|
# --------------------------------------------------------------
|
|
349
|
-
#
|
|
349
|
+
# get_data_asset_file_urls
|
|
350
350
|
{
|
|
351
|
-
"id": "
|
|
351
|
+
"id": "get_data_asset_file_urls",
|
|
352
352
|
"prompt": "get download URL for file '/data/file.txt' in data asset with id: data_asset123",
|
|
353
353
|
"expected": {
|
|
354
|
-
"name": "
|
|
354
|
+
"name": "get_data_asset_file_urls",
|
|
355
355
|
"input": {
|
|
356
356
|
"data_asset_id": "data_asset123",
|
|
357
357
|
"file_path": "/data/file.txt",
|
|
@@ -338,7 +338,7 @@ wheels = [
|
|
|
338
338
|
|
|
339
339
|
[[package]]
|
|
340
340
|
name = "codeocean"
|
|
341
|
-
version = "0.
|
|
341
|
+
version = "0.12.0"
|
|
342
342
|
source = { registry = "https://pypi.org/simple" }
|
|
343
343
|
dependencies = [
|
|
344
344
|
{ name = "backports-strenum", marker = "python_full_version < '3.11'" },
|
|
@@ -346,14 +346,14 @@ dependencies = [
|
|
|
346
346
|
{ name = "requests" },
|
|
347
347
|
{ name = "requests-toolbelt" },
|
|
348
348
|
]
|
|
349
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
349
|
+
sdist = { url = "https://files.pythonhosted.org/packages/1e/87/63203a9bd4c9f160b02d60016c6222e0836a192d74b624445540667a9a34/codeocean-0.12.0.tar.gz", hash = "sha256:f124a0c090dfdecbbce5f2b033673142820cc200a4a4ed12239027e0eff0ada8", size = 19465, upload-time = "2025-10-21T07:28:06.618Z" }
|
|
350
350
|
wheels = [
|
|
351
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
351
|
+
{ url = "https://files.pythonhosted.org/packages/0c/67/86aaaa16e089883035cc45e1d93e5861cdf912e98c3f69dfaf7c7fa9b9a9/codeocean-0.12.0-py3-none-any.whl", hash = "sha256:c9135d34d0920dae5298095bb7ad03fffff5b5fd4c5e941a0200c3c38090df1c", size = 20417, upload-time = "2025-10-21T07:28:07.596Z" },
|
|
352
352
|
]
|
|
353
353
|
|
|
354
354
|
[[package]]
|
|
355
355
|
name = "codeocean-mcp-server"
|
|
356
|
-
version = "0.
|
|
356
|
+
version = "0.7.0"
|
|
357
357
|
source = { editable = "." }
|
|
358
358
|
dependencies = [
|
|
359
359
|
{ name = "codeocean" },
|
|
@@ -372,7 +372,7 @@ dev = [
|
|
|
372
372
|
|
|
373
373
|
[package.metadata]
|
|
374
374
|
requires-dist = [
|
|
375
|
-
{ name = "codeocean", specifier = ">=0.
|
|
375
|
+
{ name = "codeocean", specifier = ">=0.12.0,<0.13.0" },
|
|
376
376
|
{ name = "mcp", specifier = ">=1.12.0,<1.13.0" },
|
|
377
377
|
]
|
|
378
378
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/__init__.py
RENAMED
|
File without changes
|
{codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/file_utils.py
RENAMED
|
File without changes
|
{codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/models.py
RENAMED
|
File without changes
|
{codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/server.py
RENAMED
|
File without changes
|
{codeocean_mcp_server-0.5.0 → codeocean_mcp_server-0.7.0}/src/codeocean_mcp_server/tools/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|