Skip to content

Commit c118f85

Browse files
authored
fix: make pipeline_id required (#7)
1 parent e310d84 commit c118f85

File tree

2 files changed

+11
-30
lines changed

2 files changed

+11
-30
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ A Model Context Protocol (MCP) server implementation that integrates with [Vecto
1515
```bash
1616
export VECTORIZE_ORG_ID=YOUR_ORG_ID
1717
export VECTORIZE_TOKEN=YOUR_TOKEN
18-
# Optional: Set a fixed pipeline ID to use for all requests
1918
export VECTORIZE_PIPELINE_ID=YOUR_PIPELINE_ID
20-
npx -y @vectorize-io/vectorize-mcp-server
19+
20+
npx -y @vectorize-io/vectorize-mcp-server@latest
2121
```
2222

2323
## Configuration on Claude/Windsurf/Cursor/Cline
@@ -27,7 +27,7 @@ npx -y @vectorize-io/vectorize-mcp-server
2727
"mcpServers": {
2828
"vectorize": {
2929
"command": "npx",
30-
"args": ["-y", "@vectorize-io/vectorize-mcp-server"],
30+
"args": ["-y", "@vectorize-io/vectorize-mcp-server@latest"],
3131
"env": {
3232
"VECTORIZE_ORG_ID": "your-org-id",
3333
"VECTORIZE_TOKEN": "your-token",
@@ -47,7 +47,6 @@ Perform vector search and retrieve documents (see official [API](https://docs.ve
4747
{
4848
"name": "retrieve",
4949
"arguments": {
50-
"pipeline": "your-pipeline-id",
5150
"question": "Financial health of the company",
5251
"k": 5
5352
}
@@ -76,7 +75,6 @@ Generate a Private Deep Research from your pipeline (see official [API](https://
7675
{
7776
"name": "deep-research",
7877
"arguments": {
79-
"pipelineId": "your-pipeline-id",
8078
"query": "Generate a financial status report about the company",
8179
"webSearch": true
8280
}

src/index.ts

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const RETRIEVAL_TOOL: Tool = {
1919
inputSchema: {
2020
type: 'object',
2121
properties: {
22-
2322
question: {
2423
type: 'string',
2524
description: 'The term to search for.',
@@ -28,12 +27,8 @@ const RETRIEVAL_TOOL: Tool = {
2827
type: 'number',
2928
description: 'The number of documents to retrieve.',
3029
},
31-
pipelineId: {
32-
type: 'string',
33-
description: 'The pipeline ID to retrieve documents from. If not specified explicitly, the value of VECTORIZE_PIPELINE_ID environment variable will be used.',
34-
},
3530
},
36-
required: process.env.VECTORIZE_PIPELINE_ID ? ['question', 'k'] : ['pipelineId', 'question', 'k'],
31+
required: ['question', 'k']
3732
},
3833
};
3934

@@ -44,10 +39,6 @@ const DEEP_RESEARCH_TOOL: Tool = {
4439
inputSchema: {
4540
type: 'object',
4641
properties: {
47-
pipelineId: {
48-
type: 'string',
49-
description: 'The pipeline ID to retrieve documents from. If not specified explicitly, the value of VECTORIZE_PIPELINE_ID environment variable will be used.',
50-
},
5142
query: {
5243
type: 'string',
5344
description: 'The deep research query.',
@@ -57,7 +48,7 @@ const DEEP_RESEARCH_TOOL: Tool = {
5748
description: 'Whether to perform a web search.',
5849
},
5950
},
60-
required: process.env.VECTORIZE_PIPELINE_ID ? ['query', 'webSearch'] : ['pipelineId', 'query', 'webSearch'],
51+
required: ['query', 'webSearch']
6152
},
6253
};
6354

@@ -99,10 +90,9 @@ const server = new Server(
9990
const VECTORIZE_ORG_ID = process.env.VECTORIZE_ORG_ID;
10091
const VECTORIZE_TOKEN = process.env.VECTORIZE_TOKEN;
10192
const VECTORIZE_PIPELINE_ID = process.env.VECTORIZE_PIPELINE_ID;
102-
// Check if API key is required (only for cloud service)
103-
if (!VECTORIZE_ORG_ID || !VECTORIZE_TOKEN) {
93+
if (!VECTORIZE_ORG_ID || !VECTORIZE_TOKEN || !VECTORIZE_PIPELINE_ID) {
10494
console.error(
105-
'Error: VECTORIZE_TOKEN and VECTORIZE_ORG_ID environment variable are required'
95+
'Error: VECTORIZE_TOKEN and VECTORIZE_ORG_ID and VECTORIZE_PIPELINE_ID environment variable are required'
10696
);
10797
process.exit(1);
10898
}
@@ -252,7 +242,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
252242
case 'retrieve': {
253243
return await performRetrieval(
254244
VECTORIZE_ORG_ID,
255-
args.pipelineId ? (args.pipelineId + '') : (VECTORIZE_PIPELINE_ID || ''),
245+
VECTORIZE_PIPELINE_ID,
256246
args.question + '',
257247
Number(args.k)
258248
);
@@ -267,7 +257,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
267257
case 'deep-research': {
268258
return await performDeepResearch(
269259
VECTORIZE_ORG_ID,
270-
args.pipelineId ? (args.pipelineId + '') : (VECTORIZE_PIPELINE_ID || ''),
260+
VECTORIZE_PIPELINE_ID,
271261
args.query + '',
272262
Boolean(args.webSearch)
273263
);
@@ -304,17 +294,10 @@ async function runServer() {
304294

305295
server.sendLoggingMessage({
306296
level: 'info',
307-
data: `Configuration: Organization ID: ${VECTORIZE_ORG_ID || 'default'}`,
297+
data: `Configuration: Organization ID: ${VECTORIZE_ORG_ID} with Pipeline ID: ${VECTORIZE_PIPELINE_ID}`,
308298
});
309299

310-
if (VECTORIZE_PIPELINE_ID) {
311-
server.sendLoggingMessage({
312-
level: 'info',
313-
data: `Configuration: Using fixed Pipeline ID: ${VECTORIZE_PIPELINE_ID}`,
314-
});
315-
}
316-
317-
console.error('Vectorize MCP Server running');
300+
console.info('Vectorize MCP Server running');
318301
}
319302

320303
runServer().catch((error) => {

0 commit comments

Comments
 (0)