Skip to main content
Glama
yokko001

Company Secure Python MCP

by yokko001

Company Secure Python MCP

This is a clean-room-designed minimal MCP server intended for use only from Copilot Studio. It does not reuse code from the old m365-copilot-companion-mcp. Treating the audit report in the parent directory as negative requirements, the feature set has been reduced to six tools.

Its current positioning is a "security-reviewable reference implementation." Do not deploy it to production until you have configured a dedicated VM or dedicated rootless Docker, Entra ID, TLS termination, key ACLs, an internal registry, and DLP/SIEM, and completed real Docker integration testing.

Features provided

Tool

Function

Main constraints

workspace_list

Single-level listing

Common input, user's own input, and user's own output only; up to 200 items

workspace_read_text

UTF-8 text reading

Allowed extensions, 1 MiB, up to 200,000 characters, untrusted data display

workspace_write_text

Create new text

User's own output only; no overwrite or deletion; allowed extensions only

python_prepare

Pin the execution request

Pins the code, input hashes, and output names; does not execute

python_status

Check the status of the user's own requests

Does not return code bodies or approval signatures

python_run

Execute approved requests

Out-of-band signature, one-time only, Docker, no network

Email, calendar, clipboard, registry, ODBC, web fetching, arbitrary URLs, Shell, PowerShell, package installation, self-update, auto-start, browser automation, Tool Forge, tunnels, and generic tool relay are not implemented.

Related MCP server: AI Workspace MCP Server

Trust boundary

flowchart LR
    CS[Copilot Studio] -->|OAuth 2.0 delegated token / TLS| RP[Reverse proxy / WAF]
    RP -->|loopback or private hop| MCP[6-tool MCP service]
    MCP -->|JWKS only| ENTRA[Microsoft Entra ID]
    MCP -->|scoped access| WS[Per-user workspace]
    MCP -->|immutable request| Q[Control queue]
    REVIEW[Separate reviewer account] -->|Ed25519 signed approval| Q
    Q -->|one-time claim| RUN[Dedicated/rootless Docker runner]
    RUN -->|network=none / read-only / limits| JOB[Python container]
    JOB -->|declared UTF-8 outputs only| WS
    MCP -->|HMAC chain; no content| AUDIT[Audit log -> SIEM]

The approval private key is not passed to the MCP service. The MCP service holds only the approval public key and the audit key. Python code is not executed with the host Python, and there is no fallback to local execution.

Documents to read first

Verification in the development environment

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install uv
.\.venv\Scripts\uv.exe sync --frozen --extra dev
.\scripts\Invoke-SecurityChecks.ps1 -PythonExecutable .\.venv\Scripts\python.exe

In production, do not install directly from PyPI on the internet; use an approved internal mirror and the pinned hashes in requirements.lock. uv.lock also pins the development and verification environments. .env is not loaded. Configuration is passed from the service management platform to the process environment.

Python job contract

  • Input: /work/input/manifest.json and /work/input/<固定名> (read-only)

  • Output: /work/output/<python_prepareで宣言したファイル名>

  • Public name: created as a new file in the user's own output as <request-id>-<連番>.<拡張子> to prevent collisions

  • Output formats: UTF-8 .txt, .md, .csv, .json

  • Standard output and standard error: discarded and not returned to the model

  • Network: none

  • Execution time: 60 seconds by default, 300 seconds maximum

  • Memory: 256 MiB, CPU: 1, PID: 64

The AST import allowlist is defense in depth and is not considered a Python sandbox. The actual boundary is out-of-band approval and OS isolation via a dedicated VM/rootless Docker.

If successful docker rm -f cannot be confirmed at timeout, the runner is placed in a quarantine state, all subsequent Python executions are refused, and the execution directory is preserved. It will not resume until an operator destroys and rebuilds the dedicated VM.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides secure, sandboxed file system access for AI assistants to read, write, and manage project files with controlled command execution capabilities, all confined to a designated workspace directory.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides a secure workspace for AI-driven file management and Python script execution designed to run on Vercel. It enables tools for full file operations and code execution within a sandboxed environment.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides a secure, constrained filesystem workspace for LLM agents to manage files, notes, and code artifacts via stdio or remote HTTP. It features granular access controls, including extension whitelisting, storage quotas, and immutable paths for safe automated file operations.
    BSD 3-Clause
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables LLMs to execute Python code securely in a sandboxed environment. Supports configurable restrictions like no network access and returns results including files.
    MIT

View all related MCP servers

Related MCP Connectors

  • Securely search and manage workspace context files for AI agents and teams.

  • Runtime permission, approval, and audit layer for AI agent tool execution.

  • Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yokko001/m365-copilot-secure-python-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server