Skip to main content

mcp_servers/
lib.rs

1#![doc = include_str!("../README.md")]
2
3#[cfg(any(feature = "coding", feature = "subagents"))]
4mod background_tasks;
5
6#[cfg(any(feature = "coding", feature = "review"))]
7mod request_context;
8
9#[cfg(any(feature = "coding", feature = "skills", feature = "tasks", feature = "subagents"))]
10mod displayed;
11#[cfg(any(feature = "coding", feature = "skills", feature = "tasks", feature = "subagents"))]
12pub use displayed::Displayed;
13
14pub mod workspace_paths;
15
16#[cfg(any(test, feature = "test-helpers"))]
17pub mod testing;
18
19#[cfg(feature = "subagents")]
20pub mod setup;
21#[cfg(feature = "subagents")]
22pub use setup::{Builtin, McpBuilderExt, agent_mcp};
23
24#[cfg(feature = "file-ops")]
25pub mod file_ops;
26
27#[cfg(feature = "coding")]
28pub mod coding;
29
30#[cfg(feature = "coding")]
31pub mod lsp;
32
33#[cfg(feature = "skills")]
34pub mod skills;
35
36#[cfg(feature = "tasks")]
37pub mod tasks;
38
39#[cfg(feature = "subagents")]
40pub mod subagents;
41
42#[cfg(feature = "review")]
43pub mod review;
44
45#[cfg(feature = "coding")]
46pub use coding::{CodingMcp, CodingMcpArgs, PermissionMode};
47
48#[cfg(feature = "coding")]
49pub use lsp::LspRegistry;
50
51#[cfg(feature = "skills")]
52pub use skills::{SkillsMcp, SkillsMcpArgs};
53
54#[cfg(feature = "tasks")]
55pub use tasks::{TasksMcp, TasksMcpArgs};
56
57#[cfg(feature = "subagents")]
58pub use subagents::{SubAgentsMcp, SubAgentsMcpArgs};
59
60#[cfg(feature = "review")]
61pub use review::{
62    ArtifactFormat, ArtifactSource, HtmlAnnotation, ReviewArtifactInput, ReviewArtifactOutput, ReviewMcp, ReviewMcpArgs,
63};
64
65#[cfg(any(feature = "coding", feature = "skills", feature = "tasks", feature = "review"))]
66pub(crate) fn server_config(
67    name: &str,
68    capabilities: rmcp::model::ServerCapabilities,
69    instructions: impl Into<String>,
70) -> rmcp::model::ServerConfig {
71    rmcp::model::ServerConfig::new(capabilities)
72        .with_server_info(rmcp::model::Implementation::new(name, env!("CARGO_PKG_VERSION")))
73        .with_instructions(instructions)
74}