|
1 | | -# MCP Examples: Financial Services on Axis2/Java + WildFly |
| 1 | +# MCP Examples: Financial Services on Axis2/Java |
2 | 2 |
|
3 | 3 | **Summary**: Apache Axis2/Java serves the same financial calculations as Axis2/C — |
4 | | -portfolio variance, Monte Carlo VaR, scenario analysis — over JSON on WildFly 32 |
5 | | -with Spring Security JWT authentication. This document shows the same live demos |
6 | | -as the Axis2/C `MCP_EXAMPLES.md`, run against the Java implementation, with |
7 | | -head-to-head performance numbers. |
| 4 | +portfolio variance, Monte Carlo VaR (GBM and Merton jump-diffusion), scenario |
| 5 | +analysis — over JSON on WildFly 32/39 and Tomcat 11 with Spring Security JWT |
| 6 | +authentication. This document shows the same live demos as the Axis2/C |
| 7 | +`MCP_EXAMPLES.md`, run against the Java implementation, with head-to-head |
| 8 | +performance numbers. |
8 | 9 |
|
9 | 10 | The financial results are identical (same algorithms, same inputs, same outputs). |
10 | 11 | The implementations compete only on performance. |
@@ -93,7 +94,7 @@ All curl examples below include paired MCP stdio equivalents. |
93 | 94 |
|
94 | 95 | --- |
95 | 96 |
|
96 | | -## Live Examples (Tested on WildFly 32) |
| 97 | +## Live Examples (Tested on WildFly 32/39 and Tomcat 11) |
97 | 98 |
|
98 | 99 | ### Portfolio Variance — 5 assets |
99 | 100 |
|
@@ -175,9 +176,12 @@ just wrapped in `tools/call` JSON-RPC as shown above.) |
175 | 176 | ### Monte Carlo VaR — 100K simulations |
176 | 177 |
|
177 | 178 | Monte Carlo Value at Risk estimates portfolio loss at a given confidence |
178 | | -level by simulating thousands of random price paths using Geometric |
179 | | -Brownian Motion: `S(t+dt) = S(t) × exp((μ − σ²/2)·dt + σ·√dt·Z)` where |
180 | | -Z ~ N(0,1). Run 100,000 paths, sort the terminal values, read off the |
| 179 | +level by simulating thousands of random price paths. The default model is |
| 180 | +Geometric Brownian Motion (GBM): `S(t+dt) = S(t) × exp((μ − σ²/2)·dt + σ·√dt·Z)` |
| 181 | +where Z ~ N(0,1). A Merton jump-diffusion model is also available |
| 182 | +(`"model":"merton"`) which adds Poisson-distributed jumps for fat-tailed |
| 183 | +scenarios — configurable via `jumpIntensity`, `jumpMean`, and `jumpVol` |
| 184 | +parameters. Run 100,000 paths, sort the terminal values, read off the |
181 | 185 | 1st percentile loss — that's your 99% VaR. Production risk systems run |
182 | 186 | this nightly for regulatory capital calculations. |
183 | 187 |
|
@@ -583,10 +587,10 @@ GET https://localhost:8443/axis2-json-api/openapi-mcp.json |
583 | 587 | ``` |
584 | 588 |
|
585 | 589 | This endpoint returns the same tool schema structure that Claude Desktop |
586 | | -and other MCP clients consume. The three financial tools (`portfolioVariance`, |
587 | | -`monteCarlo`, `scenarioAnalysis`) are described with full input schemas, |
588 | | -parameter types, constraints, and defaults — identical in capability to the |
589 | | -Axis2/C MCP stdio server. |
| 590 | +and other MCP clients consume. The catalog includes `doLogin`, |
| 591 | +`portfolioVariance`, `monteCarlo`, and `scenarioAnalysis` — each with full |
| 592 | +input schemas, parameter types, constraints, and defaults. The three |
| 593 | +financial tools are identical in capability to the Axis2/C MCP stdio server. |
590 | 594 |
|
591 | 595 | --- |
592 | 596 |
|
@@ -685,12 +689,12 @@ See the sample READMEs for the complete test flow covering all services. |
685 | 689 |
|
686 | 690 | --- |
687 | 691 |
|
688 | | -## WildFly 32 Deployment Notes |
| 692 | +## WildFly Deployment Notes |
689 | 693 |
|
690 | 694 | See `WILDFLY32_DEPLOY_STATE.md` in the Axis2/C repo for the full deployment |
691 | | -walkthrough. Key points: |
| 695 | +walkthrough. Key points (apply to both WildFly 32 and WildFly 39): |
692 | 696 |
|
693 | | -- WildFly 32.0.1.Final with `--add-modules=java.se` in `standalone.conf` |
| 697 | +- WildFly 32.0.1.Final or WildFly 39 with `--add-modules=java.se` in `standalone.conf` |
694 | 698 | - `jboss-deployment-structure.xml` from production deployment template (includes `jdk.net` module dependency) |
695 | 699 | - `beans.xml` with `bean-discovery-mode="none"` (satisfies Weld without CDI scanning) |
696 | 700 | - Spring Boot 3.4.3 starts in ~0.9 seconds inside WildFly |
|
0 commit comments