Skip to main content
Glama
Enterprise Integration Engine

Enterprise Integration Engine

by berkeleyo
README.md
# Enterprise Integration Engine

A production-oriented, vendor-neutral integration and workflow orchestration platform for connecting engineering knowledge systems, multi-cloud infrastructure, and enterprise IT service management workflows.

Model Context Protocol (MCP) is supported as one of the integration protocols for AI-driven operational workflows.

This project is not a chatbot. It provides governed enterprise integration capabilities with policy enforcement, explicit approvals for writes, and evidence-backed workflow execution.

## Release status

- Version target: `v0.2.0`
- Support level: engineering reference implementation
- Production claim: not production-certified
- Repository status: stable `v0.2.0` reference baseline

## Verified vs simulated behavior

- Live-verified integrations in this repository:
  - MCP server runtime using the official Python MCP SDK
  - Local Markdown knowledge provider
  - Workflow state machine, approval gate, and audit events
- Conditionally live when environment credentials are provided:
  - AWS read-only discovery via Boto3
  - Azure read-only discovery via Azure Identity and Resource SDK
  - ServiceNow or Freshservice search/create operations
  - GitHub Markdown journal retrieval and update
- Adapter implementations present but not live-validated in CI:
  - Confluence REST, SharePoint/Graph, generic knowledge REST
  - Cloudflare discovery adapter
- Simulated behavior in default demo path:
  - Cloud discovery responses and ITSM ticket IDs from demo providers in the MCP server bootstrap

## Runtime configuration model

The MCP tool surface includes `get_runtime_capabilities`, which reports whether each integration path is running in live, local, or simulated mode.

Key environment controls:

- `KNOWLEDGE_BACKEND=local|github`
- `AWS_LIVE_DISCOVERY_ENABLED=true`
- `AZURE_LIVE_DISCOVERY_ENABLED=true` and `AZURE_SUBSCRIPTION_ID`
- `SERVICENOW_LIVE_ENABLED=true` or `FRESHSERVICE_LIVE_ENABLED=true`
- `APPROVAL_TOKEN` and `APPROVAL_SCOPE`
- `EIE_ALLOWED_HOSTS` for explicit endpoint allowlisting

## CI policy

GitHub Actions enforces:

- Ruff
- mypy
- pytest
- pip-audit
- Gitleaks (working tree and git history)
- MCP stdio end-to-end demonstration (`scripts/mcp_e2e_demo.py`)

## Key capabilities

- Knowledge integrations:
  - Local Markdown journals
  - Confluence REST adapter
  - SharePoint and Microsoft Graph adapter
  - Generic REST adapter
- Infrastructure integrations:
  - Azure (SDK-first, constrained read-only discovery)
  - AWS (Boto3, read-only discovery)
  - Cloudflare REST API (read-only)
- ITSM integrations:
  - ServiceNow REST adapter
  - Freshservice REST adapter
  - Incident search and duplicate detection
  - Draft and approved create flows
  - Change request drafting
- Workflow controls:
  - Explicit workflow states
  - Correlation IDs and idempotency keys
  - Approval gate before external writes
  - Evidence model and full audit events

## Security model

- Read-only cloud operations by default.
- Strict parameter validation through Pydantic models.
- No arbitrary command execution surfaces.
- SSRF prevention on remote endpoints.
- Prompt-injection-resistant handling of untrusted journal or ticket text.
- Structured logs with sensitive value redaction.
- Approval enforcement is server-side, not prompt-based.

## Quick start

```bash
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest
.venv/bin/ruff check .
.venv/bin/mypy src
```

Run the integration server over stdio:

```bash
.venv/bin/enterprise-integration-engine
```

## Validation gate

```bash
gitleaks detect --source . --no-git --report-format sarif --report-path gitleaks-working-tree.sarif
gitleaks git . --report-format sarif --report-path gitleaks-history.sarif
.venv/bin/python -m pip_audit
.venv/bin/python -m ruff check .
.venv/bin/python -m mypy src tests
.venv/bin/python -m pytest
```

## Reproducible MCP demonstration

1. Prepare a synthetic journal entry in `examples/journals/sample_incident.md`.
2. Run the server over stdio:

```bash
.venv/bin/enterprise-integration-engine
```

3. Execute the reproducible client/server demo:

```bash
.venv/bin/python scripts/mcp_e2e_demo.py
```

4. The demo client session:
  - lists tools
  - calls `get_runtime_capabilities`
  - invokes `run_reference_workflow`

5. The workflow invocation uses:
  - a synthetic correlation context
  - `journal_id=sample_incident`
  - `cloud_target` from `DEMO_CLOUD_TARGET` (`aws` or `azure`)
  - `ticket_system` from `DEMO_TICKET_SYSTEM` (`servicenow` or `freshservice`)
  - `ticket_kind=incident`
  - a runtime approval token injected into both server environment and request payload

Expected outcome:

- Tool discovery returns `run_reference_workflow` and `get_runtime_capabilities`.
- Runtime capabilities output explicitly identifies live vs simulated integrations.
- Invocation returns workflow states, evidence, and a simulated ticket reference.
- The journal file is updated with correlation and ticket reference audit details.
- JSON evidence is written to `artifacts/mcp_e2e_demo_result.json`.

## Live interoperability demonstration

To execute live operations within explicit boundaries:

```bash
export AWS_LIVE_DISCOVERY_ENABLED=true
export AWS_REGION=eu-west-2
export AZURE_LIVE_DISCOVERY_ENABLED=true
export AZURE_SUBSCRIPTION_ID=<your-subscription-id>
export SERVICENOW_LIVE_ENABLED=true
export SERVICENOW_BASE_URL=https://<instance>.service-now.com
export SERVICENOW_TOKEN=<token>
export EIE_ALLOWED_HOSTS=<instance>.service-now.com
export APPROVAL_TOKEN=<approved-token>
export APPROVAL_SCOPE=servicenow
export DEMO_CLOUD_TARGET=aws
export DEMO_TICKET_SYSTEM=servicenow
.venv/bin/python scripts/mcp_e2e_demo.py
```

The demonstration remains read-only for cloud providers. External write operation scope is limited to ITSM ticket creation and requires explicit approval.

## Reference workflow

1. Retrieve engineering journal entry.
2. Extract apps and infrastructure identifiers.
3. Discover Azure or AWS resources.
4. Map dependencies.
5. Retrieve config and telemetry.
6. Search existing incidents.
7. Build evidence-backed assessment.
8. Draft incident or change request.
9. Require explicit approval for external write.
10. Submit approved ticket or prevent duplicate creation when an existing incident is found.
11. Update journal with ticket reference.
12. Persist full audit trail.

## Current limitations

- Default runtime uses in-process demo cloud and ITSM providers for reproducible behavior.
- No background worker, distributed lock, or persistent audit database in this version.
- No live credentialed integration tests run in public CI.
- AWS live-mode execution depends on valid local AWS authentication; the recorded live attempt in this release failed because the local SSO refresh token was expired.
- Gitleaks history scan depends on local commit history being present.

## Additional documentation

- `docs/ARCHITECTURE.md`
- `docs/COPILOT_MCP.md`
- `docs/INTEGRATION_RESULTS.md`

TDQS

D1.6/5.0

Scored across 2 tools

Disambiguation4/5

The two tools target clearly different actions: querying capability metadata versus executing a reference workflow. The verbs 'get' and 'run' plus distinct noun phrases make misselection unlikely, though the empty descriptions leave ambiguity about what a 'reference workflow' actually is.

Naming Consistency5/5

Both names follow a strict snake_case verb_noun pattern (get_/run_ + noun phrase) with no stylistic deviations.

Tool Count2/5

Two tools are far too thin for something branded an 'Enterprise Integration Engine' — the surface covers only a capability probe and a single canned workflow execution. It reads as a demo stub rather than a usable integration toolset.

Completeness1/5

There is no way to list, configure, start, monitor, or inspect integrations or workflows; the only execution path is a hardcoded 'reference workflow'. Core lifecycle operations for an integration engine are entirely absent.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues