Skip to content

Commit 822aa78

Browse files
committed
Add Adabas MCP demo server
1 parent 1954841 commit 822aa78

4 files changed

Lines changed: 914 additions & 1 deletion

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# .env.example
22
CONNX_DSN=your_dsn_name
3+
CONNX_DSN_ADABAS=your_adabas_dsn_name
34
CONNX_USER=your_username
45
CONNX_PASS=your_password
56
CONNX_TIMEOUT=30

README.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Contact Demos Economacos (demos.economacos (at) softwareag.com) for any question
3030
- MCP tools: For example `query_connx`, `find_customers`, and `count_customers`.
3131
- Resources: Schema discovery.
3232
- Async support for efficiency.
33+
- Optional split-server pattern: run separate MCP servers for VSAM and Adabas demos to keep tool routing clear.
3334

3435
## Prerequisites
3536

@@ -99,12 +100,15 @@ Create a `.env` file in the project root. The easiest way is to copy `.env.examp
99100

100101
```dotenv
101102
CONNX_DSN=your_connx_dsn_name
103+
CONNX_DSN_ADABAS=your_adabas_dsn_name
102104
CONNX_USER=your_username
103105
CONNX_PASS=your_password
104106
CONNX_TIMEOUT=30
105107
CONNX_MAX_ROWS=1000
106108
```
107109

110+
`CONNX_DSN` is used by the VSAM-focused sample server in `connx_server.py`. `CONNX_DSN_ADABAS` is reserved for a separate Adabas-focused server entrypoint in `connx_server_adabas.py`.
111+
108112
### Connection String Format
109113

110114
Most users do not need to edit `connx_server.py`. The server reads the environment variables above and builds the connection string internally like this:
@@ -144,6 +148,15 @@ This server is designed to be launched by an MCP host (e.g., Claude Desktop) usi
144148

145149
You typically do not run the Python code manually except for smoke testing.
146150

151+
### Separate VSAM and Adabas Servers
152+
153+
For demos that target multiple backends, the simplest setup is to run separate MCP servers instead of combining everything into one tool surface:
154+
155+
- `connx_server.py`: VSAM-focused server with purpose-built demo tools
156+
- `connx_server_adabas.py`: Adabas-focused read-only server for `EMPLOYEES` and `VEHICLES`, plus schema discovery
157+
158+
This keeps Claude from having to guess between VSAM-specific and Adabas-specific datasets when both are available in the same host.
159+
147160
---
148161

149162
## MCP Tools
@@ -296,7 +309,7 @@ The CONNX MCP demo uses 3 Mainframe VSAM datasets. COBOL copybooks were used to
296309

297310
---
298311

299-
## Sample Questions
312+
## Sample VSAM Questions
300313

301314
- How many customers do we have in total?
302315
- Which customers live in California?
@@ -306,6 +319,18 @@ The CONNX MCP demo uses 3 Mainframe VSAM datasets. COBOL copybooks were used to
306319
- Do we have any customers missing phone numbers?
307320
- What products are most frequently ordered by customers?
308321

322+
### Sample Adabas Questions
323+
324+
- How many employees do we have in the Adabas server?
325+
- How many vehicles are assigned in the Adabas server?
326+
- Show me employee details for personnel ID `50005600`.
327+
- Show me vehicles for employee `50005600`.
328+
- Which departments have the most vehicles?
329+
- Which departments have the most leased vehicles?
330+
- Which countries have the most assigned vehicles?
331+
- Show me employees in Paris.
332+
- What vehicle makes appear most often?
333+
309334
---
310335

311336
### What MCP tools are available for the CONNX?
@@ -362,6 +387,39 @@ Resources (not tools, but available via MCP resources)
362387

363388
The tools follow a pattern of providing both low-level SQL access (`query_connx`) and high-level purpose-built tools for common operations.
364389

390+
### Adabas Tool Summary
391+
392+
If you run `connx_server_adabas.py`, the Adabas-focused server exposes read-only tools around `EMPLOYEES` and `VEHICLES`.
393+
394+
Core Adabas tools
395+
396+
- `query_connx` - Execute read-only SELECT queries against the Adabas DSN
397+
- `describe_server` - Return Adabas server metadata and advertised capabilities
398+
399+
Adabas entity tools
400+
401+
- `count_employees` - Count employee records
402+
- `count_vehicles` - Count vehicle records
403+
- `get_employee` - Return a single employee by `PERSONNEL_ID`
404+
- `get_vehicles_for_employee` - List vehicles assigned to one employee
405+
- `find_employees_by_city` - Find employees by city
406+
- `employees_with_vehicles` - Return joined employee and vehicle rows
407+
408+
Adabas analytics tools
409+
410+
- `vehicles_by_department` - Count assigned vehicles by department
411+
- `leased_vehicles_by_department` - Count leased vehicles by department
412+
- `vehicles_by_country` - Count assigned vehicles by employee country
413+
- `vehicle_summary_by_make` - Count vehicles by make
414+
415+
Adabas metadata tools/resources
416+
417+
- `describe_entities` - Describe the `employees` and `vehicles` entities
418+
- `count_entities` - Count rows for a known Adabas entity alias
419+
- `schema://domain/employees` - Employee metadata
420+
- `schema://domain/vehicles` - Vehicle metadata
421+
- `semantic://entities` - Employee/vehicle relationship metadata
422+
365423
---
366424

367425
## Testing
@@ -604,6 +662,21 @@ CONNX communicates with VSAM on the z/OS Mainframe.
604662
![img.png](images/select_customers.png)
605663
---
606664

665+
## Example Adabas Questions for Claude
666+
667+
When `connx_server_adabas.py` is configured in Claude Desktop, these prompts are good demo starters:
668+
669+
- "How many employees are in the Adabas server?"
670+
- "Show me vehicles by department."
671+
- "Which departments have the most leased vehicles?"
672+
- "Show me vehicles assigned to personnel ID 50005600."
673+
- "Find employees in Paris."
674+
- "Which countries have the most company vehicles?"
675+
676+
These tend to steer Claude toward the purpose-built Adabas tools instead of raw SQL.
677+
678+
---
679+
607680
## Summary
608681

609682
- `query_connx` is used for read-only SQL queries

0 commit comments

Comments
 (0)