mcp_execution_core/
lib.rs1#![deny(unsafe_code)]
32#![warn(missing_docs, missing_debug_implementations)]
33
34mod command;
35mod confinement;
36mod error;
37mod path;
38mod redact;
39mod server_config;
40mod types;
41
42pub mod cli;
43pub mod metadata;
44pub mod provenance;
45pub mod untrusted;
46
47pub use error::{Error, ResourceKind, Result};
49
50pub use types::{
52 MAX_SERVER_ID_LENGTH, ServerId, ServerIdError, ServerIdSlugError, ToolName, ToolNameError,
53 validate_server_id_slug,
54};
55
56pub use server_config::{ServerConfig, ServerConfigBuilder, Transport};
58
59pub use command::{
61 MAX_ARG_COUNT, MAX_ARG_LEN, MAX_ENV_COUNT, MAX_ENV_VALUE_LEN, MAX_HEADER_COUNT,
62 MAX_HEADER_VALUE_LEN, MAX_URL_LEN, env_name_charset_desc, env_name_charset_pattern,
63 forbidden_chars, forbidden_env_names, forbidden_env_prefix, validate_server_config,
64 validate_url_scheme,
65};
66
67pub use path::{
69 contains_parent_dir, first_disallowed_identifier_char, sanitize_path_for_error,
70 validate_path_segment,
71};
72
73pub use confinement::{
75 ConfinementError, ConfinementTarget, open_confined_write, resolve_confined_path,
76 write_confined_file,
77};
78
79pub use redact::{
81 REDACTED_PLACEHOLDER, RedactedItems, RedactedMapValues, RedactedUrl, redact_urls_in_text,
82};