Skip to content

@gluonjs/core / packages/language-server/src / McpRequest

Interface: McpRequest ​

Properties ​

id? ​

readonly optional id?: string | number


jsonrpc ​

readonly jsonrpc: "2.0"


method ​

readonly method: string


params? ​

readonly optional params?: Record<string, unknown>

Example ​

Construct one JSON-RPC request for the read-only MCP surface:

ts
import { GluonMcpServer, type McpRequest, type McpResponse } from '@gluonjs/language-server';
const request: McpRequest = { jsonrpc: '2.0', id: 1, method: 'tools/list' };
const response: McpResponse = new GluonMcpServer().handle(request);
console.log(response.jsonrpc, response.result);

Version-matched documentation. Examples are checked against the public package contracts.