pub struct OpenCodeMcpServer {
pub name: String,
pub command: Vec<String>,
pub env: HashMap<String, String>,
}Expand description
A single MCP server to register with the OpenCode agent.
Uses OpenCode’s native format: command is the full argv (binary + args in one vec).
Fields§
§name: StringServer name (key in the mcp config object).
command: Vec<String>Full command-line: ["/path/to/binary", "arg1", "arg2", ...].
env: HashMap<String, String>Environment variables for the MCP server subprocess.
Implementations§
Source§impl OpenCodeMcpServer
impl OpenCodeMcpServer
Sourcepub fn builder() -> OpenCodeMcpServerBuilder
pub fn builder() -> OpenCodeMcpServerBuilder
Create an instance of OpenCodeMcpServer using the builder syntax
Trait Implementations§
Source§impl Clone for OpenCodeMcpServer
impl Clone for OpenCodeMcpServer
Source§fn clone(&self) -> OpenCodeMcpServer
fn clone(&self) -> OpenCodeMcpServer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenCodeMcpServer
impl Debug for OpenCodeMcpServer
Source§impl<'de> Deserialize<'de> for OpenCodeMcpServer
impl<'de> Deserialize<'de> for OpenCodeMcpServer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OpenCodeMcpServer
impl RefUnwindSafe for OpenCodeMcpServer
impl Send for OpenCodeMcpServer
impl Sync for OpenCodeMcpServer
impl Unpin for OpenCodeMcpServer
impl UnsafeUnpin for OpenCodeMcpServer
impl UnwindSafe for OpenCodeMcpServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more