# EMR MCP Endpoint Guide

Last verified: 2026-04-17 UTC

## Endpoint

- Base MCP endpoint: `http://emr.winds-os.com/mcp`
- Metadata endpoint: `GET http://emr.winds-os.com/mcp`

## MCP Methods Supported

- `initialize`
- `ping`
- `tools/list`
- `tools/call`

## Tools Exposed

- `opdms_get_health`
  - arguments: `{}`
- `opdms_get_patients`
  - arguments:
    - `search` (optional string)
    - `limit` (optional integer, 1..200)
- `opdms_get_patient_history`
  - arguments:
    - `uhid` (required string)

## Working cURL Commands

### 1) Metadata (GET)

```bash
curl -sS http://emr.winds-os.com/mcp
```

### 2) Initialize

```bash
curl -sS http://emr.winds-os.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"clientInfo":{"name":"curl","version":"1.0"},"capabilities":{}}}'
```

### 3) Ping

```bash
curl -sS http://emr.winds-os.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"ping","params":{}}'
```

### 4) List Tools

```bash
curl -sS http://emr.winds-os.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/list","params":{}}'
```

### 5) Call: Health Tool

```bash
curl -sS http://emr.winds-os.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"opdms_get_health","arguments":{}}}'
```

### 6) Call: Patients Tool

```bash
curl -sS http://emr.winds-os.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"opdms_get_patients","arguments":{"limit":20}}}'
```

### 7) Call: Patients Tool with Search

```bash
curl -sS http://emr.winds-os.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"opdms_get_patients","arguments":{"search":"saqib","limit":10}}}'
```

### 8) Call: Patient History Tool

```bash
curl -sS http://emr.winds-os.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"opdms_get_patient_history","arguments":{"uhid":"10000000"}}}'
```

## Notes

- This MCP endpoint is exposed publicly and does not require an additional user login.
- Data is fetched server-side from OPDMS APIs and returned in MCP `content` + `structuredContent` format.
