@steno-ai/mcp 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +62 -25929
- package/dist/cli.js.map +1 -1
- package/dist/init.d.ts +3 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +121 -105
- package/dist/init.js.map +1 -0
- package/dist/local-server.d.ts +2 -4
- package/dist/local-server.d.ts.map +1 -1
- package/dist/local-server.js +5 -12
- package/dist/local-server.js.map +1 -1
- package/dist/local.js +47 -5
- package/dist/local.js.map +1 -1
- package/package.json +10 -2
- package/src/cli.ts +4 -4
- package/src/init.ts +1 -1
- package/src/local-server.ts +11 -20
- package/src/local.ts +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steno-ai/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "MCP server for Claude Code, Claude Desktop, and other MCP clients",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"bin": {
|
|
13
|
+
"mcp": "./dist/cli.js",
|
|
13
14
|
"steno-mcp": "./dist/cli.js",
|
|
14
15
|
"steno-mcp-init": "./dist/init.js"
|
|
15
16
|
},
|
|
@@ -21,7 +22,11 @@
|
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
24
|
"types": "./dist/index.d.ts",
|
|
24
|
-
"files": [
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"src",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
25
30
|
"scripts": {
|
|
26
31
|
"test": "vitest run",
|
|
27
32
|
"build": "tsc",
|
|
@@ -29,6 +34,9 @@
|
|
|
29
34
|
},
|
|
30
35
|
"dependencies": {
|
|
31
36
|
"@modelcontextprotocol/sdk": "^1",
|
|
37
|
+
"@steno-ai/engine": "workspace:*",
|
|
38
|
+
"@steno-ai/openai-adapter": "workspace:*",
|
|
39
|
+
"@steno-ai/supabase-adapter": "workspace:*",
|
|
32
40
|
"@supabase/supabase-js": "^2.49.0",
|
|
33
41
|
"openai": "^4.0.0",
|
|
34
42
|
"zod": "^3.25"
|
package/src/cli.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
7
|
import { createLocalServer } from './local-server.js';
|
|
8
|
-
import { createSupabaseClient, SupabaseStorageAdapter } from '
|
|
9
|
-
import { OpenAILLMAdapter, OpenAIEmbeddingAdapter } from '
|
|
10
|
-
import { PerplexityEmbeddingAdapter } from '
|
|
8
|
+
import { createSupabaseClient, SupabaseStorageAdapter } from '@steno-ai/supabase-adapter';
|
|
9
|
+
import { OpenAILLMAdapter, OpenAIEmbeddingAdapter } from '@steno-ai/openai-adapter';
|
|
10
|
+
import { PerplexityEmbeddingAdapter } from '@steno-ai/engine';
|
|
11
11
|
|
|
12
12
|
async function main(): Promise<void> {
|
|
13
13
|
const supabaseUrl = process.env.SUPABASE_URL;
|
|
@@ -49,7 +49,7 @@ async function main(): Promise<void> {
|
|
|
49
49
|
const scopeId = process.env.STENO_SCOPE_ID || 'default';
|
|
50
50
|
|
|
51
51
|
try {
|
|
52
|
-
await storage.createTenant({ id: tenantId, name: 'MCP User', slug: `mcp-${Date.now()}`, plan: 'enterprise' });
|
|
52
|
+
await storage.createTenant({ id: tenantId, name: 'MCP User', slug: `mcp-${Date.now()}`, plan: 'enterprise', config: {} } as any);
|
|
53
53
|
} catch { /* already exists */ }
|
|
54
54
|
|
|
55
55
|
const server = createLocalServer({
|
package/src/init.ts
CHANGED
|
@@ -304,7 +304,7 @@ async function main() {
|
|
|
304
304
|
let skipped = 0;
|
|
305
305
|
for (let i = 0; i < MIGRATIONS.length; i++) {
|
|
306
306
|
try {
|
|
307
|
-
const { error } = await supabase.rpc('exec_sql', { query: MIGRATIONS[i] }).catch(() => ({ error: { message: 'rpc not available' } }));
|
|
307
|
+
const { error } = await (supabase.rpc('exec_sql', { query: MIGRATIONS[i] }) as any).catch(() => ({ error: { message: 'rpc not available' } }));
|
|
308
308
|
if (error) {
|
|
309
309
|
// Try direct REST approach
|
|
310
310
|
const res = await fetch(`${supabaseUrl}/rest/v1/rpc/exec_sql`, {
|
package/src/local-server.ts
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import type { StorageAdapter } from '
|
|
8
|
-
import type { EmbeddingAdapter } from '../../engine/src/adapters/embedding.js';
|
|
9
|
-
import type { LLMAdapter } from '../../engine/src/adapters/llm.js';
|
|
7
|
+
import type { StorageAdapter, EmbeddingAdapter, LLMAdapter } from '@steno-ai/engine';
|
|
10
8
|
|
|
11
9
|
export interface LocalServerConfig {
|
|
12
10
|
storage: StorageAdapter;
|
|
@@ -17,7 +15,7 @@ export interface LocalServerConfig {
|
|
|
17
15
|
scopeId: string;
|
|
18
16
|
embeddingModel: string;
|
|
19
17
|
embeddingDim: number;
|
|
20
|
-
domainEntityTypes?: import('
|
|
18
|
+
domainEntityTypes?: import('@steno-ai/engine').DomainEntityType[];
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
// ---------------------------------------------------------------------------
|
|
@@ -72,23 +70,16 @@ export function createLocalServer(config: LocalServerConfig): McpServer {
|
|
|
72
70
|
const server = new McpServer({
|
|
73
71
|
name: 'steno-local',
|
|
74
72
|
version: '0.1.0',
|
|
75
|
-
instructions: `You have access to the user's persistent long-term memory via Steno.
|
|
76
|
-
|
|
77
|
-
CRITICAL RULES:
|
|
78
|
-
1. ALWAYS call steno_recall BEFORE answering ANY question about the user, their life, work, projects, people they know, preferences, past events, companies, or decisions. Do this BEFORE using web search or "Relevant chats".
|
|
79
|
-
2. When the user shares personal information, experiences, opinions, or decisions, call steno_remember to store it.
|
|
80
|
-
3. Never say "I don't have information about that" without first checking steno_recall.
|
|
81
|
-
4. Steno memory persists across ALL conversations — it knows things from past sessions that your conversation history does not.`,
|
|
82
73
|
});
|
|
83
74
|
|
|
84
75
|
// Lazy import to avoid loading heavy modules at startup
|
|
85
|
-
let _search: typeof import('
|
|
86
|
-
let _pipeline: typeof import('
|
|
87
|
-
let _getOrCreateActiveSession: typeof import('
|
|
76
|
+
let _search: typeof import('@steno-ai/engine').search | null = null;
|
|
77
|
+
let _pipeline: typeof import('@steno-ai/engine').runExtractionPipeline | null = null;
|
|
78
|
+
let _getOrCreateActiveSession: typeof import('@steno-ai/engine').getOrCreateActiveSession | null = null;
|
|
88
79
|
|
|
89
80
|
async function getSearch() {
|
|
90
81
|
if (!_search) {
|
|
91
|
-
const mod = await import('
|
|
82
|
+
const mod = await import('@steno-ai/engine');
|
|
92
83
|
_search = mod.search;
|
|
93
84
|
}
|
|
94
85
|
return _search;
|
|
@@ -96,7 +87,7 @@ CRITICAL RULES:
|
|
|
96
87
|
|
|
97
88
|
async function getPipeline() {
|
|
98
89
|
if (!_pipeline) {
|
|
99
|
-
const mod = await import('
|
|
90
|
+
const mod = await import('@steno-ai/engine');
|
|
100
91
|
_pipeline = mod.runExtractionPipeline;
|
|
101
92
|
}
|
|
102
93
|
return _pipeline;
|
|
@@ -104,7 +95,7 @@ CRITICAL RULES:
|
|
|
104
95
|
|
|
105
96
|
async function getSessionManager() {
|
|
106
97
|
if (!_getOrCreateActiveSession) {
|
|
107
|
-
const mod = await import('
|
|
98
|
+
const mod = await import('@steno-ai/engine');
|
|
108
99
|
_getOrCreateActiveSession = mod.getOrCreateActiveSession;
|
|
109
100
|
}
|
|
110
101
|
return _getOrCreateActiveSession;
|
|
@@ -343,10 +334,10 @@ CRITICAL RULES:
|
|
|
343
334
|
tenantId: config.tenantId,
|
|
344
335
|
factId: fact_id,
|
|
345
336
|
query: '',
|
|
346
|
-
|
|
347
|
-
|
|
337
|
+
retrievalMethod: 'feedback',
|
|
338
|
+
rankPosition: 0,
|
|
348
339
|
responseTimeMs: 0,
|
|
349
|
-
});
|
|
340
|
+
} as any);
|
|
350
341
|
return {
|
|
351
342
|
content: [
|
|
352
343
|
{ type: 'text' as const, text: `Feedback recorded: ${useful ? 'positive' : 'negative'}` },
|
package/src/local.ts
CHANGED
|
@@ -33,9 +33,9 @@ async function main(): Promise<void> {
|
|
|
33
33
|
|
|
34
34
|
// Dynamic imports to avoid loading everything at module level
|
|
35
35
|
const { createSupabaseClient, SupabaseStorageAdapter } = await import(
|
|
36
|
-
'
|
|
36
|
+
'@steno-ai/supabase-adapter'
|
|
37
37
|
);
|
|
38
|
-
const { OpenAILLMAdapter } = await import('
|
|
38
|
+
const { OpenAILLMAdapter } = await import('@steno-ai/openai-adapter');
|
|
39
39
|
|
|
40
40
|
// Set up adapters
|
|
41
41
|
const supabase = createSupabaseClient({ url: supabaseUrl, serviceRoleKey: supabaseKey });
|
|
@@ -49,7 +49,7 @@ async function main(): Promise<void> {
|
|
|
49
49
|
|
|
50
50
|
if (process.env.PERPLEXITY_API_KEY) {
|
|
51
51
|
const { PerplexityEmbeddingAdapter } = await import(
|
|
52
|
-
'
|
|
52
|
+
'@steno-ai/engine'
|
|
53
53
|
);
|
|
54
54
|
embedding = new PerplexityEmbeddingAdapter({
|
|
55
55
|
apiKey: process.env.PERPLEXITY_API_KEY,
|
|
@@ -59,7 +59,7 @@ async function main(): Promise<void> {
|
|
|
59
59
|
embeddingModel = 'pplx-embed-v1-4b';
|
|
60
60
|
embeddingDim = 2000;
|
|
61
61
|
} else {
|
|
62
|
-
const { OpenAIEmbeddingAdapter } = await import('
|
|
62
|
+
const { OpenAIEmbeddingAdapter } = await import('@steno-ai/openai-adapter');
|
|
63
63
|
embedding = new OpenAIEmbeddingAdapter({
|
|
64
64
|
apiKey: openaiKey,
|
|
65
65
|
model: 'text-embedding-3-large',
|
|
@@ -79,7 +79,8 @@ async function main(): Promise<void> {
|
|
|
79
79
|
name: 'Local MCP',
|
|
80
80
|
slug: `local-mcp-${Date.now()}`,
|
|
81
81
|
plan: 'enterprise',
|
|
82
|
-
|
|
82
|
+
config: {},
|
|
83
|
+
} as any);
|
|
83
84
|
} catch {
|
|
84
85
|
// Tenant already exists
|
|
85
86
|
}
|