4 releases

new 0.2.2 Feb 20, 2026
0.2.1 Feb 14, 2026
0.2.0 Jan 23, 2026
0.1.0 Jan 21, 2026

#2606 in HTTP server


Used in vibe-graph-cli

MIT license

240KB
5K SLoC

MCP (Model Context Protocol) server for Vibe-Graph.

Exposes the Vibe-Graph codebase analysis capabilities as MCP tools, enabling LLM-powered agents to query code structure, analyze impact, and understand dependencies.

The gateway mode allows multiple projects to be served through a single MCP endpoint. Run vg serve --mcp from any project directory - it will either start a gateway or register with an existing one.

use vibe_graph_mcp::gateway::{GatewayState, run_gateway, DEFAULT_GATEWAY_PORT};
use tokio_util::sync::CancellationToken;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let cancel = CancellationToken::new();
    let state = GatewayState::new(cancel);
    run_gateway(state, DEFAULT_GATEWAY_PORT).await?;
    Ok(())
}

Single-Project Mode (Legacy)

For backwards compatibility, single-project mode is still supported:

use vibe_graph_mcp::VibeGraphMcp;
use vibe_graph_ops::Store;
use std::sync::Arc;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let store = Store::new(".");
    let graph = store.load_graph()?.expect("No graph found");
    
    let server = VibeGraphMcp::new(store, Arc::new(graph), ".".into());
    server.run_stdio().await?;
    Ok(())
}

Tools

  • list_projects - List all registered projects (gateway mode)
  • search_nodes - Search for nodes by name/path pattern
  • get_dependencies - Get incoming/outgoing edges for a node
  • impact_analysis - Analyze which nodes are impacted by changes
  • get_git_changes - Get current uncommitted git changes
  • get_node_context - Get a node and its neighbors for context
  • list_files - List files in the graph with filters

Dependencies

~31–50MB
~715K SLoC