diff --git a/README.md b/README.md index f21c49d..2eabc81 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ A Model Context Protocol (MCP) server implementation that integrates with [Vecto ```bash export VECTORIZE_ORG_ID=YOUR_ORG_ID export VECTORIZE_TOKEN=YOUR_TOKEN -# Optional: Set a fixed pipeline ID to use for all requests export VECTORIZE_PIPELINE_ID=YOUR_PIPELINE_ID -npx -y @vectorize-io/vectorize-mcp-server + +npx -y @vectorize-io/vectorize-mcp-server@latest ``` ## Configuration on Claude/Windsurf/Cursor/Cline @@ -27,7 +27,7 @@ npx -y @vectorize-io/vectorize-mcp-server "mcpServers": { "vectorize": { "command": "npx", - "args": ["-y", "@vectorize-io/vectorize-mcp-server"], + "args": ["-y", "@vectorize-io/vectorize-mcp-server@latest"], "env": { "VECTORIZE_ORG_ID": "your-org-id", "VECTORIZE_TOKEN": "your-token", @@ -47,7 +47,6 @@ Perform vector search and retrieve documents (see official [API](https://docs.ve { "name": "retrieve", "arguments": { - "pipeline": "your-pipeline-id", "question": "Financial health of the company", "k": 5 } @@ -76,7 +75,6 @@ Generate a Private Deep Research from your pipeline (see official [API](https:// { "name": "deep-research", "arguments": { - "pipelineId": "your-pipeline-id", "query": "Generate a financial status report about the company", "webSearch": true } diff --git a/src/index.ts b/src/index.ts index 94b5f01..98d5097 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,7 +19,6 @@ const RETRIEVAL_TOOL: Tool = { inputSchema: { type: 'object', properties: { - question: { type: 'string', description: 'The term to search for.', @@ -28,12 +27,8 @@ const RETRIEVAL_TOOL: Tool = { type: 'number', description: 'The number of documents to retrieve.', }, - pipelineId: { - type: 'string', - description: 'The pipeline ID to retrieve documents from. If not specified explicitly, the value of VECTORIZE_PIPELINE_ID environment variable will be used.', - }, }, - required: process.env.VECTORIZE_PIPELINE_ID ? ['question', 'k'] : ['pipelineId', 'question', 'k'], + required: ['question', 'k'] }, }; @@ -44,10 +39,6 @@ const DEEP_RESEARCH_TOOL: Tool = { inputSchema: { type: 'object', properties: { - pipelineId: { - type: 'string', - description: 'The pipeline ID to retrieve documents from. If not specified explicitly, the value of VECTORIZE_PIPELINE_ID environment variable will be used.', - }, query: { type: 'string', description: 'The deep research query.', @@ -57,7 +48,7 @@ const DEEP_RESEARCH_TOOL: Tool = { description: 'Whether to perform a web search.', }, }, - required: process.env.VECTORIZE_PIPELINE_ID ? ['query', 'webSearch'] : ['pipelineId', 'query', 'webSearch'], + required: ['query', 'webSearch'] }, }; @@ -99,10 +90,9 @@ const server = new Server( const VECTORIZE_ORG_ID = process.env.VECTORIZE_ORG_ID; const VECTORIZE_TOKEN = process.env.VECTORIZE_TOKEN; const VECTORIZE_PIPELINE_ID = process.env.VECTORIZE_PIPELINE_ID; -// Check if API key is required (only for cloud service) -if (!VECTORIZE_ORG_ID || !VECTORIZE_TOKEN) { +if (!VECTORIZE_ORG_ID || !VECTORIZE_TOKEN || !VECTORIZE_PIPELINE_ID) { console.error( - 'Error: VECTORIZE_TOKEN and VECTORIZE_ORG_ID environment variable are required' + 'Error: VECTORIZE_TOKEN and VECTORIZE_ORG_ID and VECTORIZE_PIPELINE_ID environment variable are required' ); process.exit(1); } @@ -252,7 +242,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { case 'retrieve': { return await performRetrieval( VECTORIZE_ORG_ID, - args.pipelineId ? (args.pipelineId + '') : (VECTORIZE_PIPELINE_ID || ''), + VECTORIZE_PIPELINE_ID, args.question + '', Number(args.k) ); @@ -267,7 +257,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { case 'deep-research': { return await performDeepResearch( VECTORIZE_ORG_ID, - args.pipelineId ? (args.pipelineId + '') : (VECTORIZE_PIPELINE_ID || ''), + VECTORIZE_PIPELINE_ID, args.query + '', Boolean(args.webSearch) ); @@ -304,17 +294,10 @@ async function runServer() { server.sendLoggingMessage({ level: 'info', - data: `Configuration: Organization ID: ${VECTORIZE_ORG_ID || 'default'}`, + data: `Configuration: Organization ID: ${VECTORIZE_ORG_ID} with Pipeline ID: ${VECTORIZE_PIPELINE_ID}`, }); - if (VECTORIZE_PIPELINE_ID) { - server.sendLoggingMessage({ - level: 'info', - data: `Configuration: Using fixed Pipeline ID: ${VECTORIZE_PIPELINE_ID}`, - }); - } - - console.error('Vectorize MCP Server running'); + console.info('Vectorize MCP Server running'); } runServer().catch((error) => {