Skills/PyPI/mpesa-daraja-mcp

mpesa-daraja-mcp@0.1.6

CAUTION· install only

Publisher claims: "M-Pesa Daraja toolkit: MCP server and `mpesa` CLI for STK Push, C2B, B2C, B2B, status, balance, reversal, QR, Ratiba, Bill Manager" Observed in sandbox: no network, touches nothing outside the project, writes no memory.

Registry PyPI (MCP server)Publisher mr-macharia · publishing for 25 daysInstalls 0Last detonated 3d ago

Coverage

Nothing executable in the bundle ran; the trace covers the install step only.
Tested
every file read, file written and host contacted by what ran
Not tested
use of the skill by an agent

What this means for the label: Caution here covers what ran. The server's tools were not exercised with a real credential, so nothing about their behavior is asserted; the credential summary below says what to do with that.

Before you give it your token

It will ask for
DARAJA_CALLBACK_TOKENDARAJA_CONSUMER_SECRETDARAJA_FORWARD_SECRETDARAJA_MCP_TOKENConfiguration, not credentials: DARAJA_ALLOWED_RECIPIENTS, DARAJA_APPROVAL_THRESHOLD, DARAJA_CALLBACK_BASE_URL, DARAJA_CALLBACK_LISTEN, DARAJA_CONFIG_DIR, DARAJA_CONSUMER_KEY, DARAJA_DOTENV, DARAJA_ENV, DARAJA_FORWARD_URL, DARAJA_OUTPUT_DIR, DARAJA_READ_ONLY, DARAJA_STATE_DB, DARAJA_TOOLSETS
Where it talks to
no vendor host named in the codeAlso safaricom.co.ke — not the publisher's domain; check what for before connecting.
What the honeypot saw
no credential files read · no network
What we could not test
use of the skill by an agent

Connect it with a scoped credential, under the guard, and read the third-party hosts first. The code names safaricom.co.ke as well as its own vendor. The guard injects DARAJA_CALLBACK_TOKEN, DARAJA_CONSUMER_SECRET, DARAJA_FORWARD_SECRET, DARAJA_MCP_TOKEN only into requests to the host you bind (and its subdomains) and refuses the rest.

$vet-skills run --net declared -- uvx mpesa-daraja-mcp

Never paste a credential into a chat, a ticket or a report, including ours. How the guard holds it.

Is [email protected] safe to install?

KillerSkills ran it in the KillerSkills honeypot sandbox (1 scenario; nothing executable in the bundle ran; the trace covers the install step only) on 2026-11-12 and scored it 75/100 (Caution). It is not known to be malicious, but it has behaviour or code a security policy should decide on before install. Notable findings: Access to sensitive file paths; Tunneling service URL; Access to sensitive file paths. Summary: no network, touches nothing outside the project, writes no memory.

Behavior trace

Honeypot run · 0 s · 1 scenarios · 0 deviations
t+CategoryObserved action
0.0sprocessno install scripts in bundle
0.0sprocessscript backend runs setup only
0.0sprocessscript backend runs setup only
0.0sprocessno install scripts to re-run

Static findings

MEDIUM
File permission modification commandDockerfile:9 · File permission modification command — agent changes file ownership/permissionsRUN pip install --no-cache-dir . && mkdir /data && chown mpesa /dataFix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts.
AST05
MEDIUM
Access to sensitive file pathstests/test_commands.py:126 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesenv = (tmp_path / "srv" / ".env").read_text()Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
Tunneling service URLtests/test_commands.py:218 · Tunneling service URL — may route traffic to attacker infrastructurec.print(commands._dev_screen(("https://x.trycloudflare.com", 8787, False), events))Fix: Replace encoded or assembled strings with plain literals and remove undeclared network calls.
AST07
HIGH
Access to sensitive file pathssrc/mpesa_mcp/settings.py:5 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system files2. A project `.env` in the directory the client starts the server inFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
Tunneling service URLtests/test_commands.py:199 · Tunneling service URL — may route traffic to attacker infrastructurec.print(commands._dev_screen(("https://x.trycloudflare.com", 8787, True), events))Fix: Replace encoded or assembled strings with plain literals and remove undeclared network calls.
AST07
MEDIUM
Python subprocess execution detectedsrc/mpesa_mcp/cli.py:147 · Python subprocess execution detectedres = subprocess.run(cmd, capture_output=True, text=True, timeout=60)Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05
MEDIUM
Python subprocess execution detectedsrc/mpesa_mcp/commands.py:345 · Python subprocess execution detectedproc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05
HIGH
Tunneling service URLsrc/mpesa_mcp/commands.py:339 · Tunneling service URL — may route traffic to attacker infrastructurepattern = re.compile(r"https://[a-z0-9-]+\.trycloudflare\.com")Fix: Replace encoded or assembled strings with plain literals and remove undeclared network calls.
AST07
MEDIUM
Python subprocess execution detectedsrc/mpesa_mcp/commands.py:518 · Python subprocess execution detectedres = subprocess.run(["docker", "compose", "up", "-d"], cwd=directory)Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05
MEDIUM
Access to sensitive file pathstests/conftest.py:5 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system files# module is imported, so before that: an empty config dir, no project .env, no DARAJA_* vars.Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
HIGH
Access to sensitive file pathssrc/mpesa_mcp/commands.py:496 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesenv_file = directory / ".env"Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
HIGH
Access to sensitive file pathssrc/mpesa_mcp/commands.py:494 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system files"""Self-host with Docker: writes a compose file and .env from your config, then starts it."""Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
HIGH
Access to sensitive file pathssrc/mpesa_mcp/settings.py:99 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system files"(or a project .env), then restart the MCP server."Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
Python subprocess execution detectedsrc/mpesa_mcp/cli.py:163 · Python subprocess execution detectedsubprocess.run(cmd, capture_output=True, text=True, timeout=60)Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05
HIGH
Access to sensitive file pathssrc/mpesa_mcp/settings.py:40 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesreturn Path(os.environ["DARAJA_DOTENV"]) if os.environ.get("DARAJA_DOTENV") else Path.cwd() / ".env"Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
Tunneling service URLtests/test_commands.py:213 · Tunneling service URL — may route traffic to attacker infrastructurec.print(commands._dev_screen(("https://x.trycloudflare.com", 8787, True), []))Fix: Replace encoded or assembled strings with plain literals and remove undeclared network calls.
AST07
MEDIUM
Python subprocess execution detectedsrc/mpesa_mcp/commands.py:785 · Python subprocess execution detectedraise typer.Exit(subprocess.run(cmd).returncode)Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05
HIGH
Access to sensitive file pathssrc/mpesa_mcp/commands.py:490 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesdirectory: Annotated[Path, typer.Option("--dir", help="Where to write docker-compose.yml and .env.")] = Path("mpesa-server"),Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
HIGH
Access to sensitive file pathsserver.json:144 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system files"description": "Path of a .env file to load instead of the project one",Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
HIGH
Access to sensitive file pathssrc/mpesa_mcp/commands.py:458 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesenv_file: .envFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
Access to sensitive file pathstests/test_setup.py:43 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system files(cfg / "project" / ".env").write_text("DARAJA_SHORTCODE=project\nDARAJA_PASSKEY=project\n")Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
File type combined with upload actiontests/test_fixtures.py:24 · File type combined with upload action — agent may exfiltrate local data files@pytest.mark.parametrize("case", load("phones.json")["valid"], ids=lambda c: c["input"])Fix: Remove the call, or declare the host in frontmatter and explain in the README what is sent and why.
AST07
MEDIUM
Python subprocess execution detectedtests/test_skills.py:58 · Python subprocess execution detectedres = subprocess.run([sys.executable, str(ROOT / "tools/sync_skills.py"), "--check"],Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05
MEDIUM
Python subprocess execution detectedtests/test_skills.py:97 · Python subprocess execution detectedreturn subprocess.run([sys.executable, str(ROOT / "skills" / script), *args], input=stdin,Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05
MEDIUM
Access to sensitive file pathstests/test_setup.py:34 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesf = tmp_path / ".env"Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
Access to sensitive file pathstests/test_commands.py:130 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesassert (tmp_path / "srv" / ".env").stat().st_mode & 0o077 == 0Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
Access to sensitive file pathstests/test_setup.py:23 · Access to sensitive file paths — SSH keys, AWS credentials, env files, or system filesmonkeypatch.delenv("DARAJA_DOTENV") # use ./.env in the temp project dirFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
AST05
MEDIUM
npx invocation of non-well-known packagetests/test_skills.py:23 · npx invocation of non-well-known package — may execute untrusted code# A real YAML parser: strict tools (e.g. `npx skills`) skip skills whose frontmatter isn't valid YAML.Fix: Pin versions and sources; vendor anything fetched at install time.
AST06
MEDIUM
Python subprocess execution detectedtests/test_skills.py:78 · Python subprocess execution detectedres = subprocess.run([sys.executable, str(script)], capture_output=True, text=True, cwd=tmp_path,Fix: Build commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
AST05

Cost to the agent

Instructions loaded
≈71 tok
1 file · 40 in bundle

Tokens estimated at four characters each. Skills load their instruction text when triggered; the figure is what that costs.

Known vulnerabilities

No advisories in OSV for mpesa-daraja-mcp@0.1.6 as of 3d ago. This is the package itself, not its dependencies.

What would make this Verified

5 points to 80 · weights: behavior 45%, static 25%, prompt 15%, publisher 15%
  1. Unclaimed publisher≈ +8 on the totalClaim mr-macharia: a verified publisher gets +50 on publisher trust. It is free and usually instant with GitHub sign-in.
  2. File permission modification command≈ +2 on the totalRequest the narrowest permission that works; replace wildcards with the exact paths or hosts.
  3. Access to sensitive file paths≈ +2 on the totalStop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
  4. Tunneling service URL≈ +2 on the totalReplace encoded or assembled strings with plain literals and remove undeclared network calls.
  5. Python subprocess execution detected≈ +2 on the totalBuild commands from fixed arguments, never from interpolated strings; prefer an API client over shelling out.
  6. File type combined with upload action≈ +2 on the totalRemove the call, or declare the host in frontmatter and explain in the README what is sent and why.
Publish a new version to PyPI, then queue it here. Not your skill? Claim the handle to get verdict changes by email.Claim mr-machariaPropose a patch to the maintainer