@grackle-ai/mcp 0.70.0 → 0.70.2
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/README.md +264 -0
- package/dist/tools/knowledge.d.ts.map +1 -1
- package/dist/tools/knowledge.js +56 -5
- package/dist/tools/knowledge.js.map +1 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# @grackle-ai/mcp
|
|
2
|
+
|
|
3
|
+
**MCP (Model Context Protocol) server for [Grackle](https://github.com/nick-pape/grackle)** — exposes Grackle's full capabilities as MCP tools so any AI agent can manage environments, spawn sessions, orchestrate tasks, and share knowledge.
|
|
4
|
+
|
|
5
|
+
This package translates MCP tool calls into [ConnectRPC](https://connectrpc.com/) requests to the Grackle server. It implements the [MCP Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) and supports multiple concurrent client sessions.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @grackle-ai/mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or run the standalone server directly:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @grackle-ai/mcp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
The MCP server connects to an already-running Grackle server. Start the Grackle server first, then launch the MCP server:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# 1. Start the Grackle server (installs the CLI if needed)
|
|
25
|
+
npx @grackle-ai/cli serve
|
|
26
|
+
|
|
27
|
+
# 2. Start the MCP server (reads the API key automatically)
|
|
28
|
+
npx @grackle-ai/mcp
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The MCP server listens on `http://127.0.0.1:7435/mcp` by default.
|
|
32
|
+
|
|
33
|
+
## Configuration
|
|
34
|
+
|
|
35
|
+
All configuration is via environment variables:
|
|
36
|
+
|
|
37
|
+
| Variable | Default | Description |
|
|
38
|
+
|----------|---------|-------------|
|
|
39
|
+
| `GRACKLE_MCP_PORT` | `7435` | Port the MCP server listens on |
|
|
40
|
+
| `GRACKLE_HOST` | `127.0.0.1` | Bind address (must be a loopback address) |
|
|
41
|
+
| `GRACKLE_URL` | `http://127.0.0.1:7434` | URL of the Grackle gRPC server to connect to |
|
|
42
|
+
| `GRACKLE_API_KEY` | *(auto-loaded)* | API key for authenticating with the gRPC server. If not set, reads from `~/.grackle/api-key` |
|
|
43
|
+
| `LOG_LEVEL` | `info` | Logging level (`debug`, `info`, `warn`, `error`) |
|
|
44
|
+
|
|
45
|
+
## Programmatic Usage
|
|
46
|
+
|
|
47
|
+
The package also exports `createMcpServer` for embedding the MCP server in your own application:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { createMcpServer } from "@grackle-ai/mcp";
|
|
51
|
+
|
|
52
|
+
const server = createMcpServer({
|
|
53
|
+
bindHost: "127.0.0.1",
|
|
54
|
+
mcpPort: 7435,
|
|
55
|
+
grpcPort: 7434,
|
|
56
|
+
apiKey: "your-api-key",
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
server.listen(7435, "127.0.0.1", () => {
|
|
60
|
+
console.log("MCP server ready");
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Authentication
|
|
65
|
+
|
|
66
|
+
The MCP server supports three authentication modes:
|
|
67
|
+
|
|
68
|
+
- **API key** — Full access. Pass as `Authorization: Bearer <api-key>`.
|
|
69
|
+
- **OAuth** — Full access. Token issued by the Grackle OAuth authorization server.
|
|
70
|
+
- **Scoped token** — Limited tool access. Issued to agents working on a specific task. Only a subset of tools is available (see [Scoped Access](#scoped-access) below).
|
|
71
|
+
|
|
72
|
+
## Client Configuration
|
|
73
|
+
|
|
74
|
+
### Claude Desktop / Claude Code
|
|
75
|
+
|
|
76
|
+
Add to your MCP configuration (`claude_desktop_config.json` or `.mcp.json`):
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"grackle": {
|
|
82
|
+
"url": "http://127.0.0.1:7435/mcp",
|
|
83
|
+
"headers": {
|
|
84
|
+
"Authorization": "Bearer <your-api-key>"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Any MCP-compatible client
|
|
92
|
+
|
|
93
|
+
Point your client at `http://127.0.0.1:7435/mcp` using the Streamable HTTP transport with a Bearer token in the `Authorization` header.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Tool Reference
|
|
98
|
+
|
|
99
|
+
The MCP server exposes 50 tools organized into 13 groups. Each tool validates its inputs against a strict schema and returns structured JSON results.
|
|
100
|
+
|
|
101
|
+
### Environment Tools
|
|
102
|
+
|
|
103
|
+
Manage compute environments where agents run (Docker, SSH, Codespace, local).
|
|
104
|
+
|
|
105
|
+
| Tool | Description | Parameters |
|
|
106
|
+
|------|-------------|------------|
|
|
107
|
+
| `env_list` | List all registered environments with status, adapter type, and runtime. | *(none)* |
|
|
108
|
+
| `env_add` | Register a new environment. | `displayName` (string), `adapterType` (string), `adapterConfig?` (object) |
|
|
109
|
+
| `env_provision` | Provision an environment — start resources, install the agent, and connect. | `environmentId` (string) |
|
|
110
|
+
| `env_stop` | Stop a running environment without destroying its resources. | `environmentId` (string) |
|
|
111
|
+
| `env_destroy` | Destroy an environment's backing resources (e.g., delete the container). | `environmentId` (string) |
|
|
112
|
+
| `env_remove` | Remove an environment registration. Must be stopped first. | `environmentId` (string) |
|
|
113
|
+
| `env_wake` | Wake a stopped environment by re-provisioning it. | `environmentId` (string) |
|
|
114
|
+
|
|
115
|
+
### Session Tools
|
|
116
|
+
|
|
117
|
+
Manage AI agent sessions — spawn, monitor, interact, and terminate.
|
|
118
|
+
|
|
119
|
+
| Tool | Description | Parameters |
|
|
120
|
+
|------|-------------|------------|
|
|
121
|
+
| `session_spawn` | Spawn a new agent session with a prompt and optional model config. | `environmentId` (string), `prompt` (string), `maxTurns?` (int), `personaId?` (string), `worktreeBasePath?` (string) |
|
|
122
|
+
| `session_resume` | Resume a terminated session (completed, failed, or interrupted). | `sessionId` (string) |
|
|
123
|
+
| `session_status` | List sessions with optional filtering by environment and status. | `environmentId?` (string), `all?` (boolean, default false) |
|
|
124
|
+
| `session_kill` | Terminate a running session immediately. | `sessionId` (string) |
|
|
125
|
+
| `session_attach` | Stream events from a running session for a limited duration. | `sessionId` (string), `timeoutSeconds?` (int, default 30, max 300), `maxEvents?` (int) |
|
|
126
|
+
| `session_send_input` | Send a text message to a session waiting for user input. | `sessionId` (string), `text` (string) |
|
|
127
|
+
|
|
128
|
+
### Workspace Tools
|
|
129
|
+
|
|
130
|
+
Manage workspaces that group tasks, agents, and repositories.
|
|
131
|
+
|
|
132
|
+
| Tool | Description | Parameters |
|
|
133
|
+
|------|-------------|------------|
|
|
134
|
+
| `workspace_list` | List all workspaces with names, descriptions, repos, and status. | `environmentId?` (string) |
|
|
135
|
+
| `workspace_create` | Create a new workspace. | `name` (string), `environmentId` (string), `description?` (string), `repoUrl?` (string), `worktreeBasePath?` (string), `useWorktrees?` (boolean), `defaultPersonaId?` (string) |
|
|
136
|
+
| `workspace_get` | Get full details of a workspace by ID. | `workspaceId` (string) |
|
|
137
|
+
| `workspace_update` | Update a workspace's name, description, repo, or settings. | `workspaceId` (string), `name?`, `description?`, `repoUrl?`, `environmentId?`, `worktreeBasePath?`, `useWorktrees?`, `defaultPersonaId?` |
|
|
138
|
+
| `workspace_archive` | Archive a workspace, marking it as inactive. | `workspaceId` (string) |
|
|
139
|
+
|
|
140
|
+
### Task Tools
|
|
141
|
+
|
|
142
|
+
Create, manage, and run tasks within workspaces. Supports hierarchical task trees and dependency gating.
|
|
143
|
+
|
|
144
|
+
| Tool | Description | Parameters |
|
|
145
|
+
|------|-------------|------------|
|
|
146
|
+
| `task_list` | List tasks with optional search and status filters. | `workspaceId?` (string), `search?` (string), `status?` (string: `not_started`, `working`, `paused`, `complete`, `failed`) |
|
|
147
|
+
| `task_create` | Create a new task with dependencies and parent hierarchy. | `workspaceId?` (string), `title` (string), `description?` (string), `dependsOn?` (string[]), `parentTaskId?` (string), `canDecompose?` (boolean), `defaultPersonaId?` (string) |
|
|
148
|
+
| `task_show` | Get full details of a task. | `taskId` (string) |
|
|
149
|
+
| `task_update` | Update a task's title, description, status, or dependencies. | `taskId` (string), `title?`, `description?`, `status?` (enum), `dependsOn?` (string[]), `sessionId?` (string) |
|
|
150
|
+
| `task_start` | Start a task by spawning an agent session. Supports IPC pipe modes. | `taskId` (string), `personaId?` (string), `environmentId?` (string), `notes?` (string), `pipe?` (`sync` \| `async` \| `detach`) |
|
|
151
|
+
| `task_delete` | Permanently delete a task. | `taskId` (string) |
|
|
152
|
+
| `task_complete` | Mark a task as complete (sticky status). | `taskId` (string) |
|
|
153
|
+
| `task_resume` | Resume the latest session for a task. | `taskId` (string) |
|
|
154
|
+
| `task_import_github` | Import GitHub issues as tasks. | `workspaceId` (string), `repo` (string, `owner/repo`), `label?` (string), `state?` (`open` \| `closed`), `environmentId?` (string), `includeComments?` (boolean) |
|
|
155
|
+
|
|
156
|
+
### Finding Tools
|
|
157
|
+
|
|
158
|
+
Post and query categorized discoveries shared across agents.
|
|
159
|
+
|
|
160
|
+
| Tool | Description | Parameters |
|
|
161
|
+
|------|-------------|------------|
|
|
162
|
+
| `finding_list` | Query findings for a workspace with optional filters. | `workspaceId` (string), `category?` (string), `tag?` (string), `limit?` (int) |
|
|
163
|
+
| `finding_post` | Post a new finding with title, category, content, and tags. | `workspaceId` (string), `title` (string), `category?` (string), `content?` (string), `tags?` (string[]) |
|
|
164
|
+
|
|
165
|
+
### Persona Tools
|
|
166
|
+
|
|
167
|
+
Manage agent personas — reusable templates defining system prompt, runtime, and model.
|
|
168
|
+
|
|
169
|
+
| Tool | Description | Parameters |
|
|
170
|
+
|------|-------------|------------|
|
|
171
|
+
| `persona_list` | List all available personas. | *(none)* |
|
|
172
|
+
| `persona_create` | Create a new persona template (`agent` or `script` type). | `name` (string), `systemPrompt?` (string), `description?` (string), `runtime?` (string), `model?` (string), `maxTurns?` (int), `type?` (`agent` \| `script`), `script?` (string) |
|
|
173
|
+
| `persona_show` | Get full details of a persona. | `personaId` (string) |
|
|
174
|
+
| `persona_edit` | Update an existing persona. | `personaId` (string), `name?`, `systemPrompt?`, `description?`, `runtime?`, `model?`, `maxTurns?`, `type?`, `script?` |
|
|
175
|
+
| `persona_delete` | Delete a persona permanently. | `personaId` (string) |
|
|
176
|
+
|
|
177
|
+
### Knowledge Graph Tools
|
|
178
|
+
|
|
179
|
+
Search and build a semantic knowledge graph across sessions, findings, and task context.
|
|
180
|
+
|
|
181
|
+
| Tool | Description | Parameters |
|
|
182
|
+
|------|-------------|------------|
|
|
183
|
+
| `knowledge_search` | Semantic search over the knowledge graph using natural language. | `query` (string), `limit?` (int, max 50), `workspaceId?` (string), `expand?` (boolean), `expandDepth?` (int, max 5) |
|
|
184
|
+
| `knowledge_get_node` | Retrieve a specific node by ID with optional neighbor expansion. | `id` (string), `expand?` (boolean), `expandDepth?` (int, max 5) |
|
|
185
|
+
| `knowledge_create_node` | Create a new knowledge entry (decision, insight, concept, snippet). | `title` (string), `content` (string), `category?` (string), `tags?` (string[]), `workspaceId?` (string), `edges?` (array of `{toId, type}`) |
|
|
186
|
+
|
|
187
|
+
### IPC Tools
|
|
188
|
+
|
|
189
|
+
Inter-process communication between parent and child agent sessions.
|
|
190
|
+
|
|
191
|
+
| Tool | Description | Parameters |
|
|
192
|
+
|------|-------------|------------|
|
|
193
|
+
| `ipc_spawn` | Spawn a child agent session with an IPC pipe. | `prompt` (string), `pipe` (`sync` \| `async` \| `detach`), `environmentId` (string), `personaId?` (string), `maxTurns?` (int) |
|
|
194
|
+
| `ipc_write` | Write a message to a child session via a file descriptor. | `fd` (int), `message` (string) |
|
|
195
|
+
| `ipc_close` | Close a file descriptor, optionally hibernating the child. | `fd` (int) |
|
|
196
|
+
| `ipc_list_fds` | List your open file descriptors (IPC connections). | *(none)* |
|
|
197
|
+
|
|
198
|
+
### Log Tools
|
|
199
|
+
|
|
200
|
+
Retrieve session logs — raw events, formatted transcripts, or live tails.
|
|
201
|
+
|
|
202
|
+
| Tool | Description | Parameters |
|
|
203
|
+
|------|-------------|------------|
|
|
204
|
+
| `logs_get` | Retrieve session logs in raw, transcript, or live-tail mode. | `sessionId` (string), `transcript?` (boolean), `tail?` (boolean), `timeoutSeconds?` (int, default 10, max 60), `maxEvents?` (int) |
|
|
205
|
+
|
|
206
|
+
### Token Tools
|
|
207
|
+
|
|
208
|
+
Manage secrets that are auto-forwarded to environments.
|
|
209
|
+
|
|
210
|
+
| Tool | Description | Parameters |
|
|
211
|
+
|------|-------------|------------|
|
|
212
|
+
| `token_list` | List configured tokens (values are never returned). | *(none)* |
|
|
213
|
+
| `token_set` | Set a token for auto-forwarding to environments. | `name` (string), `value` (string), `type?` (`env_var` \| `file`), `envVar?` (string), `filePath?` (string) |
|
|
214
|
+
| `token_delete` | Delete a configured token. | `name` (string) |
|
|
215
|
+
|
|
216
|
+
### Credential Provider Tools
|
|
217
|
+
|
|
218
|
+
Configure which credential providers (Claude, GitHub, Copilot, Codex) are auto-forwarded.
|
|
219
|
+
|
|
220
|
+
| Tool | Description | Parameters |
|
|
221
|
+
|------|-------------|------------|
|
|
222
|
+
| `credential_provider_list` | List current provider configuration. | *(none)* |
|
|
223
|
+
| `credential_provider_set` | Set a provider mode. | `provider` (`claude` \| `github` \| `copilot` \| `codex`), `value` (`off` \| `on` \| `subscription` \| `api_key`) |
|
|
224
|
+
|
|
225
|
+
### Config Tools
|
|
226
|
+
|
|
227
|
+
Read and write global configuration settings.
|
|
228
|
+
|
|
229
|
+
| Tool | Description | Parameters |
|
|
230
|
+
|------|-------------|------------|
|
|
231
|
+
| `config_get_default_persona` | Get the default persona for new sessions. | *(none)* |
|
|
232
|
+
| `config_set_default_persona` | Set the default persona for new sessions. | `personaId` (string) |
|
|
233
|
+
|
|
234
|
+
### Usage Tools
|
|
235
|
+
|
|
236
|
+
Query aggregated token usage and cost data.
|
|
237
|
+
|
|
238
|
+
| Tool | Description | Parameters |
|
|
239
|
+
|------|-------------|------------|
|
|
240
|
+
| `usage_get` | Get token usage and cost for a session, task, task tree, workspace, or environment. | `scope` (`session` \| `task` \| `task_tree` \| `workspace` \| `environment`), `id` (string) |
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Scoped Access
|
|
245
|
+
|
|
246
|
+
When an agent authenticates with a **scoped token** (issued automatically when a task session is started), only a subset of tools is available:
|
|
247
|
+
|
|
248
|
+
- `finding_post`, `finding_list`
|
|
249
|
+
- `task_create`, `task_list`, `task_show`, `task_start`, `task_complete`
|
|
250
|
+
- `session_send_input`
|
|
251
|
+
- `persona_list`, `persona_show`
|
|
252
|
+
- `ipc_spawn`, `ipc_write`, `ipc_close`, `ipc_list_fds`
|
|
253
|
+
- `knowledge_search`, `knowledge_get_node`
|
|
254
|
+
|
|
255
|
+
Scoped tokens also enforce workspace isolation — agents can only see tasks and findings within their own workspace. Subtasks created by a scoped agent are automatically parented to the agent's own task.
|
|
256
|
+
|
|
257
|
+
## Requirements
|
|
258
|
+
|
|
259
|
+
- Node.js >= 22
|
|
260
|
+
- A running [Grackle](https://github.com/nick-pape/grackle) server (`@grackle-ai/cli`)
|
|
261
|
+
|
|
262
|
+
## License
|
|
263
|
+
|
|
264
|
+
MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/tools/knowledge.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAwF1D,iCAAiC;AACjC,eAAO,MAAM,cAAc,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/tools/knowledge.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAwF1D,iCAAiC;AACjC,eAAO,MAAM,cAAc,EAAE,cAAc,EAkV1C,CAAC"}
|
package/dist/tools/knowledge.js
CHANGED
|
@@ -124,13 +124,17 @@ export const knowledgeTools = [
|
|
|
124
124
|
idempotentHint: true,
|
|
125
125
|
openWorldHint: false,
|
|
126
126
|
},
|
|
127
|
-
async handler(args, client) {
|
|
127
|
+
async handler(args, client, authContext) {
|
|
128
128
|
const { query, limit, workspaceId, expand, expandDepth, } = args;
|
|
129
|
+
// For scoped callers, always use the auth context workspace.
|
|
130
|
+
const resolvedWorkspaceId = authContext?.type === "scoped"
|
|
131
|
+
? authContext.workspaceId ?? ""
|
|
132
|
+
: workspaceId ?? "";
|
|
129
133
|
const safeLimit = clampInt(limit, 1, MAX_SEARCH_LIMIT, 10);
|
|
130
134
|
const response = await client.searchKnowledge({
|
|
131
135
|
query,
|
|
132
136
|
limit: safeLimit,
|
|
133
|
-
workspaceId:
|
|
137
|
+
workspaceId: resolvedWorkspaceId,
|
|
134
138
|
});
|
|
135
139
|
const formattedResults = response.results.map(formatSearchResult);
|
|
136
140
|
let neighbors;
|
|
@@ -160,6 +164,23 @@ export const knowledgeTools = [
|
|
|
160
164
|
}
|
|
161
165
|
neighbors = [...allNeighbors.values()];
|
|
162
166
|
neighborEdges = allEdges;
|
|
167
|
+
// Filter expanded neighbors to the caller's workspace for scoped callers.
|
|
168
|
+
if (authContext?.type === "scoped") {
|
|
169
|
+
const allowedWorkspaceId = authContext.workspaceId ?? "";
|
|
170
|
+
const allowedIds = new Set();
|
|
171
|
+
neighbors = neighbors.filter((n) => {
|
|
172
|
+
const allowed = n.workspaceId === allowedWorkspaceId;
|
|
173
|
+
if (allowed) {
|
|
174
|
+
allowedIds.add(n.id);
|
|
175
|
+
}
|
|
176
|
+
return allowed;
|
|
177
|
+
});
|
|
178
|
+
const allowedEdgeNodeIds = new Set([
|
|
179
|
+
...startIds,
|
|
180
|
+
...allowedIds,
|
|
181
|
+
]);
|
|
182
|
+
neighborEdges = neighborEdges.filter((e) => allowedEdgeNodeIds.has(e.fromId) && allowedEdgeNodeIds.has(e.toId));
|
|
183
|
+
}
|
|
163
184
|
}
|
|
164
185
|
return jsonResult({
|
|
165
186
|
results: formattedResults,
|
|
@@ -194,7 +215,7 @@ export const knowledgeTools = [
|
|
|
194
215
|
idempotentHint: true,
|
|
195
216
|
openWorldHint: false,
|
|
196
217
|
},
|
|
197
|
-
async handler(args, client) {
|
|
218
|
+
async handler(args, client, authContext) {
|
|
198
219
|
const { id, expand, expandDepth } = args;
|
|
199
220
|
const response = await client.getKnowledgeNode({ id });
|
|
200
221
|
if (!response.node) {
|
|
@@ -208,6 +229,21 @@ export const knowledgeTools = [
|
|
|
208
229
|
isError: true,
|
|
209
230
|
};
|
|
210
231
|
}
|
|
232
|
+
// For scoped callers, deny access to nodes outside their workspace.
|
|
233
|
+
// Return "not found" to avoid leaking that the node exists.
|
|
234
|
+
if (authContext?.type === "scoped") {
|
|
235
|
+
if (response.node.workspaceId !== (authContext.workspaceId ?? "")) {
|
|
236
|
+
return {
|
|
237
|
+
content: [
|
|
238
|
+
{
|
|
239
|
+
type: "text",
|
|
240
|
+
text: JSON.stringify({ error: `Node not found: ${id}` }, null, 2),
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
isError: true,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
}
|
|
211
247
|
const result = {
|
|
212
248
|
node: formatNode(response.node),
|
|
213
249
|
edges: response.edges.map(formatEdge),
|
|
@@ -215,8 +251,23 @@ export const knowledgeTools = [
|
|
|
215
251
|
if (expand) {
|
|
216
252
|
const safeDepth = clampInt(expandDepth, 1, MAX_EXPAND_DEPTH, 1);
|
|
217
253
|
const expansion = await client.expandKnowledgeNode({ id, depth: safeDepth });
|
|
218
|
-
|
|
219
|
-
|
|
254
|
+
let expandedNodes = expansion.nodes.map(formatNode);
|
|
255
|
+
let expandedEdges = expansion.edges.map(formatEdge);
|
|
256
|
+
// Filter expanded neighbors to the caller's workspace for scoped callers.
|
|
257
|
+
if (authContext?.type === "scoped") {
|
|
258
|
+
const allowedWorkspaceId = authContext.workspaceId ?? "";
|
|
259
|
+
const allowedIds = new Set([id]);
|
|
260
|
+
expandedNodes = expandedNodes.filter((n) => {
|
|
261
|
+
const allowed = n.workspaceId === allowedWorkspaceId;
|
|
262
|
+
if (allowed) {
|
|
263
|
+
allowedIds.add(n.id);
|
|
264
|
+
}
|
|
265
|
+
return allowed;
|
|
266
|
+
});
|
|
267
|
+
expandedEdges = expandedEdges.filter((e) => allowedIds.has(e.fromId) && allowedIds.has(e.toId));
|
|
268
|
+
}
|
|
269
|
+
result.neighbors = expandedNodes;
|
|
270
|
+
result.neighborEdges = expandedEdges;
|
|
220
271
|
}
|
|
221
272
|
return jsonResult(result);
|
|
222
273
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../../src/tools/knowledge.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,sCAAsC;AACtC,MAAM,gBAAgB,GAAW,EAAE,CAAC;AAEpC,uCAAuC;AACvC,MAAM,gBAAgB,GAAW,CAAC,CAAC;AAEnC,8BAA8B;AAC9B,MAAM,UAAU,GAAG;IACjB,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,UAAU;IACV,SAAS;CACD,CAAC;AAEX,8EAA8E;AAC9E,0DAA0D;AAC1D,8EAA8E;AAE9E,iDAAiD;AACjD,SAAS,UAAU,CAAC,IAAgC;IAClD,MAAM,IAAI,GAA4B;QACpC,EAA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C,OAAO,CACX,IAA6B,EAC7B,MAAsC,EACtC,WAAyB;YAEzB,MAAM,EACJ,KAAK,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,WAAW,GACZ,GAAG,IAMH,CAAC;YAEF,6DAA6D;YAC7D,MAAM,mBAAmB,GACvB,WAAW,EAAE,IAAI,KAAK,QAAQ;gBAC5B,CAAC,CAAC,WAAW,CAAC,WAAW,IAAI,EAAE;gBAC/B,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC;YAExB,MAAM,QAAQ,GACZ,MAAM,MAAM,CAAC,mBAAmB,CAAC;gBAC/B,KAAK;gBACL,OAAO;gBACP,QAAQ,EAAE,QAAQ,IAAI,SAAS;gBAC/B,IAAI,EAAE,IAAI,IAAI,EAAE;gBAChB,WAAW,EAAE,mBAAmB;aACjC,CAAC,CAAC;YAEL,oEAAoE;YACpE,gEAAgE;YAChE,wCAAwC;YAExC,OAAO,UAAU,CAAC;gBAChB,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACf,KAAK;gBACL,QAAQ,EAAE,QAAQ,IAAI,SAAS;aAChC,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grackle-ai/mcp",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.2",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server for Grackle — translates MCP tool calls to ConnectRPC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
34
34
|
"pino": "^10.3.1",
|
|
35
35
|
"zod": "^4.0.0",
|
|
36
|
-
"@grackle-ai/common": "0.70.
|
|
36
|
+
"@grackle-ai/common": "0.70.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@rushstack/heft": "1.2.7",
|