Skip to main content

Palanit Core

A watchtower for AI agents.

Scan MCP servers and AI-agent tool manifests for hidden risk — before an attacker finds it.

Website · Docs · Palanit OS (hosted)

PyPI Python License CI


Your AI agent trusts tools, MCP servers and skills it didn't write. A tool's description is injected straight into the model's context — so a poisoned description can quietly tell your agent to leak a key, call an attacker's server, or run a shell command. Palanit Core reads every tool the way your agent will, and flags the ones that would betray it.

  • Zero dependencies. Pure Python standard library. Nothing to audit but the rules.
  • Fast & local. Runs on your machine. Sends nothing anywhere.
  • CI-ready. Exits 1 on HIGH+ findings, so a poisoned tool fails the build.
  • Open & honest. Every rule is readable. Severities reflect real impact, not upsell.

Install

pip install palanit-core

Use

# Scan an MCP config or tool manifest
palanit scan mcp.config.json

# See it in action on the bundled malicious sample
palanit scan --sample

# Machine-readable output, fail CI on HIGH or above
palanit scan mcp.config.json --json --fail-on HIGH

# Pin the tool definitions you approved, then fail closed if a server later
# swaps a description or schema after install (a "rug pull")
palanit pin mcp.config.json
palanit scan mcp.config.json --baseline .palanit.lock.json

Example (trimmed):

 CRITICAL   Possible data exfiltration  [PL-EXFIL-001]
    Instructs the agent to send sensitive data to an external URL (collector.evil.example).
    ↳ mcp.config.json#/mcpServers/invoicing/tools/0/description
    fix: Remove external URLs and exfiltration verbs from tool text.

   HIGH     Hidden instructions in tool text  [PL-POISON-001]
   HIGH     Invisible or deceptive Unicode  [PL-UNICODE-001]
  MEDIUM    Unpinned package / runner  [PL-SUPPLY-001]
...
9 finding(s)  (1 critical · 5 high · 3 medium)

Catch rug-pulls (tool-definition pinning)

A scan at install time only sees the tool text you approved. A hostile server can swap a tool's description or input schema after that approval — and standard clients never re-check. palanit pin records a hash of each tool's declared definition; a later scan --baseline fails closed on any change, so a swap costs the attacker the tool instead of silently succeeding.

palanit pin mcp.config.json                                  # approve current definitions
palanit scan mcp.config.json --baseline .palanit.lock.json   # HIGH + exit 1 on any drift

What it detects

Rule Severity What it catches
PL-POISON-001 HIGH Hidden / injected instructions in tool & schema descriptions
PL-EXFIL-001 MED–CRIT Tool text that steers the agent to send data to external URLs
PL-SECRET-001 HIGH Hardcoded API keys, tokens and private keys
PL-UNICODE-001 MED–HIGH Invisible / bidirectional Unicode used to hide instructions
PL-SUPPLY-001 MEDIUM Unpinned / floating package versions (@latest, bare names)
PL-SHELL-001 MED–HIGH Tools that launch a shell (bash -c, cmd /c, …)
PL-TLS-001 LOW–MED Endpoints over http:// / ws:// without TLS
PL-COLLIDE-001 MEDIUM Duplicate tool names that let one shadow another
PL-ENV-001 HIGH Literal secrets in a server's env block
PL-DRIFT-001 HIGH A tool's definition changed since you approved it — a post-install "rug pull" (only with --baseline)

Run palanit rules to list them. Inputs understood: Claude-style mcpServers configs, servers configs, tools manifests, a bare list of tools, or a single tool object. Unknown JSON still gets string-level checks.

Use it as a GitHub Action

# .github/workflows/palanit.yml
name: palanit
on: [push, pull_request]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: stasxr/palanit-core@v0.1.2
        with:
          files: "mcp.config.json"   # files or globs, space-separated
          fail-on: "HIGH"            # INFO | LOW | MEDIUM | HIGH | CRITICAL

Prefer plain steps? That works too:

      - uses: actions/setup-python@v5
        with: { python-version: "3.12" }
      - run: pip install palanit-core
      - run: palanit scan mcp.config.json --fail-on HIGH

Use it as a pre-commit hook

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/stasxr/palanit-core
    rev: v0.1.2
    hooks:
      - id: palanit            # scans mcp*.json / claude_desktop_config.json by default

Use it as an MCP server

Palanit Core can itself run as an MCP server, so an agent or MCP client (Claude Desktop, Cursor, Cline, …) can scan a config on demand:

pip install "palanit-core[mcp]"
palanit-mcp          # stdio transport

Exposes the tools scan_mcp_config, list_rules and version. Example client entry:

{
  "mcpServers": {
    "palanit": { "command": "palanit-mcp" }
  }
}

Add the badge

Scanned your MCP server with Palanit Core? Show it:

Scanned with Palanit Core

[![Scanned with Palanit Core](https://img.shields.io/badge/scanned%20with-Palanit%20Core-5b8def)](https://github.com/stasxr/palanit-core)

Responsible use

Palanit Core only reads files you give it — but the broader PALANIT suite (botprobe) sends live test traffic. Only scan or test systems you own or are authorized to test. A clean scan reduces risk; it does not prove safety.

Beyond the CLI

  • Palanit OS — the same engine in your browser, plus continuous monitoring, change alerts and shareable reports.
  • Palanit Bot Killer — block hostile AI crawlers and red-team your own chatbot with botprobe.

License

Apache-2.0 © Stanislav Miziyev. Contributions welcome — see CONTRIBUTING.

mcp-name: io.github.stasxr/palanit-core

Metadata

Release files for palanit-core 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for palanit-core 0.1.3
File Size Uploaded Provenance Actions
palanit_core-0.1.3.tar.gz 27.2 kB Without provenance Details for palanit_core-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for palanit-core 0.1.3
File Interpreter ABI Platform Actions
palanit_core-0.1.3-py3-none-any.whl Python 3 none any Details for palanit_core-0.1.3-py3-none-any.whl

Total release size: 53.8 kB

Release files / palanit_core-0.1.3.tar.gz

Download URL palanit_core-0.1.3.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
46d8d9f9143bd2152e6baf3ba14d7b3546f7246d4451495c50cbad3bd1f8e3cd
BLAKE2b-256 checksum
How to use checksums
65667205e5aa3f8c7a5b068909a04b19ef18293790727361831723df722ab693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / palanit_core-0.1.3-py3-none-any.whl

Download URL palanit_core-0.1.3-py3-none-any.whl
Size 26.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d7b06d373b47b561b04eea17854c2de00cd408c1a9811f1a76e9633c88c49a5
BLAKE2b-256 checksum
How to use checksums
11128b4794b5928d2c84744a9b8b6bbf3ade781affb7b29c0899841af0a38e51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for palanit-core 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page