> For the complete documentation index, see [llms.txt](https://docs.prestd.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prestd.com/plugins.md).

# Plugins

Extend pREST with OS shared libraries (`.so`) for custom middleware and endpoints. Plugins load beside the built-in REST and MCP surfaces — they do not replace them.

[Here](https://github.com/prest/prest/discussions/466#discussion-30623) is a discussion of how we arrived at this architecture.

Write a shared library and configure pREST to load it at server start. pREST uses the [Go plugin system](https://pkg.go.dev/plugin); on platforms where Go plugins are unavailable (notably Windows), plugin endpoints will not load.

Set the library directory with `PREST_PLUGINPATH` (default `./lib`) or TOML:

```toml
pluginpath = "./lib"
```

### Extension-supported modules

* [Endpoint](/plugins/endpoint-plugin.md)
* [Middleware](/plugins/middleware-plugin.md)

### Process of building

The first plugin builder targets **Go** source under `./lib`. The runtime can still load `.so` libraries produced by other toolchains; the automatic Go constructor is the documented path today.

## Related

* [Configuring pREST](/get-started/configuring-prest.md)
* [API Reference](/api-reference.md)
* [MCP over HTTP](/get-started/mcp-over-http.md)
* [Acronyms](/readme/acronyms.md) · [REST](/readme/acronyms.md#rest) · [MCP](/readme/acronyms.md#mcp)
