mcp
Everything exported by guardlink/mcp, from the .d.ts files published in guardlink@2.0.0. See the entry points for the other subpaths, and use guardlink as a library for worked examples.
Interfaces
Section titled “Interfaces”LookupResult
Section titled “LookupResult”Properties
Section titled “Properties”Suggestion
Section titled “Suggestion”Properties
Section titled “Properties”| Property | Type |
|---|---|
annotation |
string |
category |
string |
confidence |
"high" | "medium" | "low" |
file |
string |
line? |
number |
reason |
string |
SuggestOptions
Section titled “SuggestOptions”Properties
Section titled “Properties”| Property | Type |
|---|---|
diff? |
string |
file? |
string |
model |
ThreatModel |
root |
string |
Functions
Section titled “Functions”createServer()
Section titled “createServer()”createServer():
McpServer
GuardLink MCP Server — exports and stdio entry point.
Returns
Section titled “Returns”McpServer
Exposes
Section titled “Exposes”#mcp to #cmd-injection [high] cwe:CWE-78 – “Accepts tool calls from external MCP clients”
#mcp – “All tool calls validated by server.ts before execution”
MCPClient -> #mcp via stdio – “MCP protocol transport”
Boundary
Section titled “Boundary”#mcp and MCPClient (#mcp-boundary) – “Trust boundary at MCP protocol”
Comment
Section titled “Comment”– “D35: the guardlink-mcp bin executes this module directly, so it carries a shebang and a main guard. Startup errors go to stderr — stdout is the JSON-RPC channel and a stray line there corrupts the transport.”
lookup()
Section titled “lookup()”lookup(
model,query):LookupResult
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
model |
ThreatModel |
query |
string |
Returns
Section titled “Returns”startStdioServer()
Section titled “startStdioServer()”startStdioServer():
Promise<void>
Start the MCP server on stdio transport.
Called from CLI: guardlink mcp
Returns
Section titled “Returns”Promise<void>
suggestAnnotations()
Section titled “suggestAnnotations()”suggestAnnotations(
opts):Promise<Suggestion[]>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
SuggestOptions |
Returns
Section titled “Returns”Promise<Suggestion[]>

