# Developer quickstart

Read public Shared Events Library data over REST or MCP without an API key.

## Choose a node

These commands use this node. [Toronto staging](https://staging.toronto.togather.foundation/)
is publicly accessible for early alpha testing. It contains real event data
whose accuracy is not guaranteed. Togather has no production server yet.

```sh
TOGATHER_URL='https://staging.toronto.togather.foundation'
```

## Read an event over REST

[Read the first event from this node](/api/v1/events?limit=1) or run the command below.

```sh
curl -fsS -H 'Accept: application/ld+json' "$TOGATHER_URL/api/v1/events?limit=1"
```

Read the events from `items`. For event filters and pagination, see the
[REST event guide](https://github.com/Togather-Foundation/server/blob/main/docs/integration/api-guide.md#event-retrieval).

## Connect an MCP client

In a client that supports Streamable HTTP, add
`https://staging.toronto.togather.foundation/mcp` as a server URL. Leave
authentication unset for public reads. Call the `events` tool with
`{"limit": 1}`. To try the same call with curl, run:

```sh
curl -fsS "$TOGATHER_URL/mcp" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"events","arguments":{"limit":1}}}'
```

The [MCP integration guide](https://github.com/Togather-Foundation/server/blob/main/docs/integration/mcp-server.md)
covers client configuration, tool arguments, and the initialization protocol.
MCP is available on nodes with the HTTP transport enabled.

## Get a key to submit events

Open the [developer portal for this node](/dev/login), sign in, and create an
API key. Send `Authorization: Bearer <api-key>` when submitting an event over
REST or calling an MCP write or account tool on this node.

## API reference

- [Interactive Scalar reference](/api/docs/reference) (JavaScript)
- OpenAPI specification in [JSON](/api/v1/openapi.json) and [YAML](/api/v1/openapi.yaml)
- [Key management guide](https://github.com/Togather-Foundation/server/blob/main/docs/integration/developer-quickstart.md)
