gitcortex 0.1.0

GitCortex CLI and MCP server — branch-aware code knowledge graph for AI assistants
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::path::PathBuf;

use anyhow::{Context, Result};
use rmcp::{transport::io::stdio, ServiceExt};

use crate::mcp::tools::GitCortexServer;

pub async fn serve(repo_root: PathBuf) -> Result<()> {
    let handler = GitCortexServer::new(&repo_root).context("failed to open graph store")?;

    let transport = stdio();
    tracing::info!("GitCortex MCP server started (stdio)");

    handler.serve(transport).await.context("MCP server error")?;

    Ok(())
}