Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
rr.rsโ€ข801 B
use super::Balancer; use crate::types::{Endpoint, EndpointPool}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; pub struct RoundRobin { idx: AtomicUsize, } impl RoundRobin { pub fn new() -> Self { Self { idx: AtomicUsize::new(0), } } } impl Default for RoundRobin { fn default() -> Self { Self::new() } } impl Balancer for RoundRobin { fn name(&self) -> &'static str { "round_robin" } fn pick(&self, pool: &EndpointPool, _key: Option<&[u8]>) -> Option<Arc<Endpoint>> { let healthy = pool.healthy_endpoints(); if healthy.is_empty() { return None; } let i = self.idx.fetch_add(1, Ordering::Relaxed) % healthy.len(); Some(healthy[i].clone()) } }

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