@chaprola/mcp-server 1.11.2 → 1.13.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/dist/index.js +18 -1
- package/package.json +1 -1
- package/references/gotchas.md +3 -0
package/dist/index.js
CHANGED
|
@@ -119,6 +119,7 @@ const server = new McpServer({
|
|
|
119
119
|
- "Concurrent writes will conflict" → Wrong. The merge-file model is concurrency-safe with dirty-bit checking. Multiple writers are handled transparently.
|
|
120
120
|
- "Only for AI agents" → Wrong. Every operation is a plain HTTP POST. React, Laravel, Python, curl — any HTTP client works. The MCP server is a convenience wrapper.
|
|
121
121
|
- "Fields get truncated" → Auto-expand: if you insert data longer than a field, the format file automatically expands to fit. No manual schema management needed.
|
|
122
|
+
- "PHI flags can't be removed" → Wrong. Set phi_exempt on the project config via chaprola_config to disable all PHI detection for non-healthcare projects (e.g., video pipelines, task trackers).
|
|
122
123
|
|
|
123
124
|
**For specialized processing** (NLP, ML inference, image recognition): use external services and import results into Chaprola. Chaprola is the data and compute layer, not the everything layer.
|
|
124
125
|
|
|
@@ -456,8 +457,9 @@ server.tool("chaprola_run", "Execute a compiled .PR program. Use async:true for
|
|
|
456
457
|
async_exec: z.boolean().optional().describe("If true, run asynchronously and return job_id for polling"),
|
|
457
458
|
secondary_files: z.array(z.string()).optional().describe("Secondary files to make available"),
|
|
458
459
|
nophi: z.boolean().optional().describe("If true, obfuscate PHI-flagged fields during execution"),
|
|
460
|
+
params: z.string().optional().describe('JSON object of named params for PARAM.name fields, e.g. {"video_id": "V-AT"}. Read in programs via MOVE PARAM.name or LET Rn = PARAM.name.'),
|
|
459
461
|
userid: z.string().optional().describe("Project owner's username. Required when accessing a shared project where you are a writer. Defaults to the authenticated user."),
|
|
460
|
-
}, async ({ project, name, primary_file, record, async_exec, secondary_files, nophi, userid }) => withBaaCheck(async () => {
|
|
462
|
+
}, async ({ project, name, primary_file, record, async_exec, secondary_files, nophi, params, userid }) => withBaaCheck(async () => {
|
|
461
463
|
const { username } = getCredentials();
|
|
462
464
|
const body = { userid: userid || username, project, name };
|
|
463
465
|
if (primary_file)
|
|
@@ -470,6 +472,8 @@ server.tool("chaprola_run", "Execute a compiled .PR program. Use async:true for
|
|
|
470
472
|
body.secondary_files = secondary_files;
|
|
471
473
|
if (nophi !== undefined)
|
|
472
474
|
body.nophi = nophi;
|
|
475
|
+
if (params)
|
|
476
|
+
body.params = JSON.parse(params);
|
|
473
477
|
const res = await authedFetch("/run", body);
|
|
474
478
|
return textResult(res);
|
|
475
479
|
}));
|
|
@@ -730,6 +734,19 @@ server.tool("chaprola_intent", "Read, write, or delete project and program inten
|
|
|
730
734
|
const res = await authedFetch("/intent", body);
|
|
731
735
|
return textResult(res);
|
|
732
736
|
});
|
|
737
|
+
// --- Project Config ---
|
|
738
|
+
server.tool("chaprola_config", "Set project configuration. Currently supports phi_exempt (boolean) to disable automatic PHI detection for non-healthcare projects. Fields like step_name, task_name won't be flagged as PHI. Omit phi_exempt to read current config.", {
|
|
739
|
+
project: z.string().describe("Project name"),
|
|
740
|
+
phi_exempt: z.boolean().optional().describe("If true, disable all PHI detection and masking for this project. For non-healthcare data only."),
|
|
741
|
+
userid: z.string().optional().describe("Project owner's username. Defaults to the authenticated user."),
|
|
742
|
+
}, async ({ project, phi_exempt, userid }) => withBaaCheck(async () => {
|
|
743
|
+
const { username } = getCredentials();
|
|
744
|
+
const body = { userid: userid || username, project };
|
|
745
|
+
if (phi_exempt !== undefined)
|
|
746
|
+
body.phi_exempt = phi_exempt;
|
|
747
|
+
const res = await authedFetch("/config", body);
|
|
748
|
+
return textResult(res);
|
|
749
|
+
}));
|
|
733
750
|
// --- Optimize (HULDRA) ---
|
|
734
751
|
server.tool("chaprola_optimize", "Run HULDRA nonlinear optimization using a compiled .PR as the objective evaluator", {
|
|
735
752
|
project: z.string().describe("Project name"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaprola/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "MCP server for Chaprola — agent-first data platform. Gives AI agents tools for structured data storage, record CRUD, querying, schema inspection, documentation lookup, web search, URL fetching, scheduled jobs, scoped site keys, and execution via plain HTTP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/references/gotchas.md
CHANGED
|
@@ -107,6 +107,9 @@ Every request body's `userid` must equal your username. 403 on mismatch.
|
|
|
107
107
|
### BAA only required for PHI
|
|
108
108
|
The BAA is only needed if your data contains Protected Health Information (patient names, SSNs, dates of birth, etc.). Non-PHI data works without signing a BAA. If you get a 403 on a PHI-flagged field, either sign the BAA or rename the field to avoid PHI auto-detection.
|
|
109
109
|
|
|
110
|
+
### PHI detection on non-healthcare projects
|
|
111
|
+
If your fields get PHI-flagged incorrectly (e.g., step_name, task_name, video_name), set phi_exempt on the project via `POST /config {"userid": "...", "project": "...", "phi_exempt": true}` or `chaprola_config`. This disables all PHI detection and masking for the project.
|
|
112
|
+
|
|
110
113
|
### Async for large datasets
|
|
111
114
|
`POST /run` with `async: true` for >100K records. API Gateway has a 30-second timeout; async bypasses it. Poll `/run/status` until `status: "done"`.
|
|
112
115
|
|