pawan/config/mcp.rs
1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3
4use super::defaults::default_true;
5
6/// Configuration for an MCP server in pawan.toml
7///
8/// This struct represents configuration for an MCP (Multi-Cursor Protocol) server
9/// that can be managed by Pawan. It includes the command to run, arguments,
10/// environment variables, and whether the server is enabled.
11#[derive(Debug, Clone, Serialize, Deserialize)]
12pub struct McpServerEntry {
13 /// Command to run
14 pub command: String,
15 /// Command arguments
16 #[serde(default)]
17 pub args: Vec<String>,
18 /// Environment variables
19 #[serde(default)]
20 pub env: HashMap<String, String>,
21 /// Whether this server is enabled
22 #[serde(default = "default_true")]
23 pub enabled: bool,
24}