mcp-as-code 0.1.6__tar.gz → 0.1.7__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.
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/PKG-INFO +12 -3
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/README.md +9 -1
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/examples/serve-mcp/README.md +1 -1
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/pyproject.toml +5 -1
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/__init__.py +1 -1
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/sandbox/providers/matchlock.py +4 -3
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/.gitignore +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/LICENSE +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/docs/mcp-config.md +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/images/sandbox/README.md +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/cli.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/codegen.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/config.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/gateway.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/mcp_manager.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/oauth.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/runner.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/sandbox/__init__.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/sandbox/core.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/sandbox/providers/__init__.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/sandbox/providers/base.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/sandbox/providers/docker.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/sandbox/providers/local.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/serve_mcp.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/service.py +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/bash_description.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/code_execute_description.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/codegen/client.py.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/codegen/model.py.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/codegen/package_init.py.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/codegen/pyproject.toml.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/codegen/server_init.py.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/codegen/tool.py.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/codegen/type_alias.py.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/serve_mcp_instructions.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/templates/server_catalog.j2 +0 -0
- {mcp_as_code-0.1.6 → mcp_as_code-0.1.7}/src/maco/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-as-code
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: Execute MCP tools through generated Python code interfaces
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -8,9 +8,10 @@ Requires-Python: >=3.11
|
|
|
8
8
|
Requires-Dist: click>=8.1
|
|
9
9
|
Requires-Dist: httpx>=0.28
|
|
10
10
|
Requires-Dist: jinja2>=3.1
|
|
11
|
-
Requires-Dist: matchlock==0.2.15
|
|
12
11
|
Requires-Dist: mcp>=1.24.0
|
|
13
12
|
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Provides-Extra: matchlock
|
|
14
|
+
Requires-Dist: matchlock<0.3.0,>=0.2.15; extra == 'matchlock'
|
|
14
15
|
Description-Content-Type: text/markdown
|
|
15
16
|
|
|
16
17
|
# maco
|
|
@@ -80,6 +81,14 @@ Install the Python package `mcp-as-code`; it provides the `maco` executable:
|
|
|
80
81
|
uv tool install mcp-as-code
|
|
81
82
|
```
|
|
82
83
|
|
|
84
|
+
To use the Matchlock sandbox provider, install the optional Matchlock support instead:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv tool install 'mcp-as-code[matchlock]'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The Matchlock binary must also be installed and available on `PATH`.
|
|
91
|
+
|
|
83
92
|
Then verify the CLI:
|
|
84
93
|
|
|
85
94
|
```bash
|
|
@@ -149,7 +158,7 @@ Choose the execution provider with `--provider`:
|
|
|
149
158
|
|
|
150
159
|
- `local`: ideally for local development and fast feedback loop, or maco is already running in an isolated sandbox.
|
|
151
160
|
- `docker`: runs mcp bash and code execution in a long-lived Docker container.
|
|
152
|
-
- `matchlock`: runs mcp bash and code execution in a long-lived Matchlock micro-VM.
|
|
161
|
+
- `matchlock`: runs mcp bash and code execution in a long-lived Matchlock micro-VM; requires `mcp-as-code[matchlock]` and the Matchlock binary.
|
|
153
162
|
|
|
154
163
|
## Credits
|
|
155
164
|
|
|
@@ -65,6 +65,14 @@ Install the Python package `mcp-as-code`; it provides the `maco` executable:
|
|
|
65
65
|
uv tool install mcp-as-code
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
To use the Matchlock sandbox provider, install the optional Matchlock support instead:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uv tool install 'mcp-as-code[matchlock]'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The Matchlock binary must also be installed and available on `PATH`.
|
|
75
|
+
|
|
68
76
|
Then verify the CLI:
|
|
69
77
|
|
|
70
78
|
```bash
|
|
@@ -134,7 +142,7 @@ Choose the execution provider with `--provider`:
|
|
|
134
142
|
|
|
135
143
|
- `local`: ideally for local development and fast feedback loop, or maco is already running in an isolated sandbox.
|
|
136
144
|
- `docker`: runs mcp bash and code execution in a long-lived Docker container.
|
|
137
|
-
- `matchlock`: runs mcp bash and code execution in a long-lived Matchlock micro-VM.
|
|
145
|
+
- `matchlock`: runs mcp bash and code execution in a long-lived Matchlock micro-VM; requires `mcp-as-code[matchlock]` and the Matchlock binary.
|
|
138
146
|
|
|
139
147
|
## Credits
|
|
140
148
|
|
|
@@ -11,7 +11,7 @@ This example shows how to expose several upstream MCP servers through one compac
|
|
|
11
11
|
- `node`/`npx`, for Playwright MCP
|
|
12
12
|
- A GitHub personal access token in `GITHUB_TOKEN`, used by the hosted GitHub MCP server
|
|
13
13
|
- Docker, only if you use the Docker sandbox provider
|
|
14
|
-
- Optional: Matchlock, for the Matchlock sandbox provider
|
|
14
|
+
- Optional: `mcp-as-code[matchlock]` and the Matchlock binary, for the Matchlock sandbox provider
|
|
15
15
|
|
|
16
16
|
If you are already authenticated with the GitHub CLI, export a token directly:
|
|
17
17
|
|
|
@@ -9,11 +9,15 @@ dependencies = [
|
|
|
9
9
|
"click>=8.1",
|
|
10
10
|
"httpx>=0.28",
|
|
11
11
|
"jinja2>=3.1",
|
|
12
|
-
"matchlock==0.2.15",
|
|
13
12
|
"mcp>=1.24.0",
|
|
14
13
|
"pydantic>=2.0",
|
|
15
14
|
]
|
|
16
15
|
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
matchlock = [
|
|
18
|
+
"matchlock>=0.2.15,<0.3.0",
|
|
19
|
+
]
|
|
20
|
+
|
|
17
21
|
[project.scripts]
|
|
18
22
|
maco = "maco.cli:main"
|
|
19
23
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from importlib import import_module
|
|
5
6
|
import shlex
|
|
6
7
|
import sys
|
|
7
8
|
from typing import Any
|
|
@@ -215,10 +216,10 @@ def _replace_url_host(url: str, host: str) -> str:
|
|
|
215
216
|
|
|
216
217
|
def _load_matchlock_sdk() -> tuple[type[Any], type[Any], type[Any]]:
|
|
217
218
|
try:
|
|
218
|
-
|
|
219
|
+
matchlock = import_module("matchlock")
|
|
219
220
|
except ImportError as exc: # pragma: no cover - depends on optional package availability
|
|
220
221
|
raise SandboxError(
|
|
221
222
|
"matchlock provider requires the Matchlock Python SDK; "
|
|
222
|
-
"install `
|
|
223
|
+
"install `mcp-as-code[matchlock]`"
|
|
223
224
|
) from exc
|
|
224
|
-
return Client, Config, Sandbox
|
|
225
|
+
return matchlock.Client, matchlock.Config, matchlock.Sandbox
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|