diff --git a/README.md b/README.md index 82650e9..58b8cdd 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Documentation is cloned into a temporary directory, and Markdown files are index For Cursor users, you can install the MCP server with a single click using the deeplink below: -[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=pipe-cd.docs-mcp-server&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IEBwaXBlLWNkL2RvY3MtbWNwLXNlcnZlckBsYXRlc3QifQ%3D%3D) +[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=pipe-cd.docs-mcp-server&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IEBwaXBlLWNkL2RvY3MtbWNwLXNlcnZlckBsYXRlc3QifQ%3D%3D) This will automatically configure the MCP server in your Cursor settings. After clicking the link, Cursor will prompt you to install the server. diff --git a/src/loader.ts b/src/loader.ts index 5e70458..00ad090 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -25,7 +25,7 @@ export async function loadDocsFromGitHub(): Promise { } try { - console.info(`Start cloning repo ${REPO} to ${targetDir}`); + console.error(`Start cloning repo ${REPO} to ${targetDir}`); await git.clone(REPO, targetDir, [ "--depth", "1", @@ -36,7 +36,7 @@ export async function loadDocsFromGitHub(): Promise { ]); await git.cwd(targetDir); await git.raw(["sparse-checkout", "set", DOCS_PATH]); - console.info(`Successfully cloned repo ${REPO} to ${targetDir}`); + console.error(`Successfully cloned repo ${REPO} to ${targetDir}`); } catch (error) { console.error(`Error while cloning repo ${REPO} to ${targetDir}: ${error}`); throw error; diff --git a/src/main.ts b/src/main.ts index 5fb3fb2..3145441 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,6 +18,7 @@ async function main() { server.tool( "search_docs", + "Full-text search over PipeCD docs. Query is space-separated keywords (AND search).", { query: z.string(), offset: z.number(), @@ -45,12 +46,19 @@ async function main() { }, ); // NOTE: read_docs might not be called because search_docs contains contents. - server.tool("read_docs", { path: z.string() }, async ({ path }) => { - const doc = docsIndexes.find((doc) => doc.path === path); - return { - content: [{ type: "text", text: doc?.content ?? "document not found" }], - }; - }); + server.tool( + "read_docs", + 'Returns the full content of a specified PipeCD doc page. Provide the relative path of the document (after "docs/content/en/").', + { path: z.string() }, + async ({ path }) => { + const doc = docsIndexes.find((doc) => doc.path === path); + return { + content: [ + { type: "text", text: doc?.content ?? "document not found" }, + ], + }; + }, + ); // Start receiving messages on stdin and sending messages on stdout const transport = new StdioServerTransport();