Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
sdk-node.tsโ€ข898 B
import MCPClient from '../sdk/src/client/MCPClient.js'; async function main() { const client = new MCPClient({ url: 'ws://localhost:3001', auth: { token: 'dev' }, agent: { agentId: '00000000-0000-0000-0000-0000000000a1' }, }); client.on('open', () => console.log('connected')); client.on('session', ({ sessionId }) => console.log('session', sessionId)); client.on('reconnected', ({ attempt }) => console.log('reconnected', attempt)); client.on('error', (e) => console.error('error', e)); await client.handshake(); console.log('latency', await client.ping(), 'ms'); const res = await client.call({ method: 'codegraph/task/distribute', params: { taskId: 'demo-task', targetAgents: [], payload: { type: 'noop', data: {} } }}); console.log('response', res); await client.close(); } main().catch((e) => { console.error(e); process.exit(1); });

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