Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
vector_store_ext.rs853 B
// Extension methods for FaissVectorStore use codegraph_vector::FaissVectorStore; use codegraph_core::{Result, NodeId}; use std::sync::Arc; use uuid::Uuid; pub trait FaissVectorStoreExt { async fn search_similar(&self, embedding: &[f32], k: usize) -> Result<Vec<NodeId>>; async fn get_embedding(&self, node_id: NodeId) -> Result<Option<Vec<f32>>>; } impl FaissVectorStoreExt for Arc<FaissVectorStore> { async fn search_similar(&self, _embedding: &[f32], k: usize) -> Result<Vec<NodeId>> { // Return dummy results for now let mut results = Vec::new(); for _ in 0..k.min(5) { results.push(Uuid::new_v4()); } Ok(results) } async fn get_embedding(&self, _node_id: NodeId) -> Result<Option<Vec<f32>>> { // Return a dummy embedding Ok(Some(vec![0.0; 384])) } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jakedismo/codegraph-rust'

If you have feedback or need assistance with the MCP directory API, please join our Discord server