jupyter-mcp-server 0.3.2__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.
Files changed (58) hide show
  1. jupyter_mcp_server-0.3.2/.github/dependabot.yml +18 -0
  2. jupyter_mcp_server-0.3.2/.github/workflows/build.yml +108 -0
  3. jupyter_mcp_server-0.3.2/.github/workflows/fix-license-header.yml +62 -0
  4. jupyter_mcp_server-0.3.2/.github/workflows/lint.sh +10 -0
  5. jupyter_mcp_server-0.3.2/.github/workflows/prep-release.yml +48 -0
  6. jupyter_mcp_server-0.3.2/.github/workflows/publish-release.yml +58 -0
  7. jupyter_mcp_server-0.3.2/.gitignore +126 -0
  8. jupyter_mcp_server-0.3.2/.licenserc.yaml +18 -0
  9. jupyter_mcp_server-0.3.2/.pre-commit-config.yaml +38 -0
  10. jupyter_mcp_server-0.3.2/CHANGELOG.md +7 -0
  11. jupyter_mcp_server-0.3.2/Dockerfile +19 -0
  12. jupyter_mcp_server-0.3.2/LICENSE +37 -0
  13. jupyter_mcp_server-0.3.2/Makefile +73 -0
  14. jupyter_mcp_server-0.3.2/PKG-INFO +228 -0
  15. jupyter_mcp_server-0.3.2/README.md +163 -0
  16. jupyter_mcp_server-0.3.2/RELEASE.md +58 -0
  17. jupyter_mcp_server-0.3.2/dev/README.md +9 -0
  18. jupyter_mcp_server-0.3.2/dev/content/README.md +9 -0
  19. jupyter_mcp_server-0.3.2/dev/content/notebook.ipynb +32 -0
  20. jupyter_mcp_server-0.3.2/docs/.gitignore +22 -0
  21. jupyter_mcp_server-0.3.2/docs/.yarnrc.yml +21 -0
  22. jupyter_mcp_server-0.3.2/docs/LICENSE +21 -0
  23. jupyter_mcp_server-0.3.2/docs/Makefile +69 -0
  24. jupyter_mcp_server-0.3.2/docs/README.md +25 -0
  25. jupyter_mcp_server-0.3.2/docs/_tmp/fine-tuned/_category_.yaml +2 -0
  26. jupyter_mcp_server-0.3.2/docs/_tmp/fine-tuned/index.mdx +7 -0
  27. jupyter_mcp_server-0.3.2/docs/_tmp/llama3/_category_.yaml +2 -0
  28. jupyter_mcp_server-0.3.2/docs/_tmp/llama3/index.mdx +3 -0
  29. jupyter_mcp_server-0.3.2/docs/babel.config.js +9 -0
  30. jupyter_mcp_server-0.3.2/docs/docs/_category_.yaml +2 -0
  31. jupyter_mcp_server-0.3.2/docs/docs/index.mdx +7 -0
  32. jupyter_mcp_server-0.3.2/docs/docusaurus.config.js +144 -0
  33. jupyter_mcp_server-0.3.2/docs/package.json +43 -0
  34. jupyter_mcp_server-0.3.2/docs/sidebars.js +30 -0
  35. jupyter_mcp_server-0.3.2/docs/src/components/HomepageFeatures.js +70 -0
  36. jupyter_mcp_server-0.3.2/docs/src/components/HomepageFeatures.module.css +19 -0
  37. jupyter_mcp_server-0.3.2/docs/src/components/HomepageProducts.js +69 -0
  38. jupyter_mcp_server-0.3.2/docs/src/components/HomepageProducts.module.css +19 -0
  39. jupyter_mcp_server-0.3.2/docs/src/css/custom.css +103 -0
  40. jupyter_mcp_server-0.3.2/docs/src/pages/index.js +49 -0
  41. jupyter_mcp_server-0.3.2/docs/src/pages/index.module.css +40 -0
  42. jupyter_mcp_server-0.3.2/docs/src/pages/markdown-page.md +13 -0
  43. jupyter_mcp_server-0.3.2/docs/src/pages/testimonials.tsx +23 -0
  44. jupyter_mcp_server-0.3.2/docs/static/img/datalayer/logo.png +0 -0
  45. jupyter_mcp_server-0.3.2/docs/static/img/datalayer/logo.svg +164 -0
  46. jupyter_mcp_server-0.3.2/docs/static/img/favicon.ico +0 -0
  47. jupyter_mcp_server-0.3.2/docs/static/img/feature_1.svg +182 -0
  48. jupyter_mcp_server-0.3.2/docs/static/img/feature_2.svg +140 -0
  49. jupyter_mcp_server-0.3.2/docs/static/img/feature_3.svg +146 -0
  50. jupyter_mcp_server-0.3.2/docs/static/img/product_1.svg +131 -0
  51. jupyter_mcp_server-0.3.2/docs/static/img/product_2.svg +679 -0
  52. jupyter_mcp_server-0.3.2/docs/static/img/product_3.svg +1682 -0
  53. jupyter_mcp_server-0.3.2/jupyter_mcp_server/__init__.py +7 -0
  54. jupyter_mcp_server-0.3.2/jupyter_mcp_server/__version__.py +7 -0
  55. jupyter_mcp_server-0.3.2/jupyter_mcp_server/server.py +99 -0
  56. jupyter_mcp_server-0.3.2/jupyter_mcp_server/tests/__init__.py +5 -0
  57. jupyter_mcp_server-0.3.2/pyproject.toml +95 -0
  58. jupyter_mcp_server-0.3.2/smithery.yaml +25 -0
@@ -0,0 +1,18 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "monthly"
7
+ groups:
8
+ actions:
9
+ patterns:
10
+ - "*"
11
+ - package-ecosystem: "pip"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "monthly"
15
+ groups:
16
+ pip:
17
+ patterns:
18
+ - "*"
@@ -0,0 +1,108 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+
8
+ defaults:
9
+ run:
10
+ shell: bash -eux {0}
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ os: [ubuntu-latest, macos-latest, windows-latest]
19
+ python-version: ["3.9", "3.13"]
20
+
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Base Setup
26
+ uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
27
+
28
+ - name: Install the extension
29
+ run: |
30
+ python -m pip install ".[test]"
31
+
32
+ - name: Test the extension
33
+ run: |
34
+ pytest .
35
+
36
+ - name: Build the extension
37
+ run: |
38
+ pip install build
39
+ python -m build --sdist
40
+ cp dist/*.tar.gz my_server_extension.tar.gz
41
+ pip uninstall -y "jupyter_mcp_server"
42
+ rm -rf "jupyter_mcp_server"
43
+
44
+ - uses: actions/upload-artifact@v4
45
+ if: startsWith(matrix.os, 'ubuntu')
46
+ with:
47
+ name: my_server_extension-sdist-${{ matrix.python-version }}
48
+ path: my_server_extension.tar.gz
49
+
50
+ check_links:
51
+ runs-on: ubuntu-latest
52
+ steps:
53
+ - uses: actions/checkout@v4
54
+ - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
55
+ - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
56
+
57
+ test_lint:
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
62
+ - name: Run Linters
63
+ run: |
64
+ bash ./.github/workflows/lint.sh
65
+
66
+ test_sdist:
67
+ needs: build
68
+ runs-on: ubuntu-latest
69
+ strategy:
70
+ matrix:
71
+ python-version: ["3.13"]
72
+
73
+ steps:
74
+ - name: Checkout
75
+ uses: actions/checkout@v4
76
+ - name: Install Python
77
+ uses: actions/setup-python@v5
78
+ with:
79
+ python-version: ${{ matrix.python-version }}
80
+ architecture: "x64"
81
+ - uses: actions/download-artifact@v4
82
+ with:
83
+ name: my_server_extension-sdist-${{ matrix.python-version }}
84
+ - name: Install and Test
85
+ run: |
86
+ pip install my_server_extension.tar.gz
87
+ pip list 2>&1 | grep -ie "jupyter_mcp_server"
88
+ python -c "import jupyter_mcp_server"
89
+
90
+ check_release:
91
+ needs: test_sdist
92
+ runs-on: ubuntu-latest
93
+ steps:
94
+ - uses: actions/checkout@v4
95
+ - name: Base Setup
96
+ uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
97
+ - name: Install Dependencies
98
+ run: |
99
+ pip install -e .
100
+ - name: Check Release
101
+ uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
102
+ with:
103
+ token: ${{ secrets.GITHUB_TOKEN }}
104
+ - name: Upload Distributions
105
+ uses: actions/upload-artifact@v4
106
+ with:
107
+ name: jupyter_mcp_server-releaser-dist-${{ github.run_number }}
108
+ path: .jupyter_releaser_checkout/dist
@@ -0,0 +1,62 @@
1
+ name: Fix License Headers
2
+
3
+ on:
4
+ pull_request_target:
5
+
6
+ concurrency:
7
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8
+ cancel-in-progress: true
9
+
10
+ jobs:
11
+ header-license-fix:
12
+ runs-on: ubuntu-latest
13
+
14
+ permissions:
15
+ contents: write
16
+ pull-requests: write
17
+
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+ with:
22
+ token: ${{ secrets.GITHUB_TOKEN }}
23
+
24
+ - name: Checkout the branch from the PR that triggered the job
25
+ run: gh pr checkout ${{ github.event.pull_request.number }}
26
+ env:
27
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28
+
29
+ - name: Fix License Header
30
+ # pin to include https://github.com/apache/skywalking-eyes/pull/168
31
+ uses: apache/skywalking-eyes/header@477772b7ef382b9024ac89676ebe6cbb26165a4f
32
+ with:
33
+ mode: fix
34
+
35
+ - name: List files changed
36
+ id: files-changed
37
+ shell: bash -l {0}
38
+ run: |
39
+ set -ex
40
+ export CHANGES=$(git status --porcelain | tee /tmp/modified.log | wc -l)
41
+ cat /tmp/modified.log
42
+
43
+ echo "N_CHANGES=${CHANGES}" >> $GITHUB_OUTPUT
44
+
45
+ git diff
46
+
47
+ - name: Commit any changes
48
+ if: steps.files-changed.outputs.N_CHANGES != '0'
49
+ shell: bash -l {0}
50
+ run: |
51
+ git config user.name "github-actions[bot]"
52
+ git config user.email "github-actions[bot]@users.noreply.github.com"
53
+
54
+ git pull --no-tags
55
+
56
+ git add *
57
+ git commit -m "Automatic application of license header"
58
+
59
+ git config push.default upstream
60
+ git push
61
+ env:
62
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # Copyright (c) 2023-2024 Datalayer, Inc.
3
+ #
4
+ # BSD 3-Clause License
5
+
6
+ pip install -e ".[lint, typing]"
7
+ mypy --install-types --non-interactive .
8
+ ruff check .
9
+ mdformat --check *.md
10
+ pipx run 'validate-pyproject[all]' pyproject.toml
@@ -0,0 +1,48 @@
1
+ name: "Step 1: Prep Release"
2
+ on:
3
+ workflow_dispatch:
4
+ inputs:
5
+ version_spec:
6
+ description: "New Version Specifier"
7
+ default: "next"
8
+ required: false
9
+ branch:
10
+ description: "The branch to target"
11
+ required: false
12
+ post_version_spec:
13
+ description: "Post Version Specifier"
14
+ required: false
15
+ # silent:
16
+ # description: "Set a placeholder in the changelog and don't publish the release."
17
+ # required: false
18
+ # type: boolean
19
+ since:
20
+ description: "Use PRs with activity since this date or git reference"
21
+ required: false
22
+ since_last_stable:
23
+ description: "Use PRs with activity since the last stable git tag"
24
+ required: false
25
+ type: boolean
26
+ jobs:
27
+ prep_release:
28
+ runs-on: ubuntu-latest
29
+ permissions:
30
+ contents: write
31
+ steps:
32
+ - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
33
+
34
+ - name: Prep Release
35
+ id: prep-release
36
+ uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
37
+ with:
38
+ token: ${{ secrets.GITHUB_TOKEN }}
39
+ version_spec: ${{ github.event.inputs.version_spec }}
40
+ # silent: ${{ github.event.inputs.silent }}
41
+ post_version_spec: ${{ github.event.inputs.post_version_spec }}
42
+ branch: ${{ github.event.inputs.branch }}
43
+ since: ${{ github.event.inputs.since }}
44
+ since_last_stable: ${{ github.event.inputs.since_last_stable }}
45
+
46
+ - name: "** Next Step **"
47
+ run: |
48
+ echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
@@ -0,0 +1,58 @@
1
+ name: "Step 2: Publish Release"
2
+ on:
3
+ workflow_dispatch:
4
+ inputs:
5
+ branch:
6
+ description: "The target branch"
7
+ required: false
8
+ release_url:
9
+ description: "The URL of the draft GitHub release"
10
+ required: false
11
+ steps_to_skip:
12
+ description: "Comma separated list of steps to skip"
13
+ required: false
14
+
15
+ jobs:
16
+ publish_release:
17
+ runs-on: ubuntu-latest
18
+ environment: release
19
+ permissions:
20
+ id-token: write
21
+ steps:
22
+ - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23
+
24
+ - uses: actions/create-github-app-token@v1
25
+ id: app-token
26
+ with:
27
+ app-id: ${{ vars.APP_ID }}
28
+ private-key: ${{ secrets.APP_PRIVATE_KEY }}
29
+
30
+ - name: Populate Release
31
+ id: populate-release
32
+ uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
33
+ with:
34
+ token: ${{ steps.app-token.outputs.token }}
35
+ branch: ${{ github.event.inputs.branch }}
36
+ release_url: ${{ github.event.inputs.release_url }}
37
+ steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
38
+
39
+ - name: Finalize Release
40
+ id: finalize-release
41
+ env:
42
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
43
+ uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
44
+ with:
45
+ token: ${{ steps.app-token.outputs.token }}
46
+ release_url: ${{ steps.populate-release.outputs.release_url }}
47
+
48
+ - name: "** Next Step **"
49
+ if: ${{ success() }}
50
+ run: |
51
+ echo "Verify the final release"
52
+ echo ${{ steps.finalize-release.outputs.release_url }}
53
+
54
+ - name: "** Failure Message **"
55
+ if: ${{ failure() }}
56
+ run: |
57
+ echo "Failed to Publish the Draft Release Url:"
58
+ echo ${{ steps.populate-release.outputs.release_url }}
@@ -0,0 +1,126 @@
1
+ *.egg-info/
2
+ .ipynb_checkpoints
3
+
4
+ # Created by https://www.gitignore.io/api/python
5
+ # Edit at https://www.gitignore.io/?templates=python
6
+
7
+ ### Python ###
8
+ # Byte-compiled / optimized / DLL files
9
+ __pycache__/
10
+ *.py[cod]
11
+ *$py.class
12
+
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ dist/
20
+ downloads/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ pip-wheel-metadata/
28
+ share/python-wheels/
29
+ .installed.cfg
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Environment variables:
59
+ .env
60
+
61
+ # Scrapy stuff:
62
+ .scrapy
63
+
64
+ # Sphinx documentation
65
+ docs/_build/
66
+
67
+ # PyBuilder
68
+ target/
69
+
70
+ # pyenv
71
+ .python-version
72
+
73
+ # celery beat schedule file
74
+ celerybeat-schedule
75
+
76
+ # SageMath parsed files
77
+ *.sage.py
78
+
79
+ # Spyder project settings
80
+ .spyderproject
81
+ .spyproject
82
+
83
+ # Rope project settings
84
+ .ropeproject
85
+
86
+ # Mr Developer
87
+ .mr.developer.cfg
88
+ .project
89
+ .pydevproject
90
+
91
+ # mkdocs documentation
92
+ /site
93
+
94
+ # mypy
95
+ .mypy_cache/
96
+ .dmypy.json
97
+ dmypy.json
98
+
99
+ # ruff
100
+ .ruff_cache
101
+
102
+ # Pyre type checker
103
+ .pyre/
104
+
105
+ # End of https://www.gitignore.io/api/python
106
+
107
+ # OSX files
108
+ .DS_Store
109
+
110
+ # Include
111
+ !**/.*ignore
112
+ !**/.*rc
113
+ !**/.*rc.js
114
+ !**/.*rc.json
115
+ !**/.*rc.yml
116
+ !**/.*config
117
+ !*.*rc.json
118
+ !.github
119
+ !.devcontainer
120
+
121
+ untracked_notebooks/*
122
+ .jupyter_ystore
123
+ .jupyter_ystore.db
124
+ docs/.yarn/*
125
+
126
+ uv.lock
@@ -0,0 +1,18 @@
1
+ header:
2
+ license:
3
+ content: |
4
+ Copyright (c) 2023-2024 Datalayer, Inc.
5
+
6
+ BSD 3-Clause License
7
+
8
+
9
+ paths-ignore:
10
+ - '**/*.ipynb'
11
+ - '**/*.json'
12
+ - '**/*.yaml'
13
+ - '**/*.yml'
14
+ - '**/.*'
15
+ - 'docs/**/*'
16
+ - 'LICENSE'
17
+
18
+ comment: on-failure
@@ -0,0 +1,38 @@
1
+ ci:
2
+ autoupdate_schedule: monthly
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v5.0.0
7
+ hooks:
8
+ - id: end-of-file-fixer
9
+ - id: check-case-conflict
10
+ - id: check-executables-have-shebangs
11
+ - id: requirements-txt-fixer
12
+ - id: check-added-large-files
13
+ - id: check-case-conflict
14
+ - id: check-toml
15
+ - id: check-yaml
16
+ - id: debug-statements
17
+ - id: forbid-new-submodules
18
+ - id: check-builtin-literals
19
+ - id: trailing-whitespace
20
+
21
+ - repo: https://github.com/python-jsonschema/check-jsonschema
22
+ rev: 0.29.4
23
+ hooks:
24
+ - id: check-github-workflows
25
+
26
+ - repo: https://github.com/executablebooks/mdformat
27
+ rev: 0.7.19
28
+ hooks:
29
+ - id: mdformat
30
+ additional_dependencies:
31
+ [mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
32
+
33
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
34
+ rev: v0.8.0
35
+ hooks:
36
+ - id: ruff
37
+ args: ["--fix"]
38
+ - id: ruff-format
@@ -0,0 +1,7 @@
1
+ <!--
2
+ ~ Copyright (c) 2023-2024 Datalayer, Inc.
3
+ ~
4
+ ~ BSD 3-Clause License
5
+ -->
6
+
7
+ # Changelog
@@ -0,0 +1,19 @@
1
+ # Copyright (c) 2023-2024 Datalayer, Inc.
2
+ #
3
+ # BSD 3-Clause License
4
+
5
+ FROM python:3.10-slim
6
+
7
+ WORKDIR /app
8
+
9
+ COPY pyproject.toml pyproject.toml
10
+ COPY LICENSE LICENSE
11
+ COPY README.md README.md
12
+ COPY jupyter_mcp_server/* jupyter_mcp_server/
13
+
14
+ RUN pip install -e .
15
+
16
+ RUN pip uninstall -y pycrdt datalayer_pycrdt
17
+ RUN pip install datalayer_pycrdt
18
+
19
+ CMD ["python", "-m", "jupyter_mcp_server.server"]
@@ -0,0 +1,37 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, Datalayer
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ ---
32
+
33
+ This library reuse part of Jupyter Server code licensed under BSD 3-Clause License
34
+ Source: https://github.com/jupyter-server/jupyter_server/blame/v2.12.0/jupyter_server/services/kernels/connection/base.py
35
+
36
+ This library reuse part of traitlets code licensed under BSD 3-Clause License
37
+ Source: https://github.com/ipython/traitlets/blob/v5.14.3/traitlets/log.py
@@ -0,0 +1,73 @@
1
+ # Copyright (c) 2023-2024 Datalayer, Inc.
2
+ #
3
+ # BSD 3-Clause License
4
+
5
+ SHELL=/bin/bash
6
+
7
+ .DEFAULT_GOAL := default
8
+
9
+ .PHONY: clean build
10
+
11
+ VERSION = "0.0.5"
12
+
13
+ default: all ## Default target is all.
14
+
15
+ help: ## display this help.
16
+ @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
17
+
18
+ all: clean dev ## Clean Install and Build
19
+
20
+ install:
21
+ pip install .
22
+
23
+ dev:
24
+ pip install ".[test,lint,typing]"
25
+
26
+ build:
27
+ pip install build
28
+ python -m build .
29
+
30
+ clean: ## clean
31
+ git clean -fdx
32
+
33
+ build-docker:
34
+ docker build -t datalayer/jupyter-mcp-server:${VERSION} .
35
+ docker image tag datalayer/jupyter-mcp-server:${VERSION} datalayer/jupyter-mcp-server:latest
36
+
37
+ start-docker:
38
+ docker run -i --rm \
39
+ -e SERVER_URL=http://localhost:8888 \
40
+ -e TOKEN=MY_TOKEN \
41
+ -e NOTEBOOK_PATH=notebook.ipynb \
42
+ --network=host \
43
+ datalayer/jupyter-mcp-server:latest
44
+
45
+ pull-docker:
46
+ docker image pull datalayer/jupyter-mcp-server:latest
47
+
48
+ push-docker:
49
+ docker push datalayer/jupyter-mcp-server:${VERSION}
50
+ docker push datalayer/jupyter-mcp-server:latest
51
+
52
+ claude-linux:
53
+ NIXPKGS_ALLOW_UNFREE=1 nix run github:k3d3/claude-desktop-linux-flake \
54
+ --impure \
55
+ --extra-experimental-features flakes \
56
+ --extra-experimental-features nix-command
57
+
58
+ jupyterlab:
59
+ pip uninstall -y pycrdt datalayer_pycrdt
60
+ pip install datalayer_pycrdt
61
+ jupyter lab \
62
+ --port 8888 \
63
+ --ip 0.0.0.0 \
64
+ --ServerApp.root_dir ./dev/content \
65
+ --IdentityProvider.token MY_TOKEN
66
+
67
+ publish-pypi: # publish the pypi package
68
+ git clean -fdx && \
69
+ python -m build
70
+ @exec echo
71
+ @exec echo twine upload ./dist/*-py3-none-any.whl
72
+ @exec echo
73
+ @exec echo https://pypi.org/project/jupyter-mcp-server/#history