# stipend

Core of Stipend — types, interfaces, signing, canonicalization, and the authorization engine. Zero runtime dependencies on HTTP frameworks, payment providers, or storage backends.

## Install

```bash
pnpm add stipend-mcp
```

## Use

```ts
import { Stipend } from 'stipend-mcp';
import { MemoryStore } from '@stipend-mcp/store-memory';

const stipend = new Stipend({
  store: new MemoryStore(),
  // provider, signer, policy ...
});

const decision = await stipend.authorize({
  agentId: 'agent-1',
  toolName: 'get_headlines',
  service: 'newsco',
  idempotencyKey: 'call-uuid',
  // ...
});
```

## Subpath: `stipend/testing`

The shared `EntitlementStore` conformance suite. Adapter authors run this against their implementation to verify the contract:

```ts
import { runEntitlementStoreConformance } from 'stipend-mcp/testing';
import { MyStore } from './my-store.js';

runEntitlementStoreConformance({
  name: 'MyStore',
  create: async () => new MyStore(),
});
```

## Status

Pre-development. Public API is unstable until v1.0.
