

# MCP Server Tutorial

Deploy our secure, OAuth-secured AWS Lambda MCP server to integrate with custom AI agents and automate access-control operations natively.

## OAuth Authentication

Our Model Context Protocol (MCP) server secures sensitive door lock and access pin tools using standard OAuth 2.0 bearer handshakes. Before deploying, obtain your OAuth credentials (client id and secret) from the console.

## Install with Claude Code

Instruct Claude to add the MCP server using client credential grants:

```bash
claude mcp add igloo -e IGLOO_OAUTH_CLIENT_ID=client_abc123 -e IGLOO_OAUTH_CLIENT_SECRET=secret_xyz789 -- npx -y @igloo/mcp
```

## Configuration

Claude Desktop and other MCP clients can load the OAuth metadata dynamically from the standard configuration file:

```json
{
  "mcpServers": {
    "igloo": {
      "command": "npx",
      "args": ["-y", "@igloo/mcp"],
      "env": {
        "IGLOO_OAUTH_CLIENT_ID": "client_abc123",
        "IGLOO_OAUTH_CLIENT_SECRET": "secret_xyz789",
        "IGLOO_AUTH_SERVER": "https://auth.igloodeveloper.co"
      }
    }
  }
}
```

## Available Tools

- `list_devices` (Read): List all locks, readers, and controllers. Requires scope `locks:read`.
- `create_pin` (Write): Generate a time-bound offline residential or hourly PIN. Requires scope `locks:write`.
