> ## Documentation Index
> Fetch the complete documentation index at: https://cosmos-docs-sync-security-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# RPC

CometBFT provides a comprehensive RPC API for interacting with nodes, querying blockchain data, broadcasting transactions, and subscribing to real-time events.

<Card title="RPC API Reference" icon="book" href="/cometbft/latest/api-reference/rpc/index">
  Visit the API Reference page for a list of all CometBFT RPC methods
</Card>

The RPC server supports multiple protocols:

* **URI over HTTP** - REST-like interface for simple queries
* **JSONRPC over HTTP** - Standard JSON-RPC 2.0 protocol
* **JSONRPC over WebSockets** - Persistent connection with subscription support

## Quick Start

By default, the RPC server listens on `tcp://127.0.0.1:26657`. You can query it using curl:

```bash theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
# Get node status
curl http://localhost:26657/status

# Get block at height 5
curl http://localhost:26657/block?height=5

# Health check
curl http://localhost:26657/health
```

## Configuration

The RPC server can be configured in your `config.toml` file under the `[rpc]` section:

```toml theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
[rpc]

# TCP or UNIX socket address for the RPC server to listen on
laddr = "tcp://127.0.0.1:26657"

# A list of origins a cross-domain request can be executed from
cors_allowed_origins = []

# Maximum number of simultaneous connections
max_open_connections = 900
```

See the [Configuration](/cometbft/latest/docs/core/configuration) page for more details on RPC configuration options.
