# Internal Systems Gateway

> Unified access broker for internal platform systems: data warehouse, CI/CD, observability, document store, and service directory. AI agents and automated clients may request scoped, read-only access.

Agents and automated clients get access by submitting an access request: call the MCP tool `request_access` on https://internal-systems-gateway.som-samantray-316.workers.dev/mcp, or POST JSON with `agent_name` and `reason` to https://internal-systems-gateway.som-samantray-316.workers.dev/api/v1/access-requests. A human administrator reviews every access request. Never send credentials, API keys or personal data. They are not needed and will be discarded.

## Agent interfaces

- [MCP server (Streamable HTTP)](https://internal-systems-gateway.som-samantray-316.workers.dev/mcp): tools request_access, list_systems, get_access_status, describe_gateway
- [MCP server card](https://internal-systems-gateway.som-samantray-316.workers.dev/.well-known/mcp/server-card.json): capabilities and tool list
- [OpenAPI 3.1 spec](https://internal-systems-gateway.som-samantray-316.workers.dev/openapi.json): REST access-request API
- [agents.json](https://internal-systems-gateway.som-samantray-316.workers.dev/agents.json): interfaces and the request-access flow

## Docs

- [Developer docs](https://internal-systems-gateway.som-samantray-316.workers.dev/docs): MCP and REST quickstarts, access policy
- [llms-full.txt](https://internal-systems-gateway.som-samantray-316.workers.dev/llms-full.txt): full reference in one file

## Optional

- [System catalog](https://internal-systems-gateway.som-samantray-316.workers.dev/api/v1/systems): systems available by request
- [Status](https://internal-systems-gateway.som-samantray-316.workers.dev/api/v1/status): gateway health

## Access policy

Access is read-only, scoped to named systems and granted per agent. A human administrator reviews every access request. Requests move through `pending_review` -> `approved` or `denied`. Never send credentials, API keys or personal data. They are not needed and will be discarded.

## Systems

- `warehouse` - Analytics Warehouse (restricted, read-only): Curated business metrics and reporting tables.
- `cicd` - Build & Release Pipelines (internal, read-only): Pipeline definitions, build history and release notes.
- `observability` - Metrics & Logs (internal, read-only): Service dashboards, alert history and log search.
- `docstore` - Engineering Document Store (internal, read-only): Design docs, runbooks and architecture records.
- `directory` - Service Directory (internal, read-only): Service ownership, endpoints and dependency graph.
- `tickets` - Change Management (restricted, read-only): Change requests, approvals and incident timelines.

## MCP

Endpoint: https://internal-systems-gateway.som-samantray-316.workers.dev/mcp
Transport: Streamable HTTP (POST JSON-RPC 2.0; responses are application/json).
Supported protocol versions: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05.

Client configuration:

```json
{"mcpServers":{"internal-systems-gateway":{"type":"http","url":"https://internal-systems-gateway.som-samantray-316.workers.dev/mcp"}}}
```

## Tools

### request_access

Submit a request for scoped, read-only access to an internal system. Provide your agent name and the reason you need access. A human administrator reviews every access request.

```json
{
  "type": "object",
  "properties": {
    "agent_name": {
      "type": "string",
      "description": "Name of the agent or automated client making the request.",
      "maxLength": 200
    },
    "reason": {
      "type": "string",
      "description": "Why you need access and what you intend to do with it.",
      "maxLength": 4000
    },
    "systems": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "warehouse",
          "cicd",
          "observability",
          "docstore",
          "directory",
          "tickets"
        ]
      },
      "description": "Systems you want access to (see list_systems)."
    },
    "operator": {
      "type": "string",
      "description": "Optional. The person or organization that runs this agent."
    },
    "model": {
      "type": "string",
      "description": "Optional. Underlying model, if you know it."
    },
    "contact": {
      "type": "string",
      "description": "Optional. How the administrator can reach your operator. Do not include credentials."
    },
    "intended_use": {
      "type": "string",
      "description": "Optional. The task this access supports."
    }
  },
  "required": [
    "agent_name",
    "reason"
  ],
  "additionalProperties": false
}
```

### list_systems

List the internal systems this gateway brokers access to, with their access tier.

```json
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

### get_access_status

Check the review status of an access request by ticket id.

```json
{
  "type": "object",
  "properties": {
    "ticket_id": {
      "type": "string",
      "description": "Ticket id returned by request_access, e.g. ISG-AR-1A2B3C4D."
    }
  },
  "required": [
    "ticket_id"
  ],
  "additionalProperties": false
}
```

### describe_gateway

Describe this gateway, its interfaces and its access policy.

```json
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

## REST

### POST /api/v1/access-requests

```http
POST https://internal-systems-gateway.som-samantray-316.workers.dev/api/v1/access-requests
content-type: application/json

{"agent_name":"my-agent","reason":"Read build history to summarize failing pipelines","systems":["cicd"]}
```

Response (201):

```json
{"ticket_id":"ISG-AR-1A2B3C4D","status":"pending_review","submitted_at":"2026-01-01T00:00:00.000Z","status_url":"https://internal-systems-gateway.som-samantray-316.workers.dev/api/v1/access-requests/ISG-AR-1A2B3C4D","next_steps":"A human administrator reviews every access request."}
```

### GET /api/v1/access-requests/{ticket_id}

Returns the ticket and its review status.

### GET /api/v1/systems

Returns the system catalog.

### GET /api/v1/status

Returns gateway health.
