# Connecting AI Coding Agents to PeopleSoft with Model Context Protocol (MCP)

> How psLens uses an embedded Model Context Protocol (MCP) server to let Claude Code, Cursor, and Claude Desktop inspect PeopleSoft metadata, audit security, and diff environments in real time.

---

LLMS index: [llms.txt](/llms.txt)

---

PeopleSoft has always been a black box to modern AI coding assistants.

Tools like [Claude Code](https://claude.ai/code), [Cursor](https://www.cursor.com), and [Claude Desktop](https://claude.ai/download) work by reading files on disk, navigating Git repositories, and parsing project trees. PeopleSoft does not work like that. Its object definitions, record structures, SQL objects, and PeopleCode live inside relational database tables (`PSRECDEFN`, `PSRECFIELD`, `PSPROGMETA`, `PSAEAPPLDEFN`), not on the filesystem.

Until now, getting that context to an LLM required writing ad-hoc SQL queries, taking screenshots of Application Designer, or manually copying and pasting code blocks into a chat window. That workflow is slow, breaks context across object hierarchies, and makes autonomous coding assistants impossible to use with PeopleSoft.

To solve this, psLens includes an **embedded Model Context Protocol (MCP) server**.

AI agents can now connect directly to your PeopleSoft environments over Streamable HTTP and Server-Sent Events (SSE). Without direct database access, two-tier client installs, or heavy middleware configuration, your AI assistants can inspect schemas, audit security permissions, diff environments, and triage batch issues in real time.

---

## What Is Model Context Protocol (MCP)?

The [Model Context Protocol](https://modelcontextprotocol.io) is an open standard created by Anthropic. It standardizes how AI applications connect to external tools, data sources, and services. Instead of building custom API integrations for every AI client, an MCP server provides tools, prompts, and resources through a standardized JSON-RPC protocol.

When you configure an MCP server in Claude Code or Cursor, the LLM discovers the available tools and their schemas automatically. During a conversation or task, the LLM decides when to invoke a tool, passes typed parameters, and consumes structured results.

```mermaid
flowchart LR
    subgraph Agents ["AI Coding Agents"]
        direction TB
        CC["Claude Code CLI"]
        CD["Claude Desktop"]
        CR["Cursor IDE"]
    end

    subgraph Server ["psLens Standalone Go Server"]
        direction TB
        MCP["Embedded MCP Server\n(Streamable HTTP / SSE)"]
        SWS_C["SWS Query Client\n(Bounded Whitelist)"]
        MCP --> SWS_C
    end

        direction TB
        DEV["HCM DEV (PT 8.59)"]
        TEST["HCM TEST (PT 8.60)"]
        PROD["HCM PROD (PT 8.61)"]
        SWS_C -->|"HTTPS SWS Requests"| DEV
        SWS_C -->|"HTTPS SWS Requests"| TEST
        SWS_C -->|"HTTPS SWS Requests"| PROD

  

    Agents -->|"JSON-RPC / Bearer PAT"| MCP
```

---

## How psLens Implements MCP

The psLens MCP server runs directly inside the psLens Go process. It requires no external Python bridge, no local daemon, and no changes to your PeopleSoft infrastructure.

1. **Authentication**: Secured via cryptographically generated Personal Access Tokens (PATs) generated in **Settings → MCP Tokens** (`/settings/mcp`). Tokens are SHA-256 hashed and stored in the internal NATS KV store.
2. **Access Control**: Queries run through our Simple Web Services (SWS) framework using a customer-reviewed table whitelist (`CHG_PSLENS_WL`). The MCP server is read-only; it cannot mutate PeopleSoft database state.
3. **Transports**: Supports both Streamable HTTP (`/mcp`) for standard tool calls and HTTP+SSE (`/mcp/sse`) for event-stream transports.

Connecting Claude Code takes a single command in your terminal:

```bash
claude mcp add --transport sse pslens https://{{your_subdomain}}.pslens.com/mcp/sse --header "Authorization: Bearer psl_mcp_YOUR_TOKEN_HERE"
```

Connecting Claude Desktop uses standard JSON configuration:

```json
{
  "mcpServers": {
    "pslens": {
      "url": "https://{{your_subdomain}}.pslens.com/mcp",
      "headers": {
        "Authorization": "Bearer psl_mcp_YOUR_TOKEN_HERE"
      }
    }
  }
}
```

---

## What AI Agents Can Do

The psLens MCP server exposes 20+ specialized tools across four functional areas:

### 1. Metadata & PeopleCode Exploration

Agents can inspect definitions and retrieve source code across all PeopleSoft container types:

- **`search_objects`**: Fast wildcard search across records, fields, pages, components, menus, App Engines, App Packages, queries, projects, and service operations.
- **`get_object_definition`**: Returns structured metadata, field lists, keys, and subrecords. With `expand_subrecords: true`, it recursively flattens nested subrecords into a single effective field list.
- **`get_peoplecode`**: Extracts formatted source code for Record Events, App Package Classes, Component PostBuild/SaveEdit, Page Events, and App Engine Action steps.
- **`get_object_dependencies`**: Computes forward and reverse where-used graphs. An agent can discover every record containing a field (`PSRECFIELD`), every page displaying a field (`PSPAGEFIELD`), and every PSQuery referencing a field (`PSQRYFIELD`).
- **`search_code_sql`**: Performs fast substring searches across PeopleCode, SQL objects, and App Engine action SQL.

### 2. Reverse Security Graph & Access Auditing

Understanding access paths in PeopleSoft typically requires querying `PSROLEUSER`, `PSROLECLASS`, `PSAUTHITEM`, and `PSMENUITEM`. psLens traverses these graphs automatically:

- **`who_has_access`**: Backward traversal from a component, menu, or service operation to identify every authorized permission list, role, and user ID.
- **`user_access_summary`**: Generates a consolidated security profile for an OPRID, including roles, permission lists, account status, and row-level security.
- **`audit_dangerous_access`**: Identifies elevated administrative privileges, full-access permission lists, and exposed web services.
- **`user_login_audit`**: Inspects authentication logs and failed sign-in attempts from `PSPTLOGINAUDIT`.

### 3. Cross-Environment Comparison & Migration Drift

Because psLens connects to multiple databases simultaneously (`DEV`, `TEST`, `PROD`), an agent can inspect cross-environment drift in a single prompt:

- **`compare_project`**: Diffs object definitions, field structures, and PeopleCode across two environments (e.g. `HCMDEV` vs. `HCMPROD`).
- **`find_missing_projects`**: Identifies projects present in a development environment that have not yet been migrated to production.
- **`compare_recurring_processes`**: Flags differences in Process Scheduler recurrence schedules and runtime parameters between environments.

### 4. Operational Incident Triage

When production alerts trigger, AI assistants can evaluate system health without needing access to PIA:

- **`get_system_health`**: Real-time status of Process Scheduler dispatchers, queue latency, and database responsiveness.
- **`triage_process_scheduler`**: Retrieves stuck, error, or long-running process instances with human-readable status decoders.
- **`triage_integration_broker`**: Identifies failed or timed-out asynchronous and synchronous transaction contracts.
- **`list_active_alerts`**: Surfaces active operational alerts configured in psLens.

---

## Built for Agent Ergonomics and Token Efficiency

psLens optimizes payloads specifically for LLM context windows and autonomous execution:

- **Self-Describing Numeric Enums**: Objects include human-readable decoders (`RunStatusDesc: "Error"`, `FieldTypeDesc: "Character"`, `RecTypeDesc: "SQL Table"`) alongside raw PeopleTools integers.
- **Safe Annotations**: Tools include standard MCP annotations (`readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`), preventing repetitive confirmation prompts in Claude Desktop and Cursor.
- **Credential Protection**: Data sampling via `get_table_sample_and_count` automatically strips sensitive password hashes (`OPERPSWD`, `OPERPSWDSALTED`), encryption keys, and tokens.
- **Structured Outputs**: Metadata and code outputs are structured and formatted for efficient LLM ingestion.

---

## PeopleTools 8.63 Native MCP vs. psLens MCP

Oracle introduced native Model Context Protocol server support in **PeopleTools 8.63** (released July 2026 for OCI, with on-premises availability following in late 2026), positioning it as an "Integration Broker for AI."

Both implementations use the open MCP standard, but they address different layers:

|         Capability          |                                    PeopleTools 8.63 Native MCP                                     |                                                             psLens Embedded MCP Server                                                             |
| :-------------------------- | :------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Primary Audience**        | End users, functional analysts, App Designer developers                                            | System administrators, DBAs, developers, security auditors, SREs                                                                                   |
| **PeopleTools Version**     | Requires **PeopleTools 8.63+** exclusively                                                         | **Version Agnostic**: PeopleTools 8.53 through 8.63+                                                                                               |
| **Environment Scope**       | **Single database**: Queries only the hosted 8.63 instance                                         | **Multi-environment**: Inspects and diffs DEV, TEST, and PROD in one session                                                                       |
| **Core Focus**              | Natural Language Search (OpenSearch), transactional application services, App Designer code assist | Deep metadata introspection, reverse where-used graphs, PeopleCode extraction, reverse security access, cross-environment drift, live batch triage |
| **Cross-Environment Diffs** | Not supported natively                                                                             | Built-in (`compare_project`, `find_missing_projects`, `compare_recurring_processes`)                                                               |
| **Infrastructure**          | Full PT 8.63 stack (PIA, Tuxedo, OpenSearch, Integration Broker)                                   | Standalone Go service querying via SWS with database table whitelisting                                                                            |

### How They Coexist

- **Use PeopleTools 8.63 Native MCP** for conversational end-user AI (such as employee self-service transactions and OpenSearch document search) once your organization upgrades to 8.63.
- **Use psLens MCP** when your developers, administrators, auditors, and AI coding assistants need deep metadata analysis, security auditing, cross-environment drift detection, and operational triage across your existing PeopleTools environments today.

---

## Get Started

The embedded MCP server is available in psLens now.

1. Review the [MCP Server Setup Guide](/docs/mcp/) for configuration examples and the full tool catalog.
2. Read the [AI Enablement Use Case](/docs/use-cases/ai-enablement/) to see how structured Markdown exports and MCP complement each other.
3. [Book a demo](/contact/) to see psLens and Claude Code running live against a PeopleSoft environment.

---

### Subscribe for Updates

If you found this article helpful, subscribe to get notified of new PeopleSoft technical notes and psLens updates.











<div class="card bg-light border-0 border-start border-primary border-3 my-4 shadow-sm">
    <div class="card-body p-3">
        <form action="https://subscribe.cedarhillsgroup.com/subscribe" method="POST" class="row align-items-center g-3">
            
            <input type="text" name="website" style="position: absolute; left: -5000px;" tabindex="-1"
                autocomplete="off">
            <input type="hidden" name="redirect_to" value="https://pslens.com/subscribed/">
            <input type="hidden" name="topic_id" value="pslens">

            <div class="col-lg-5">
                <h6 class="mb-1 text-dark fw-bold">Stay Updated</h6>
                <p class="mb-0 text-muted small" style="font-size: 0.85rem;">Receive new articles directly in your inbox.</p>
            </div>

            <div class="col-md-6 col-lg-3">
                <input type="text" name="first_name" placeholder="First Name (optional)"
                    class="form-control form-control-sm">
            </div>

            <div class="col-md-6 col-lg-3">
                <input type="email" name="email" required placeholder="Email Address"
                    class="form-control form-control-sm">
            </div>

            <div class="col-12 col-lg-1">
                <button type="submit" class="btn btn-primary btn-sm w-100">Join</button>
            </div>
        </form>
    </div>
</div>
