MCPcopy Create free account
hub / github.com/docsagent/docsagent / close

Method close

src/index.ts:240–250  ·  view source on GitHub ↗

* Closing interface: Closes the DocsAgent engine via HTTP request.

()

Source from the content-addressed store, hash-verified

238 * Closing interface: Closes the DocsAgent engine via HTTP request.
239 */
240 public async close(): Promise<void> {
241 try {
242 await this.request("/close", "GET");
243 } catch {
244 // If request fails (e.g. already closed), fallback to local kill if we started it
245 if (this.process) {
246 this.process.kill();
247 this.process = null;
248 }
249 }
250 }
251
252 /**
253 * Starts an MCP server instance using this DocsAgent engine.

Callers 2

mainFunction · 0.95
isPortAvailableMethod · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected