@stigmer/mcp-server 3.3.0 → 3.4.1
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 +60 -13
- package/cli/mcp-server-stigmer.js +5 -1
- package/domains/agentexecutions/approve.d.ts +9 -0
- package/domains/agentexecutions/approve.d.ts.map +1 -0
- package/domains/agentexecutions/approve.js +46 -0
- package/domains/agentexecutions/approve.js.map +1 -0
- package/domains/agentexecutions/fetch.d.ts +28 -0
- package/domains/agentexecutions/fetch.d.ts.map +1 -0
- package/domains/agentexecutions/fetch.js +82 -0
- package/domains/agentexecutions/fetch.js.map +1 -0
- package/domains/agentexecutions/run.d.ts +27 -0
- package/domains/agentexecutions/run.d.ts.map +1 -0
- package/domains/agentexecutions/run.js +87 -0
- package/domains/agentexecutions/run.js.map +1 -0
- package/domains/agentexecutions/tools.d.ts +5 -0
- package/domains/agentexecutions/tools.d.ts.map +1 -0
- package/domains/agentexecutions/tools.js +97 -0
- package/domains/agentexecutions/tools.js.map +1 -0
- package/domains/client.d.ts +8 -0
- package/domains/client.d.ts.map +1 -1
- package/domains/client.js +9 -0
- package/domains/client.js.map +1 -1
- package/domains/datastores/apply.d.ts +4 -0
- package/domains/datastores/apply.d.ts.map +1 -0
- package/domains/datastores/apply.js +28 -0
- package/domains/datastores/apply.js.map +1 -0
- package/domains/datastores/delete.d.ts +3 -0
- package/domains/datastores/delete.d.ts.map +1 -0
- package/domains/datastores/delete.js +38 -0
- package/domains/datastores/delete.js.map +1 -0
- package/domains/datastores/fetch.d.ts +3 -0
- package/domains/datastores/fetch.d.ts.map +1 -0
- package/domains/datastores/fetch.js +23 -0
- package/domains/datastores/fetch.js.map +1 -0
- package/domains/datastores/resources.d.ts +5 -0
- package/domains/datastores/resources.d.ts.map +1 -0
- package/domains/datastores/resources.js +16 -0
- package/domains/datastores/resources.js.map +1 -0
- package/domains/datastores/tools.d.ts +5 -0
- package/domains/datastores/tools.d.ts.map +1 -0
- package/domains/datastores/tools.js +46 -0
- package/domains/datastores/tools.js.map +1 -0
- package/domains/environments/apply.d.ts +4 -0
- package/domains/environments/apply.d.ts.map +1 -0
- package/domains/environments/apply.js +30 -0
- package/domains/environments/apply.js.map +1 -0
- package/domains/environments/delete.d.ts +3 -0
- package/domains/environments/delete.d.ts.map +1 -0
- package/domains/environments/delete.js +36 -0
- package/domains/environments/delete.js.map +1 -0
- package/domains/environments/fetch.d.ts +6 -0
- package/domains/environments/fetch.d.ts.map +1 -0
- package/domains/environments/fetch.js +30 -0
- package/domains/environments/fetch.js.map +1 -0
- package/domains/environments/resources.d.ts +5 -0
- package/domains/environments/resources.d.ts.map +1 -0
- package/domains/environments/resources.js +16 -0
- package/domains/environments/resources.js.map +1 -0
- package/domains/environments/tools.d.ts +5 -0
- package/domains/environments/tools.d.ts.map +1 -0
- package/domains/environments/tools.js +51 -0
- package/domains/environments/tools.js.map +1 -0
- package/domains/executions/cancel.d.ts +9 -0
- package/domains/executions/cancel.d.ts.map +1 -0
- package/domains/executions/cancel.js +114 -0
- package/domains/executions/cancel.js.map +1 -0
- package/domains/executions/tools.d.ts +5 -0
- package/domains/executions/tools.d.ts.map +1 -0
- package/domains/executions/tools.js +28 -0
- package/domains/executions/tools.js.map +1 -0
- package/domains/records/tools.d.ts.map +1 -1
- package/domains/records/tools.js +7 -3
- package/domains/records/tools.js.map +1 -1
- package/domains/resourceuri.d.ts.map +1 -1
- package/domains/resourceuri.js +2 -0
- package/domains/resourceuri.js.map +1 -1
- package/domains/search/tools.d.ts.map +1 -1
- package/domains/search/tools.js +10 -7
- package/domains/search/tools.js.map +1 -1
- package/domains/skills/tools.d.ts.map +1 -1
- package/domains/skills/tools.js +25 -1
- package/domains/skills/tools.js.map +1 -1
- package/domains/skills/versions.d.ts +9 -0
- package/domains/skills/versions.d.ts.map +1 -0
- package/domains/skills/versions.js +31 -0
- package/domains/skills/versions.js.map +1 -0
- package/domains/workflowexecutions/approvals.d.ts +17 -0
- package/domains/workflowexecutions/approvals.d.ts.map +1 -0
- package/domains/workflowexecutions/approvals.js +61 -0
- package/domains/workflowexecutions/approvals.js.map +1 -0
- package/domains/workflowexecutions/run.d.ts +12 -0
- package/domains/workflowexecutions/run.d.ts.map +1 -0
- package/domains/workflowexecutions/run.js +69 -0
- package/domains/workflowexecutions/run.js.map +1 -0
- package/domains/workflowexecutions/tools.d.ts.map +1 -1
- package/domains/workflowexecutions/tools.js +89 -6
- package/domains/workflowexecutions/tools.js.map +1 -1
- package/domains/workflows/tools.d.ts.map +1 -1
- package/domains/workflows/tools.js +69 -5
- package/domains/workflows/tools.js.map +1 -1
- package/domains/workflows/versions.d.ts +29 -0
- package/domains/workflows/versions.d.ts.map +1 -0
- package/domains/workflows/versions.js +99 -0
- package/domains/workflows/versions.js.map +1 -0
- package/gen/datastore.d.ts +861 -0
- package/gen/datastore.d.ts.map +1 -0
- package/gen/datastore.js +267 -0
- package/gen/datastore.js.map +1 -0
- package/gen/environment.d.ts +77 -0
- package/gen/environment.d.ts.map +1 -0
- package/gen/environment.js +62 -0
- package/gen/environment.js.map +1 -0
- package/package.json +3 -3
- package/server.d.ts.map +1 -1
- package/server.js +12 -0
- package/server.js.map +1 -1
- package/src/domains/agentexecutions/approve.ts +67 -0
- package/src/domains/agentexecutions/fetch.ts +112 -0
- package/src/domains/agentexecutions/run.ts +112 -0
- package/src/domains/agentexecutions/tools.ts +139 -0
- package/src/domains/apply.integration.test.ts +82 -6
- package/src/domains/client.ts +9 -0
- package/src/domains/datastores/apply.ts +33 -0
- package/src/domains/datastores/delete.ts +47 -0
- package/src/domains/datastores/fetch.ts +32 -0
- package/src/domains/datastores/resources.ts +21 -0
- package/src/domains/datastores/tools.ts +76 -0
- package/src/domains/deletes.integration.test.ts +49 -2
- package/src/domains/environments/apply.ts +40 -0
- package/src/domains/environments/delete.ts +45 -0
- package/src/domains/environments/fetch.ts +39 -0
- package/src/domains/environments/resources.ts +21 -0
- package/src/domains/environments/tools.ts +81 -0
- package/src/domains/executions/cancel.ts +148 -0
- package/src/domains/executions/tools.ts +45 -0
- package/src/domains/executions.integration.test.ts +376 -0
- package/src/domains/reads.integration.test.ts +51 -5
- package/src/domains/records/tools.ts +7 -3
- package/src/domains/resources.integration.test.ts +38 -2
- package/src/domains/resourceuri.test.ts +11 -2
- package/src/domains/resourceuri.ts +2 -0
- package/src/domains/search/search.integration.test.ts +18 -2
- package/src/domains/search/tools.ts +12 -7
- package/src/domains/skills/tools.ts +34 -1
- package/src/domains/skills/versions.ts +47 -0
- package/src/domains/versions.integration.test.ts +212 -0
- package/src/domains/workflowexecutions/approvals.ts +102 -0
- package/src/domains/workflowexecutions/run.ts +87 -0
- package/src/domains/workflowexecutions/tools.ts +120 -6
- package/src/domains/workflows/tools.ts +90 -7
- package/src/domains/workflows/versions.ts +147 -0
- package/src/gen/datastore.ts +264 -0
- package/src/gen/environment.ts +66 -0
- package/src/server.ts +12 -0
package/README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# `@stigmer/mcp-server`
|
|
2
2
|
|
|
3
3
|
A [Model Context Protocol](https://modelcontextprotocol.io) server for the
|
|
4
|
-
Stigmer platform. It exposes Stigmer **agents, skills, MCP servers,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Stigmer platform. It exposes Stigmer **agents, skills, MCP servers, workflows,
|
|
5
|
+
environments, and datastores** as MCP tools and resources — covering both the
|
|
6
|
+
authoring loop (create, read, update, delete, version) and the execution loop
|
|
7
|
+
(run, observe, approve, cancel) — so any MCP-capable client (Claude Desktop,
|
|
8
|
+
Cursor, the Stigmer CLI, etc.) can build on Stigmer through a uniform protocol.
|
|
8
9
|
|
|
9
10
|
The server is a **stateless protocol bridge**: it holds no per-user state and
|
|
10
11
|
performs no business logic. Every request is translated into a gRPC call against
|
|
11
12
|
`stigmer-server`, which remains the single source of truth and the sole authority
|
|
12
13
|
for authentication and authorization. This package is the TypeScript successor to
|
|
13
|
-
the Go `mcp-server
|
|
14
|
+
the retired Go `mcp-server/`.
|
|
14
15
|
|
|
15
16
|
## Architecture
|
|
16
17
|
|
|
@@ -37,14 +38,20 @@ MCP client ──JSON-RPC──▶ stdio | HTTP session ──▶ tool handler
|
|
|
37
38
|
- **`apply_*` ergonomics are generated.** The flattened, LLM-friendly input
|
|
38
39
|
schemas for the `apply_*` tools (metadata hoisting, enum→string, reference
|
|
39
40
|
flattening, oneof / `task_config` expansion) are produced at build time by the
|
|
40
|
-
codegen in `tools/codegen/generator/mcp_ts.go
|
|
41
|
-
the two servers expose identical tool surfaces. Never hand-edit `src/gen/`.
|
|
41
|
+
codegen in `tools/codegen/generator/mcp_ts.go`. Never hand-edit `src/gen/`.
|
|
42
42
|
|
|
43
|
-
## Tools (
|
|
43
|
+
## Tools (38)
|
|
44
|
+
|
|
45
|
+
### Discovery
|
|
46
|
+
|
|
47
|
+
| Tool | Description |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `search` | Search across agents, skills, MCP servers, workflows, environments, and datastores; results are enriched with `stigmer://` resource URIs. |
|
|
50
|
+
|
|
51
|
+
### Authoring
|
|
44
52
|
|
|
45
53
|
| Tool | Description |
|
|
46
54
|
| --- | --- |
|
|
47
|
-
| `search` | Search across agents, skills, MCP servers, and workflows; results are enriched with `stigmer://` resource URIs. |
|
|
48
55
|
| `get_agent` | Read an agent by org + slug. |
|
|
49
56
|
| `apply_agent` | Create or update an agent (idempotent). |
|
|
50
57
|
| `delete_agent` | Delete an agent. |
|
|
@@ -53,16 +60,54 @@ MCP client ──JSON-RPC──▶ stdio | HTTP session ──▶ tool handler
|
|
|
53
60
|
| `delete_mcp_server` | Delete an MCP server. |
|
|
54
61
|
| `get_skill` | Read a skill (optionally a specific version). |
|
|
55
62
|
| `delete_skill` | Delete a skill (all versions). |
|
|
56
|
-
| `
|
|
63
|
+
| `list_skill_versions` | List a skill's version history. |
|
|
64
|
+
| `get_workflow` | Read a workflow by org + slug, or a historical version by hash. |
|
|
57
65
|
| `apply_workflow` | Create or update a workflow, with typed per-kind task config and recursive nested tasks. |
|
|
58
66
|
| `delete_workflow` | Delete a workflow. |
|
|
67
|
+
| `list_workflow_versions` | List a workflow's version history (timeline only, YAML omitted). |
|
|
68
|
+
| `tag_workflow_version` | Assign or move a tag (e.g. `stable`) onto a workflow version. |
|
|
59
69
|
| `validate_workflow_yaml` | Validate a Serverless Workflow YAML document against the task-kind registry. |
|
|
60
70
|
| `get_task_kind_registry` | List every supported workflow task kind. |
|
|
61
71
|
| `get_task_kind` | Read one task kind's config/output schema and examples. |
|
|
72
|
+
| `get_environment` | Read an environment (secret values arrive server-redacted). |
|
|
73
|
+
| `apply_environment` | Create or update an environment; echoing `***REDACTED***` preserves existing secrets. |
|
|
74
|
+
| `delete_environment` | Delete an environment. |
|
|
75
|
+
| `get_datastore` | Read a datastore definition (collections, constraints, grants). |
|
|
76
|
+
| `apply_datastore` | Create or update a datastore definition (structure only, never records). |
|
|
77
|
+
| `delete_datastore` | Delete a datastore and all records in it. |
|
|
78
|
+
|
|
79
|
+
### Execution
|
|
80
|
+
|
|
81
|
+
Runs are asynchronous: the `run_*` tools return immediately with the execution
|
|
82
|
+
ID and the assistant polls the observation tools.
|
|
83
|
+
|
|
84
|
+
| Tool | Description |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `run_agent` | Start an agent execution (new session or `session_id` follow-up). |
|
|
87
|
+
| `run_workflow` | Start a workflow execution. |
|
|
88
|
+
| `get_agent_execution` | Poll an agent execution: phase, message tail (compact view) or full record, pending approvals. |
|
|
62
89
|
| `get_workflow_execution` | Read a workflow execution by id. |
|
|
63
90
|
| `get_workflow_execution_events` | Read the event stream for a workflow execution. |
|
|
91
|
+
| `list_pending_approvals` | Org-wide inbox of workflow `human_input` tasks awaiting a decision. |
|
|
92
|
+
| `submit_agent_execution_approval` | Approve / skip / reject a tool call an agent execution is waiting on. |
|
|
93
|
+
| `submit_workflow_task_approval` | Submit a reviewer decision (outcome + optional form data) for a workflow task. |
|
|
94
|
+
| `cancel_execution` | Gracefully cancel an agent (`aex_*`) or workflow (`wex_*`) execution by ID prefix. |
|
|
95
|
+
|
|
96
|
+
### Datastore records
|
|
97
|
+
|
|
98
|
+
Registered on the full roster with an `org` argument; a records-only roster
|
|
99
|
+
(`STIGMER_MCP_ROSTER=records`, HTTP `/records` route) serves the same five tools
|
|
100
|
+
with the agent-facing surface and nothing else.
|
|
101
|
+
|
|
102
|
+
| Tool | Description |
|
|
103
|
+
| --- | --- |
|
|
104
|
+
| `describe_datastore` | Collections, fields, constraints, and the caller's allowed verbs. |
|
|
105
|
+
| `find_records` | Typed filter query with ordering and paging. |
|
|
106
|
+
| `insert_record` | Insert one record. |
|
|
107
|
+
| `update_record` | Partial-merge update by id. |
|
|
108
|
+
| `delete_record` | Delete one record by id. |
|
|
64
109
|
|
|
65
|
-
## Resources (
|
|
110
|
+
## Resources (7)
|
|
66
111
|
|
|
67
112
|
Resource templates let clients discover and read resources by `stigmer://` URI:
|
|
68
113
|
|
|
@@ -73,6 +118,8 @@ Resource templates let clients discover and read resources by `stigmer://` URI:
|
|
|
73
118
|
| `stigmer_skill` | `stigmer://skills/{org}/{slug}` (latest) |
|
|
74
119
|
| `stigmer_skill_version` | `stigmer://skills/{org}/{slug}/{version}` |
|
|
75
120
|
| `stigmer_workflow` | `stigmer://workflows/{org}/{slug}` |
|
|
121
|
+
| `stigmer_environment` | `stigmer://environments/{org}/{slug}` |
|
|
122
|
+
| `stigmer_datastore` | `stigmer://datastores/{org}/{slug}` |
|
|
76
123
|
|
|
77
124
|
## Configuration
|
|
78
125
|
|
|
@@ -147,8 +194,8 @@ make codegen-apply
|
|
|
147
194
|
```
|
|
148
195
|
|
|
149
196
|
This runs the Go emitter (`tools/codegen/generator`, target `mcp-ts`) over the
|
|
150
|
-
proto contracts.
|
|
151
|
-
|
|
197
|
+
proto contracts. Adding an `apply_*` tool for a new resource is an append to
|
|
198
|
+
`mcpTSApplyResources` in `tools/codegen/generator/mcp_ts.go` plus regeneration.
|
|
152
199
|
|
|
153
200
|
## Conventions
|
|
154
201
|
|