plsql-test-mcp
This server automates IFS Cloud PL/SQL unit test generation and management for .plsql and .plsvc files, handling everything from testability analysis to test file creation and deployment preparation.
checkUnitTestability: Analyze a source file (or specific method) to determine if functions/procedures are unit testable, returning suggested@IgnoreUnitTestannotations for non-testable ones.annotateIgnoreUnitTest: Insert an@IgnoreUnitTest <reason>comment immediately before a specific method, with preview mode (confirmed=false) before writing changes.generateUnitTest: Generate or append apltstunit test block for a testable method, following IFS Developer Studio conventions including@MockTable/@MockPackageplaceholders, data-driven FOR loops, and assertions.processUnitTestCoverage: Batch process an entire source file — annotating all non-testable methods and generating all missing unit tests at once.runUnitTest: Prepare unit test execution by returninggenerate_and_deployinstructions for theifs-f1-codegen-devtool, targeting a specific database environment.runPlsqlTestWorkflow: End-to-end workflow that checks testability, annotates non-testable methods or generates tests as needed, and optionally prepares the test run — all in one step.getIgnoreUnitTestRules: Retrieve the full catalog of supported@IgnoreUnitTestannotation reasons (e.g.,DMLOperation,TrivialFunction,NoOutParams,PipelinedFunction, etc.).
Allows linking PL/SQL unit test generation and coverage to Jira issues via a jiraKey parameter.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@plsql-test-mcp Check if Is_Circular_Link___ is unit testable"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PL/SQL Test MCP
MCP server for IFS Cloud PL/SQL unit testing — mirrors the architecture of integration-testing-mcp and delegates deploy/run steps to ifs-f1-codegen-dev.
Develop MCP to identify if a function/procedure is unit testable and generate the test.
Workflow
flowchart TD
A[checkUnitTestability] --> B{Testable?}
B -->|No| C[annotateIgnoreUnitTest]
B -->|Yes| D[generateUnitTest]
D --> E[generate_code / generate_and_deploy via ifs-f1-codegen-dev]
E --> F[Verify test passes]
C --> ERelated MCP server: mcp-playwright-test
Tools
Tool | Description |
| Parse |
| Add |
| Analyze method body, generate deploy-safe mocks, data-driven FOR loops, and assertions |
| Batch: annotate all non-testable methods + generate all missing auto-safe tests for one file |
| Return |
| End-to-end: check → annotate OR generate → run prep |
| List supported ignore reasons |
Supported @IgnoreUnitTest reasons
Reason | When to use |
| Simple getter/pass-through |
|
|
| INSERT/UPDATE/DELETE/MERGE in body |
| Procedure with no OUT/IN OUT params |
| EXECUTE IMMEDIATE / dynamic SQL |
| Large object types |
| PL/SQL embedded in SQL views |
| Pipelined table functions |
Cursor integration
The server is published to npm as @vaallk/plsql-test-mcp. Add this to your Cursor MCP settings — no local clone or build required:
{
"mcpServers": {
"plsql-test": {
"command": "npx",
"args": ["-y", "@vaallk/plsql-test-mcp@0.1.12"],
"env": {
"IFS_WORKSPACE": "C:\\path\\to\\your\\workspace"
}
}
}
}IFS_WORKSPACE is machine-specific — point it at your own IFS workspace root. Use @latest instead of a pinned version to always pick up the newest release on restart.
Local development config
To run against a local build instead of the published package:
{
"mcpServers": {
"plsql-test": {
"command": "node",
"args": ["C:/ifsapps-new/plsql-test-mcp/dist/index.js"],
"env": {
"IFS_WORKSPACE": "C:\\path\\to\\your\\workspace"
}
}
}
}Development
cd c:/ifsapps-new/plsql-test-mcp
npm install
npm run build
npm startDeploy-safe generation (v0.1.4)
The generator avoids patterns that break AV_*_TST compilation:
No UTF-8 BOM on written
.pltstfilesVARCHAR2(2000)for all generated IS-section locals (bareVARCHAR2causes PLS-00215)Pre-write validation rejects bare VARCHAR2, BOM, and post-loop generated tests
Skips
%ROWTYPEreturn types andSELECT * INTO %ROWTYPE(manual test required)Skips CRUD modify methods using
Get_Object_By_Id___+Unpack___Expression SELECT columns (
round(cast(...))) mapped to safe mock column namesFOR loop column order matches IFS convention:
expected_ | input_param_Not-found cases stay inside the FOR loop (no post-loop statements)
Skips
@IgnoreUnitTestwhen the method already has a UNITTEST blockSpecial mocks for
Get_Wp_Id,Has_Skills_Assigned_In_Turn,Get_Fault_Id_From_Record_Id,Get_AOS_Days,Get_Hm_Contract_Id_By_Barcode
Derived value mapping (v0.1.12)
Getters that fetch a value but return a derived label/status via a post-fetch IF/ELSE are detected so the test asserts the mapped result, not the raw fetched value:
Column null-check —
SELECT colthenIF col IS NULL THEN 'A' ELSE 'B'(e.g.Get_Measurment_Status→'Pending'/'Signed'). The mock uses one non-null row and oneNULLrow.Count positive —
SELECT COUNT(*)thenIF cnt > 0 THEN 'A' ELSE 'B'(e.g.Is_Part_Warnings_Exist→'TRUE'/'FALSE'). The mock provides matching rows for the "present" key and a missing key for the "absent" case.
Both direct-RETURN and result-variable assignment styles are supported; ELSIF multi-branch mappings are left for manual tests.
Batch coverage example
processUnitTestCoverage({
sourceFile: "C:/ifsapps-new/workspace/adcom/source/adcom/database/AvFault.plsql",
workspace: "C:/ifsapps-new/workspace",
jiraKey: "PJZ-12345",
confirmed: true
})Example
Analyze McprActivityRelation.plsql:
checkUnitTestability({
sourceFile: "C:/ifsapps-new/workspace/prjrep/source/prjrep/database/McprActivityRelation.plsql",
methodName: "Is_Circular_Link___"
})Generate test:
generateUnitTest({
sourceFile: ".../McprActivityRelation.plsql",
methodName: "Is_Circular_Link___",
workspace: "C:/ifsapps-new/workspace",
jiraKey: "PJZ-12345",
confirmed: true
})Run via ifs-f1-codegen-dev:
generate_and_deploy({
input_files: [".../McprActivityRelation.plsql", ".../McprActivityRelation.pltst"],
environment_key: "26r1-dev-lkp",
workspace: "C:/ifsapps-new/workspace",
confirmed: true
})Note on plvst
IFS uses .pltst files for both .plsql and .plsvc unit tests. No separate .plvst extension exists in the codebase — this MCP targets .pltst.
Related
integration-testing-mcp — reference MCP architecture
ifs-f1-codegen-dev — code generation, SQLcl deploy, live DB inspect
Available Tools
6 toolsannotateIgnoreUnitTestA
Insert @IgnoreUnitTest immediately before a method in a .plsql/.plsvc file. Call with confirmed=false first to preview, then confirmed=true to write.
Inputs: reason (required), methodName (required), sourceFile (required), confirmed.
checkUnitTestabilityA
Analyze an IFS .plsql or .plsvc source file and determine whether each function/procedure is unit testable with pltst. Returns suggested @IgnoreUnitTest annotations when not testable.
Inputs: sourceFile (required), methodName.
generateUnitTestB
Generate or append a pltst unit test block for a testable method. Follows IFS Developer Studio pltst conventions with @MockTable/@MockPackage placeholders.
Inputs: methodName (required), sourceFile (required), jiraKey, confirmed, +1 more.
getIgnoreUnitTestRulesB
Return the catalog of supported @IgnoreUnitTest annotation reasons used in IFS.
Inputs: no named parameters.
runPlsqlTestWorkflowC
End-to-end workflow: check testability → annotate if needed OR generate pltst → optionally prepare test run via ifs-f1-codegen-dev.
Inputs: sourceFile (required), jiraKey, confirmed, workspace, +2 more.
runUnitTestC
Prepare PL/SQL unit test execution by returning ifs-f1-codegen-dev generate_and_deploy instructions for the source + pltst files.
Inputs: sourceFile (required), confirmed, workspace, methodName, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct, non-overlapping purpose: annotation insertion, testability analysis, test generation, rule retrieval, workflow orchestration, and test execution preparation. No two tools could be confused.
All names follow a consistent camelCase verb_noun pattern, with clear verbs (annotate, check, generate, get, run) and specific nouns. The pattern is uniform and predictable.
Six tools is ideal for this domain. Each tool covers a necessary step in the testing workflow without unnecessary redundancy or gaps, making the set well-scoped.
The tools cover the entire lifecycle: checking testability, annotating non-testable methods, generating tests, retrieving rules, and preparing for execution. The workflow tool ties it together, leaving no dead ends.
Related MCP Connectors
MCP server for Codat — companies, connections, invoices, bills and financial statements.
MCP server for Product Management
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for Appcircle mobile CI/CD platform.
Related MCP Servers
- AlicenseCqualityDmaintenanceMCP server for TestNeo quality workflows, enabling test generation, execution, and analysis through MCP-compatible IDE clients.4812 npmGPL 3.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that automates Playwright-based UI and API testing, supporting test case generation from requirements or API specs, and execution with detailed reports.8 npm1MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that provides code validation rules and analysis for various stacks/frameworks, enabling automated code reviews and reporting directly from VS Code and other editors.-
- AlicenseBqualityDmaintenanceMCP server for integrating coding agents (Claude Code CLI, etc.) with the GIMS Automation system. Enables development of automation scripts, data source types, activator types, and Git synchronization.61MIT