jump to content

Opencode AI

Configure the MCPale Opencode AI settings to connect to the platform with a carrier token, including environment variables and multi-environment configuration.

Show as Markdown

Opencode AI is an AI-powered coding assistant with MCP support.

  • Opencode AI installed
  • Scoped the platform OAuth token (see Authentication)
  • Your platform court URL

Choose the end point for your platform environment:

Environment MCP URL
the platform US https://us.probo.com/api/mcp/v1
the platform EU https://eu.probo.com/api/mcp/v1
Custom https://your-probo-instance.com/api/mcp/v1

The ___ZBT_I18N_RUNTIME_BLOCK_171__ segment is required.

Open Opencode settings or configuration file.

Add the configuration of the platformMCPServer:

{
"mcpServers": {
"probo": {
"url": "https://your-probo-instance.com/api/mcp/v1",
"headers": {
"Authorization": "Bearer your_api_token_here"
}
}
}
}

Update these values:

  • your-probo-instance.com → URL of your platform instance
  • your_api_token_here → Your OAuth token on the platform

Open Opencode to apply the configuration.

Once configured, you can use the platform tools through the Opencode AI assistant:

Example queries:

"List all pending obligations in my organization"
"Add a new risk for data breach with high impact"
"Show me all third parties that need review"

Opencode will automatically invoke the tools of the appropriate platform.

For security, use an environmental variable for your OAuth token:

{
"mcpServers": {
"probo": {
"url": "https://your-probo-instance.com/api/mcp/v1",
"headers": {
"Authorization": "Bearer ${PROBO_API_TOKEN}"
}
}
}
}

Set the environment variable:

macOS/Linux:

Terminal window
export PROBO_API_TOKEN="your_api_token_here"

Windows:

Terminal window
$env:PROBO_API_TOKEN = "your_api_token_here"

Configure different the platform instances:

{
"mcpServers": {
"probo-dev": {
"url": "http://localhost:8080/api/mcp/v1",
"headers": {
"Authorization": "Bearer ${PROBO_DEV_TOKEN}"
}
},
"probo-prod": {
"url": "https://probo.company.com/api/mcp/v1",
"headers": {
"Authorization": "Bearer ${PROBO_PROD_TOKEN}"
}
}
}
}

Tools are not available

Section “Tools Not Available”

Problem: Platform tools do not appear in Opencode

Solutions:

  1. Verification of Configuration
  2. Restart Opencode completely
  3. Check Opencode logs for connection errors
  4. Testarea punctului final cu inspectorulMCP:
    Terminal window
    npx @modelcontextprotocol/inspector --cli \
    https://your-probo-instance.com/api/mcp/v1 \
    --transport http \
    --header "Authorization: Bearer $PROBO_API_TOKEN" \
    --method tools/list

Problem: 401 Unauthorized errors

Solutions:

  1. Create an OAuth replacement token in the platform
  2. Check the token format: Bearer your_token
  3. Check for additional spaces or newsletters
  4. Make sure that the token has not expired or has been revoked

Problem: You cannot connect to the platform.

Solutions:

  1. Check if the URL is correct.
  2. Check network connectivity
  3. Use HTTPS for production instances
  4. Verify firewall settings
  • Store OAuth tokens in environment variables
  • Use separate tokens for different environments
  • Rotate tokens regularly (every 90 days)
  • Use HTTPS for production connections
  • Monitor token usage in the platform settings
  • Avoid committing tokens to version control

Opencode AI with the platform MCP provides:

  • IA-based coding with context of compliance
  • Real-time access to compliance data
  • Automated compliance checks
  • Generating codes with risk awareness
  • Natural language compliance queries

Ultima actualizare: