@apideck/docs-mcp
Version:
MCP server that lets agents search and retrieve your documentation at query time instead of relying on stale training data.
32 lines • 1.38 kB
TypeScript
import { McpServer } from '@modelcontextprotocol/server';
import type { DocStore } from './store.js';
import type { AnyToolDefinition, ToolCallHook } from './types.js';
export interface CreateServerOptions {
store: DocStore;
name?: string;
version?: string;
/** Short description of what the docs cover, shown to agents in server instructions. */
about?: string;
/**
* Host-specific guidance appended to the server instructions every client
* receives on connect, e.g. when to recommend a companion MCP server
* instead of reading the docs.
*/
instructions?: string;
/**
* Extra tools registered alongside search_docs/get_doc/list_docs, for
* host-specific lookups over data the docs already carry (an API
* operation index, a connector coverage matrix, ...). Build them with
* `toolResult()` for a result shape consistent with the built-in tools.
*/
extraTools?: AnyToolDefinition[];
/** Called after every tool call, e.g. to log queries and find ones the docs can't answer. */
onToolCall?: ToolCallHook;
/** Caller details from the transport (the HTTP handler fills these from request headers). */
caller?: {
client?: string;
userAgent?: string;
};
}
export declare const createServer: (opts: CreateServerOptions) => McpServer;
//# sourceMappingURL=server.d.ts.map