*/ public function get_config_snippet( string $server_url, string $auth_token ): array { return array( 'mcp' => array( $this->derive_server_key( $server_url ) => array( 'type' => 'local', 'command' => array( 'npx', '-y', '@automattic/mcp-wordpress-remote@latest' ), 'environment' => $this->build_env( $server_url, $auth_token ), ), ), ); } /** * {@inheritDoc} */ public function get_icon(): string { return '📟'; } /** * {@inheritDoc} */ public function get_description(): string { return __( 'OpenCode — open-source terminal-first AI coding agent', 'acrossai-mcp-manager' ); } /** * {@inheritDoc} */ public function get_config_file(): string { return '~/.config/opencode/opencode.json'; } /** * {@inheritDoc} * * Verified 2026-10-07 against {@link https://opencode.ai/docs/config/}, which * states "Place your global OpenCode config in ~/.config/opencode/opencode.json" * and gives no platform-specific variants — the same home-relative path on * all three. Home-relative on every platform: the client resolves `~` itself, but `~` * is unix shorthand a Windows user cannot paste into Explorer, so the * Windows row spells out `%USERPROFILE%` with backslashes (issue #159). * Linux uses the same location as macOS. * * @since 0.3.9 * @return array */ public function get_config_files(): array { return array( 'macos' => '~/.config/opencode/opencode.json', 'windows' => '%USERPROFILE%\\.config\\opencode\\opencode.json', 'linux' => '~/.config/opencode/opencode.json', ); } /** * {@inheritDoc} */ public function get_top_level_key(): string { return 'mcp'; } /** * {@inheritDoc} */ public function get_instructions(): string { return __( 'Generate a password → copy the JSON → open ~/.config/opencode/opencode.json (global) or opencode.json (project) → merge under mcp → restart OpenCode.', 'acrossai-mcp-manager' ); } /** * {@inheritDoc} */ public function get_priority(): int { return 78; } }