code-executor-mcp 1.0.0__tar.gz → 1.0.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 (23) hide show
  1. code_executor_mcp-1.0.2/.github/FUNDING.yml +8 -0
  2. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/PKG-INFO +1 -1
  3. code_executor_mcp-1.0.2/README.md +41 -0
  4. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/pyproject.toml +1 -1
  5. code_executor_mcp-1.0.2/server.json +22 -0
  6. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/server.py +102 -6
  7. code_executor_mcp-1.0.0/README.md +0 -69
  8. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/.github/workflows/mcp-smithery-publish.yml +0 -0
  9. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/.github/workflows/test.yml +0 -0
  10. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/.gitignore +0 -0
  11. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/.mcp.json +0 -0
  12. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/.well-known/mcp/server-card.json +0 -0
  13. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/CODE_OF_CONDUCT.md +0 -0
  14. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/CONTRIBUTING.md +0 -0
  15. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/Dockerfile.glama +0 -0
  16. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/LICENSE +0 -0
  17. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/SECURITY.md +0 -0
  18. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/glama.json +0 -0
  19. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/mcp-wrapper.py +0 -0
  20. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/package.json +0 -0
  21. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/pytest.ini +0 -0
  22. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/smithery.yaml +0 -0
  23. {code_executor_mcp-1.0.0 → code_executor_mcp-1.0.2}/tests/test_server.py +0 -0
@@ -0,0 +1,8 @@
1
+ # Sponsor MEOK Labs's open-source compliance MCPs
2
+ # All packages MIT-licensed. Supports the Sigstore migration + ongoing maintenance.
3
+
4
+ github: [CSOAI-ORG]
5
+ custom:
6
+ - "https://buy.stripe.com/eVq9AV4O87sudMF42k8k839"
7
+ - "https://meok.ai/sponsor"
8
+ - "https://nlnet.nl/propose"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-executor-mcp
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: MCP server for code executor. Features execute code, run command, run tests. From MEOK AI Labs.
5
5
  Project-URL: Homepage, https://meok.ai
6
6
  Project-URL: Repository, https://github.com/CSOAI-ORG/code-executor-mcp
@@ -0,0 +1,41 @@
1
+ [![code-executor-mcp MCP server](https://glama.ai/mcp/servers/CSOAI-ORG/code-executor-mcp/badges/card.svg)](https://glama.ai/mcp/servers/CSOAI-ORG/code-executor-mcp)
2
+
3
+ <div align="center">
4
+
5
+ [![GitHub stars](https://img.shields.io/github/stars/CSOAI-ORG/code-executor-mcp)](https://github.com/CSOAI-ORG/code-executor-mcp/stargazers)
6
+
7
+ # ucodeU executorU mcp
8
+
9
+ ****
10
+
11
+ [![npm version](https://img.shields.io/npm/v/@meok-ai/code-executor-mcp)](https://www.npmjs.com/package/@meok-ai/code-executor-mcp)
12
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
13
+ [![MEOK AI Labs](https://img.shields.io/badge/MEOK_AI_Labs-255+_servers-purple)](https://meok.ai)
14
+
15
+ [Installation](#installation) · [Docs](https://csoai.org) · [Report Bug](https://github.com/CSOAI-ORG/code-executor-mcp/issues)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pip install code-executor-mcp
25
+ # or
26
+ npm install -g @meok-ai/code-executor-mcp
27
+ ```
28
+
29
+ ## Quick Start
30
+
31
+ See the project repository for full documentation and examples.
32
+
33
+ ## Enterprise Support
34
+
35
+ - 📧 nicholas@csoai.org
36
+ - 🌐 [CSOAI.org](https://csoai.org)
37
+
38
+ ## License
39
+
40
+ MIT © [CSOAI](https://csoai.org)
41
+ <!-- mcp-name: io.github.CSOAI-ORG/code-executor-mcp -->
@@ -3,7 +3,7 @@ requires = ["hatchling"]
3
3
  build-backend = "hatchling.build"
4
4
  [project]
5
5
  name = "code-executor-mcp"
6
- version = "1.0.0"
6
+ version = "1.0.2"
7
7
  description = "MCP server for code executor. Features execute code, run command, run tests. From MEOK AI Labs."
8
8
  license = {file = "LICENSE"}
9
9
  requires-python = ">=3.10"
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "CSOAI-ORG/code-executor-mcp",
4
+ "version": "1.0.0",
5
+ "description": "Code Executor MCP Server by MEOK AI Labs",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/CSOAI-ORG/code-executor-mcp",
9
+ "source": "https://github.com/CSOAI-ORG/code-executor-mcp"
10
+ },
11
+ "packages": [
12
+ {
13
+ "registryType": "pypi",
14
+ "identifier": "code-executor-mcp",
15
+ "version": "1.0.0",
16
+ "runtimeHint": "python",
17
+ "transport": {
18
+ "type": "stdio"
19
+ }
20
+ }
21
+ ]
22
+ }
@@ -269,7 +269,23 @@ def execute_code(code: str, language: str = "python", timeout: int = 30, api_key
269
269
  Supported languages: python, javascript.
270
270
  Timeout: max 60 seconds (30 default).
271
271
  Dangerous patterns (os.system, subprocess, eval(input), etc.) are blocked.
272
- Output is captured and returned (stdout + stderr, truncated at 10KB)."""
272
+ Output is captured and returned (stdout + stderr, truncated at 10KB).
273
+
274
+ Behavior:
275
+ This tool is read-only and stateless — it produces analysis output
276
+ without modifying any external systems, databases, or files.
277
+ Safe to call repeatedly with identical inputs (idempotent).
278
+ Free tier: 10/day rate limit. Pro tier: unlimited.
279
+ No authentication required for basic usage.
280
+
281
+ When to use:
282
+ Use this tool when you need structured analysis or classification
283
+ of inputs against established frameworks or standards.
284
+
285
+ When NOT to use:
286
+ Not suitable for real-time production decision-making without
287
+ human review of results.
288
+ """
273
289
  allowed, msg, tier = check_access(api_key)
274
290
  if not allowed:
275
291
  return {"error": msg, "upgrade_url": "https://meok.ai/pricing"}
@@ -293,7 +309,23 @@ def run_command(command: str, timeout: int = 30, api_key: str = "") -> dict:
293
309
  """Execute a shell command and return stdout/stderr/exit_code.
294
310
  Timeout: max 60 seconds.
295
311
  Destructive commands (rm -rf /, dd, fork bombs, pipe-to-shell) are blocked.
296
- Commands run in a temporary sandbox directory."""
312
+ Commands run in a temporary sandbox directory.
313
+
314
+ Behavior:
315
+ This tool is read-only and stateless — it produces analysis output
316
+ without modifying any external systems, databases, or files.
317
+ Safe to call repeatedly with identical inputs (idempotent).
318
+ Free tier: 10/day rate limit. Pro tier: unlimited.
319
+ No authentication required for basic usage.
320
+
321
+ When to use:
322
+ Use this tool when you need structured analysis or classification
323
+ of inputs against established frameworks or standards.
324
+
325
+ When NOT to use:
326
+ Not suitable for real-time production decision-making without
327
+ human review of results.
328
+ """
297
329
  allowed, msg, tier = check_access(api_key)
298
330
  if not allowed:
299
331
  return {"error": msg, "upgrade_url": "https://meok.ai/pricing"}
@@ -313,7 +345,23 @@ def run_tests(test_command: str = "python -m pytest", working_dir: str = "",
313
345
  timeout: int = 60, api_key: str = "") -> dict:
314
346
  """Run a test suite and return results. Default: pytest.
315
347
  Specify working_dir to run tests in a specific project directory.
316
- Returns stdout, stderr, exit code, and pass/fail summary."""
348
+ Returns stdout, stderr, exit code, and pass/fail summary.
349
+
350
+ Behavior:
351
+ This tool is read-only and stateless — it produces analysis output
352
+ without modifying any external systems, databases, or files.
353
+ Safe to call repeatedly with identical inputs (idempotent).
354
+ Free tier: 10/day rate limit. Pro tier: unlimited.
355
+ No authentication required for basic usage.
356
+
357
+ When to use:
358
+ Use this tool when you need structured analysis or classification
359
+ of inputs against established frameworks or standards.
360
+
361
+ When NOT to use:
362
+ Not suitable for real-time production decision-making without
363
+ human review of results.
364
+ """
317
365
  allowed, msg, tier = check_access(api_key)
318
366
  if not allowed:
319
367
  return {"error": msg, "upgrade_url": "https://meok.ai/pricing"}
@@ -370,7 +418,23 @@ def run_tests(test_command: str = "python -m pytest", working_dir: str = "",
370
418
  def read_file(path: str, limit: int = 200, api_key: str = "") -> dict:
371
419
  """Read contents of a file (restricted to allowed directories: Desktop,
372
420
  Documents, Downloads, /tmp, and the sandbox). Returns file content with
373
- line limit."""
421
+ line limit.
422
+
423
+ Behavior:
424
+ This tool is read-only and stateless — it produces analysis output
425
+ without modifying any external systems, databases, or files.
426
+ Safe to call repeatedly with identical inputs (idempotent).
427
+ Free tier: 10/day rate limit. Pro tier: unlimited.
428
+ No authentication required for basic usage.
429
+
430
+ When to use:
431
+ Use this tool when you need structured analysis or classification
432
+ of inputs against established frameworks or standards.
433
+
434
+ When NOT to use:
435
+ Not suitable for real-time production decision-making without
436
+ human review of results.
437
+ """
374
438
  allowed, msg, tier = check_access(api_key)
375
439
  if not allowed:
376
440
  return {"error": msg, "upgrade_url": "https://meok.ai/pricing"}
@@ -406,7 +470,23 @@ def read_file(path: str, limit: int = 200, api_key: str = "") -> dict:
406
470
  @mcp.tool()
407
471
  def list_sandbox_files(api_key: str = "") -> dict:
408
472
  """List files in the sandbox working directory. All code execution
409
- artifacts are stored here temporarily."""
473
+ artifacts are stored here temporarily.
474
+
475
+ Behavior:
476
+ This tool is read-only and stateless — it produces analysis output
477
+ without modifying any external systems, databases, or files.
478
+ Safe to call repeatedly with identical inputs (idempotent).
479
+ Free tier: 10/day rate limit. Pro tier: unlimited.
480
+ No authentication required for basic usage.
481
+
482
+ When to use:
483
+ Use this tool when you need structured analysis or classification
484
+ of inputs against established frameworks or standards.
485
+
486
+ When NOT to use:
487
+ Not suitable for real-time production decision-making without
488
+ human review of results.
489
+ """
410
490
  allowed, msg, tier = check_access(api_key)
411
491
  if not allowed:
412
492
  return {"error": msg, "upgrade_url": "https://meok.ai/pricing"}
@@ -430,7 +510,23 @@ def list_sandbox_files(api_key: str = "") -> dict:
430
510
  @mcp.tool()
431
511
  def get_safety_rules(api_key: str = "") -> dict:
432
512
  """Get the current safety rules and blocked patterns for code execution.
433
- Useful for understanding what is and isn't allowed."""
513
+ Useful for understanding what is and isn't allowed.
514
+
515
+ Behavior:
516
+ This tool is read-only and stateless — it produces analysis output
517
+ without modifying any external systems, databases, or files.
518
+ Safe to call repeatedly with identical inputs (idempotent).
519
+ Free tier: 10/day rate limit. Pro tier: unlimited.
520
+ No authentication required for basic usage.
521
+
522
+ When to use:
523
+ Use this tool when you need structured analysis or classification
524
+ of inputs against established frameworks or standards.
525
+
526
+ When NOT to use:
527
+ Not suitable for real-time production decision-making without
528
+ human review of results.
529
+ """
434
530
  allowed, msg, tier = check_access(api_key)
435
531
  if not allowed:
436
532
  return {"error": msg, "upgrade_url": "https://meok.ai/pricing"}
@@ -1,69 +0,0 @@
1
- # Code Executor MCP Server
2
-
3
- > By [MEOK AI Labs](https://meok.ai) — Sandboxed code execution for Python, JavaScript, and shell commands with safety guards
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pip install code-executor-mcp
9
- ```
10
-
11
- ## Usage
12
-
13
- ```bash
14
- python server.py
15
- ```
16
-
17
- ## Tools
18
-
19
- ### `execute_code`
20
- Execute code in a sandboxed environment with safety checks. Dangerous patterns (os.system, eval, exec) are blocked.
21
-
22
- **Parameters:**
23
- - `code` (str): Code to execute
24
- - `language` (str): Language — 'python' or 'javascript' (default 'python')
25
- - `timeout` (int): Timeout in seconds (max 60, default 30)
26
-
27
- ### `run_command`
28
- Execute a shell command with safety filters. Destructive commands are blocked.
29
-
30
- **Parameters:**
31
- - `command` (str): Shell command
32
- - `timeout` (int): Timeout in seconds (max 60)
33
-
34
- ### `run_tests`
35
- Run a test suite and return results with pass/fail summary.
36
-
37
- **Parameters:**
38
- - `test_command` (str): Test command (default 'python -m pytest')
39
- - `working_dir` (str): Working directory
40
- - `timeout` (int): Timeout in seconds (default 60)
41
-
42
- ### `read_file`
43
- Read file contents from allowed directories (Desktop, Documents, Downloads, /tmp, sandbox).
44
-
45
- **Parameters:**
46
- - `path` (str): File path
47
- - `limit` (int): Max lines to read (default 200)
48
-
49
- ### `list_sandbox_files`
50
- List files in the sandbox working directory.
51
-
52
- ### `get_safety_rules`
53
- Get current safety rules and blocked patterns.
54
-
55
- ### `execute_code_docker`
56
- Execute code inside a temporary Docker container for full isolation.
57
-
58
- **Parameters:**
59
- - `code` (str): Code to execute
60
- - `language` (str): Language — 'python', 'node', 'bash'
61
- - `timeout_sec` (int): Timeout in seconds (default 30)
62
-
63
- ## Authentication
64
-
65
- Free tier: 50 calls/day. Upgrade at [meok.ai/pricing](https://meok.ai/pricing) for unlimited access.
66
-
67
- ## License
68
-
69
- MIT — MEOK AI Labs