pub struct CodeSystemGraphServer { /* private fields */ }Expand description
Workspace-scoped Code System Graph MCP server with an optional explicit admin profile.
Implementations§
Source§impl CodeSystemGraphServer
impl CodeSystemGraphServer
Sourcepub fn new(database_path: PathBuf, workspace: String) -> Self
pub fn new(database_path: PathBuf, workspace: String) -> Self
Creates a read-only server for one configured workspace.
Sourcepub fn with_admin_profile(self, enabled: bool) -> Self
pub fn with_admin_profile(self, enabled: bool) -> Self
Enables or disables the explicit administrative MCP profile.
Disabled routes are absent from discovery and cannot be called. Applications should map
their trusted CODE_SYSTEM_GRAPH_MCP_ADMIN=1-equivalent configuration to this constructor option;
request arguments can never enable the profile.
Sourcepub fn with_codegraph(self, enabled: bool, binary: Option<OsString>) -> Self
pub fn with_codegraph(self, enabled: bool, binary: Option<OsString>) -> Self
Applies trusted process-level CodeGraph policy to exploration, impact, and scans.
Sourcepub fn with_pull_request_providers(self, github: bool, bitbucket: bool) -> Self
pub fn with_pull_request_providers(self, github: bool, bitbucket: bool) -> Self
Enables selected public pull-request providers while retaining per-request consent.
Sourcepub fn trace_tool_attr() -> Tool
pub fn trace_tool_attr() -> Tool
Generated tool metadata function for trace
Sourcepub fn trace(
&self,
Parameters: Parameters<TraceInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<TraceReport>>> + Send + '_>>
pub fn trace( &self, Parameters: Parameters<TraceInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<TraceReport>>> + Send + '_>>
Traces a bounded path through the current federated snapshot.
Sourcepub fn query_tool_attr() -> Tool
pub fn query_tool_attr() -> Tool
Generated tool metadata function for query
Sourcepub fn query(
&self,
Parameters: Parameters<SearchInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<SearchReport>>> + Send + '_>>
pub fn query( &self, Parameters: Parameters<SearchInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<SearchReport>>> + Send + '_>>
Searches ranked federated entities without returning source bodies.
Sourcepub fn explore_tool_attr() -> Tool
pub fn explore_tool_attr() -> Tool
Generated tool metadata function for explore
Sourcepub fn explore(
&self,
Parameters: Parameters<ExploreInput>,
) -> Pin<Box<dyn Future<Output = Result<Json<ToolEnvelope<LocalContextResult>>, McpError>> + Send + '_>>
pub fn explore( &self, Parameters: Parameters<ExploreInput>, ) -> Pin<Box<dyn Future<Output = Result<Json<ToolEnvelope<LocalContextResult>>, McpError>> + Send + '_>>
Explores bounded repository-local source and flow context without persisting source.
Sourcepub fn communities_tool_attr() -> Tool
pub fn communities_tool_attr() -> Tool
Generated tool metadata function for communities
Sourcepub fn communities(
&self,
Parameters: Parameters<CommunitiesInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<CommunityReport>>> + Send + '_>>
pub fn communities( &self, Parameters: Parameters<CommunitiesInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<CommunityReport>>> + Send + '_>>
Lists, inspects, or compares persisted deterministic communities.
Sourcepub fn impact_tool_attr() -> Tool
pub fn impact_tool_attr() -> Tool
Generated tool metadata function for impact
Sourcepub fn impact(
&self,
Parameters: Parameters<ImpactRequest>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<ImpactReport>>> + Send + '_>>
pub fn impact( &self, Parameters: Parameters<ImpactRequest>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<ImpactReport>>> + Send + '_>>
Computes conservative impact without executing tests or repository commands.
Sourcepub fn analyze_changes_tool_attr() -> Tool
pub fn analyze_changes_tool_attr() -> Tool
Generated tool metadata function for analyze_changes
Sourcepub fn analyze_changes(
&self,
Parameters: Parameters<ChangesInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<ChangeImpactReport>>> + Send + '_>>
pub fn analyze_changes( &self, Parameters: Parameters<ChangesInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<ChangeImpactReport>>> + Send + '_>>
Inspects bounded local Git changes without modifying repository state.
Sourcepub fn analyze_pull_request_tool_attr() -> Tool
pub fn analyze_pull_request_tool_attr() -> Tool
Generated tool metadata function for analyze_pull_request
Sourcepub fn analyze_pull_request(
&self,
Parameters: Parameters<PullRequestInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<PullRequestInspection>>> + Send + '_>>
pub fn analyze_pull_request( &self, Parameters: Parameters<PullRequestInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<PullRequestInspection>>> + Send + '_>>
Inspects one explicitly enabled public pull-request provider.
Sourcepub fn status_tool_attr() -> Tool
pub fn status_tool_attr() -> Tool
Generated tool metadata function for status
Sourcepub fn status(
&self,
Parameters: Parameters<WorkspaceInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<GraphStatusReport>>> + Send + '_>>
pub fn status( &self, Parameters: Parameters<WorkspaceInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<GraphStatusReport>>> + Send + '_>>
Reports persisted snapshot health without reading repository source files.
Sourcepub fn contracts_tool_attr() -> Tool
pub fn contracts_tool_attr() -> Tool
Generated tool metadata function for contracts
Sourcepub fn contracts(
&self,
Parameters: Parameters<ContractsInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<ContractReport>>> + Send + '_>>
pub fn contracts( &self, Parameters: Parameters<ContractsInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<ContractReport>>> + Send + '_>>
Lists a bounded page of contract entities from the immutable graph snapshot.
Sourcepub fn source_context_tool_attr() -> Tool
pub fn source_context_tool_attr() -> Tool
Generated tool metadata function for source_context
Sourcepub fn source_context(
&self,
Parameters: Parameters<SourceContextInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<SourceContextReport>>> + Send + '_>>
pub fn source_context( &self, Parameters: Parameters<SourceContextInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<SourceContextReport>>> + Send + '_>>
Returns bounded persisted graph and evidence metadata for one entity.
Sourcepub fn scan_tool_attr() -> Tool
pub fn scan_tool_attr() -> Tool
Generated tool metadata function for scan
Sourcepub fn scan(
&self,
Parameters: Parameters<WorkspaceInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ScanSummary>>>> + Send + '_>>
pub fn scan( &self, Parameters: Parameters<WorkspaceInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ScanSummary>>>> + Send + '_>>
Scans and atomically publishes the configured workspace.
Sourcepub fn update_workspace_tool_attr() -> Tool
pub fn update_workspace_tool_attr() -> Tool
Generated tool metadata function for update_workspace
Sourcepub fn update_workspace(
&self,
Parameters: Parameters<WorkspaceUpdateInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ManifestAdminReport>>>> + Send + '_>>
pub fn update_workspace( &self, Parameters: Parameters<WorkspaceUpdateInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ManifestAdminReport>>>> + Send + '_>>
Adds or removes one repository entry through the constrained manifest editor.
Sourcepub fn write_manual_link_tool_attr() -> Tool
pub fn write_manual_link_tool_attr() -> Tool
Generated tool metadata function for write_manual_link
Sourcepub fn write_manual_link(
&self,
Parameters: Parameters<ManualLinkWriteInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ManifestAdminReport>>>> + Send + '_>>
pub fn write_manual_link( &self, Parameters: Parameters<ManualLinkWriteInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ManifestAdminReport>>>> + Send + '_>>
Appends one exact manual relationship declaration and republishes the workspace.
Sourcepub fn clean_cache_tool_attr() -> Tool
pub fn clean_cache_tool_attr() -> Tool
Generated tool metadata function for clean_cache
Sourcepub fn clean_cache(
&self,
Parameters: Parameters<CacheCleanInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<CacheCleanReport>>>> + Send + '_>>
pub fn clean_cache( &self, Parameters: Parameters<CacheCleanInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<CacheCleanReport>>>> + Send + '_>>
Removes bounded reusable query results for the configured workspace.
Sourcepub fn recompute_communities_tool_attr() -> Tool
pub fn recompute_communities_tool_attr() -> Tool
Generated tool metadata function for recompute_communities
Sourcepub fn recompute_communities(
&self,
Parameters: Parameters<WorkspaceInput>,
) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ScanSummary>>>> + Send + '_>>
pub fn recompute_communities( &self, Parameters: Parameters<WorkspaceInput>, ) -> Pin<Box<dyn Future<Output = Json<ToolEnvelope<AdminAudit<ScanSummary>>>> + Send + '_>>
Recomputes communities by publishing a freshly analyzed workspace snapshot.
Trait Implementations§
Source§impl Clone for CodeSystemGraphServer
impl Clone for CodeSystemGraphServer
Source§fn clone(&self) -> CodeSystemGraphServer
fn clone(&self) -> CodeSystemGraphServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodeSystemGraphServer
impl Debug for CodeSystemGraphServer
Source§impl ServerHandler for CodeSystemGraphServer
impl ServerHandler for CodeSystemGraphServer
fn get_info(&self) -> ServerInfo
async fn list_resources( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListResourcesResult, McpError>
async fn read_resource( &self, request: ReadResourceRequestParams, _context: RequestContext<RoleServer>, ) -> Result<ReadResourceResponse, McpError>
Source§async fn call_tool(
&self,
request: CallToolRequestParams,
context: RequestContext<RoleServer>,
) -> Result<CallToolResponse, ErrorData>
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResponse, ErrorData>
tools/call request from a client. Read moreasync fn list_tools( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, ErrorData>
fn ping( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn initialize( &self, request: InitializeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<InitializeResult, ErrorData>> + MaybeSendFuture
Source§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
Source§fn discover(
&self,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture
fn discover( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture
fn complete( &self, request: CompleteRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CompleteResult, ErrorData>> + MaybeSendFuture
fn set_level( &self, request: SetLevelRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetPromptResponse, ErrorData>> + MaybeSendFuture
fn list_prompts( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListPromptsResult, ErrorData>> + MaybeSendFuture
fn list_resource_templates( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourceTemplatesResult, ErrorData>> + MaybeSendFuture
Source§fn accepted_subscription_filter(
&self,
requested: &SubscriptionFilter,
) -> Option<SubscriptionFilter>
fn accepted_subscription_filter( &self, requested: &SubscriptionFilter, ) -> Option<SubscriptionFilter>
Source§fn listen(
&self,
context: SubscriptionContext,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn listen( &self, context: SubscriptionContext, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
Source§fn subscribe(
&self,
request: SubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/subscribe is legacy-only; implement accepted_subscription_filter and listen for protocol version 2026-07-28
Source§fn unsubscribe(
&self,
request: UnsubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/unsubscribe is legacy-only; subscriptions/listen is cancelled through its request lifecycle
fn on_custom_request( &self, request: CustomRequest, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CustomResult, ErrorData>> + MaybeSendFuture
fn on_cancelled( &self, notification: CancelledNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_progress( &self, notification: ProgressNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_initialized( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_roots_list_changed( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_custom_notification( &self, notification: CustomNotification, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
Source§fn get_task(
&self,
request: GetTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
fn get_task( &self, request: GetTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
tasks/get: return the current DetailedTask state.Source§fn update_task(
&self,
request: UpdateTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn update_task( &self, request: UpdateTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/update: accept responses to outstanding in-task
input requests. Returns an empty acknowledgement on success.Source§fn cancel_task(
&self,
request: CancelTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/cancel: cooperative cancellation. Returns an empty
acknowledgement; the task’s observable status may lag.Auto Trait Implementations§
impl !RefUnwindSafe for CodeSystemGraphServer
impl !UnwindSafe for CodeSystemGraphServer
impl Freeze for CodeSystemGraphServer
impl Send for CodeSystemGraphServer
impl Sync for CodeSystemGraphServer
impl Unpin for CodeSystemGraphServer
impl UnsafeUnpin for CodeSystemGraphServer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn get_info(&self) -> <R as ServiceRole>::Info
Source§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
async fn handle_request( &self, request: <RoleServer as ServiceRole>::PeerReq, context: RequestContext<RoleServer>, ) -> Result<<RoleServer as ServiceRole>::Resp, ErrorData>
async fn handle_notification( &self, notification: <RoleServer as ServiceRole>::PeerNot, context: NotificationContext<RoleServer>, ) -> Result<(), ErrorData>
fn get_info(&self) -> <RoleServer as ServiceRole>::Info
Source§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
initialize
negotiation may agree to. Read more