@jatimprovcsirt/panda-mcp 0.0.0-stage → 0.1.0
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.
- package/LICENSE +22 -0
- package/README.md +143 -2
- package/dist/index.js +2924 -0
- package/docs/installation.md +145 -0
- package/docs/security/SECURITY.md +52 -0
- package/docs/security/VERIFYING.md +156 -0
- package/package.json +55 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dinas Komunikasi dan Informatika Provinsi Jawa Timur
|
|
4
|
+
Bidang Persandian dan Keamanan Aplikasi
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,144 @@
|
|
|
1
|
-
#
|
|
1
|
+
# PANDA MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An MCP server that gives AI coding assistants accurate, version-matched knowledge of **PANDA** — the field-level encryption SDK for Indonesian government applications — plus a validator for PANDA usage in an existing codebase.
|
|
4
|
+
|
|
5
|
+
PANDA is new and niche. Large language models have never seen it, so when a developer asks an assistant to "encrypt the NIK column using PANDA", the assistant will confidently invent an API that does not exist. This server exists to stop that: it gives the assistant the real documentation, and checks the code it produces.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What this server can see
|
|
10
|
+
|
|
11
|
+
> **This server reads files under the project root you configure. It never writes any file. It makes no network requests. It never holds, reads, requests, or has access to an encryption key. It performs no cryptographic operation.**
|
|
12
|
+
|
|
13
|
+
Every clause is verifiable by reading the source, and `docs/security/VERIFYING.md` explains how to check each one. The repository is public specifically so that this is possible — asking you to run a closed-source tool over your codebase while assuring you it is safe would be the wrong way round.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Why it cannot encrypt anything
|
|
18
|
+
|
|
19
|
+
This is the first question everyone asks, so it is answered here rather than buried.
|
|
20
|
+
|
|
21
|
+
**The leak is in the argument, not the return value.**
|
|
22
|
+
|
|
23
|
+
- `decrypt(envelope)` returns `32************01`. PANDA masks by default, so this is safe by design.
|
|
24
|
+
- `encrypt("3201012501990001")` puts the NIK into the model's context **as a tool argument** — regardless of what comes back.
|
|
25
|
+
|
|
26
|
+
That asymmetry is why the safe design is not "crypto operations, but with a warning". A warning cannot fix an argument-side leak, and it is a policy rather than a control. A model's context window is a system that does not need your citizens' personal data, so this server is not a path into it.
|
|
27
|
+
|
|
28
|
+
There is no `encrypt`, `decrypt`, `mask`, or `blind_index` tool, under any configuration. This is a design invariant, not a roadmap gap.
|
|
29
|
+
|
|
30
|
+
### What to use instead
|
|
31
|
+
|
|
32
|
+
| You want to | Use |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Encrypt/decrypt at runtime in your application | The PANDA SDK — [PHP](https://github.com/jatimprovcsirt/panda-php), [Node.js](https://github.com/jatimprovcsirt/panda-node), [Go](https://github.com/jatimprovcsirt/panda-go), [Python](https://github.com/jatimprovcsirt/panda-py) |
|
|
35
|
+
| Run a one-off operation from a terminal | The PANDA CLI |
|
|
36
|
+
| Call PANDA from a language with no SDK | `panda-docker` — the REST/gRPC service |
|
|
37
|
+
| **Write correct PANDA code** | **This server** |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```jsonc
|
|
44
|
+
// Claude Code / Claude Desktop / Cursor — mcp.json or equivalent
|
|
45
|
+
{
|
|
46
|
+
"mcpServers": {
|
|
47
|
+
"panda": {
|
|
48
|
+
"command": "npx",
|
|
49
|
+
"args": ["-y", "@jatimprovcsirt/panda-mcp"]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Documentation-only mode, which reads no local files at all:
|
|
56
|
+
|
|
57
|
+
```jsonc
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"panda": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["-y", "@jatimprovcsirt/panda-mcp", "--docs-only"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Air-gapped installs are supported — see `docs/installation.md`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Tools
|
|
73
|
+
|
|
74
|
+
### Documentation
|
|
75
|
+
|
|
76
|
+
| Tool | Purpose |
|
|
77
|
+
|---|---|
|
|
78
|
+
| `search_docs` | Search bundled documentation, returns cited excerpts |
|
|
79
|
+
| `get_api_reference` | Look up how an operation is called in a specific language |
|
|
80
|
+
| `get_setup_guide` | Setup steps for a chosen key provider |
|
|
81
|
+
| `compare_key_providers` | Local vs Vault vs Infisical |
|
|
82
|
+
| `get_envelope_spec` | The canonical v1 wire format |
|
|
83
|
+
| `get_server_info` | Version, bundled content, active tools |
|
|
84
|
+
|
|
85
|
+
Every response carries a citation (`repo/path@commit`), so a wrong answer is traceable to a documentation bug rather than being invisible.
|
|
86
|
+
|
|
87
|
+
### Validation (Tier 2)
|
|
88
|
+
|
|
89
|
+
| Tool | Purpose |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `validate_implementation` | Static analysis — read-only, never modifies files |
|
|
92
|
+
| `explain_envelope` | Envelope metadata and structural validity. Does not decrypt; the server has no key. |
|
|
93
|
+
| `scaffold_integration` | Propose an integration — a migration, the framework wiring, and configuration. **Returns the files; writes nothing.** |
|
|
94
|
+
|
|
95
|
+
Tier 2 tools are **not registered** under `--docs-only`. This is not cosmetic: a model cannot call a tool that was never registered, so the flag is a real reduction in what the server can reach.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Commands
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
panda-mcp # full tool set
|
|
103
|
+
panda-mcp --docs-only # documentation tools only; reads no local files
|
|
104
|
+
panda-mcp --help
|
|
105
|
+
panda-mcp --version
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## For security reviewers
|
|
111
|
+
|
|
112
|
+
The claims above are meant to be checked, not believed.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm run check:no-network # fails if any network API, HTTP client, or network transport appears
|
|
116
|
+
npm run check:content # fails if the bundled documentation is stale
|
|
117
|
+
npm run check:version # fails if the reported version drifts from package.json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`check:no-network` is wired into CI. It greps the source for `fetch`, `http.request`, sockets, WebSocket, and known HTTP clients, and fails the build if any appear — alongside a check that no HTTP or SSE transport is imported. The stdio transport is the only one present.
|
|
121
|
+
|
|
122
|
+
`docs/security/VERIFYING.md` walks through confirming each clause independently, including running the server with network access blocked.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Development
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npm install
|
|
130
|
+
npm run build:content # bundle documentation from the sibling PANDA repositories
|
|
131
|
+
npm run build
|
|
132
|
+
npm test
|
|
133
|
+
npm run typecheck
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`PANDA_SOURCE_ROOT` tells the content generator where the PANDA repositories live. It defaults to the parent directory of this repo.
|
|
137
|
+
|
|
138
|
+
The content bundle is **generated, not hand-written**. Hand-copied documentation is how a project ends up with two sources of truth and no way to tell which is current — the generator plus `check:content` exists to make that impossible.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Licence
|
|
143
|
+
|
|
144
|
+
MIT
|