Skip to Content

OpenCode

From this guide, you’ll learn how OpenCode can work with your Prepr content through the Prepr MCP server, so you can manage content items, assets, and schema using plain-language prompts.

Connecting OpenCode to the Prepr MCP server

Follow the steps below to add Prepr to OpenCode’s MCP configuration, configure authentication, and test the connection with your first request.

Open the MCP configuration

Open the configuration file or settings area where OpenCode manages MCP servers.

Follow the official OpenCode MCP server guide  for the current remote server configuration and OAuth flow.

Add the Prepr MCP server

Create a remote server using:

  • Name: Prepr
  • Server URL: https://mcp.prepr.io

Configure authentication

Complete the OAuth flow when OpenCode prompts you. You can also start it manually using opencode mcp auth prepr.

If OAuth isn’t available in your setup, add an Authorization header containing Bearer YOUR_ACCESS_TOKEN.

See Connecting with an MCP token to request a token and configure token-based access.

Send your first request

To confirm that OpenCode can access your Prepr environment, send the following prompt:

Find the five most recently updated content items in Prepr and show their titles and publication statuses.

OpenCode can use the tools exposed by the Prepr MCP server to inspect your environment and work with your content.

The server also inspects the AI context defined in your environment settings to interpret requests more accurately.

What’s next?

Explore typical use cases or review the available tools and actions.

Last updated on