@agentworkforce/mcp-workforce 0.0.0

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.
Files changed (2) hide show
  1. package/README.md +65 -0
  2. package/package.json +44 -0
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # `@agentworkforce/mcp-workforce`
2
+
3
+ An MCP server that exposes workforce primitives (workflows, memory,
4
+ integration clients) to a harness running inside a workforce sandbox.
5
+
6
+ The workforce runtime spawns this server automatically when a handler
7
+ calls `ctx.harness.run(...)` — the harness (Claude Code, Codex, opencode)
8
+ then has tool access to:
9
+
10
+ | Tool | Description |
11
+ |---|---|
12
+ | `workflow.run` | Invoke a workforce cloud workflow by name. Returns `{ runId, status }`. |
13
+ | `workflow.status` | Poll a previously-started workflow run for status/output. |
14
+ | `memory.save` | Persist a memory entry to the workspace memory bag. |
15
+ | `memory.recall` | Semantic search over the workspace memory bag. |
16
+ | `integration.github.comment` | Post a comment on a GitHub issue/PR. |
17
+ | `integration.github.createIssue` | Create a GitHub issue. |
18
+ | `integration.github.upsertIssue` | Update an open issue matching `matchTitle`, or create one. |
19
+ | `integration.github.getPr` | Fetch a PR with title, body, refs, author, and unified diff. |
20
+ | `integration.github.postReview` | Post a PR review (COMMENT / APPROVE / REQUEST_CHANGES). |
21
+
22
+ ## Running stand-alone
23
+
24
+ ```sh
25
+ export WORKFORCE_WORKSPACE_ID=ws_demo
26
+ export WORKFORCE_RUNTIME_TOKEN=<workspace-token> # required for workflow.*
27
+ export SUPERMEMORY_API_KEY=<key> # required for memory.*
28
+ export RELAYFILE_MOUNT_ROOT=/path/to/relayfile/mount # required for integration.*
29
+
30
+ npx @agentworkforce/mcp-workforce
31
+ ```
32
+
33
+ The server speaks MCP over stdio. Integration tools don't talk to
34
+ GitHub/Linear/etc. directly — they write canonical JSON files inside
35
+ the Relayfile mount, and Relayfile's writeback worker turns those
36
+ into real provider API calls. Relayfile holds the OAuth credentials;
37
+ the MCP server itself never sees a provider token.
38
+
39
+ ## Persona-side wiring
40
+
41
+ The runtime injects this server automatically when `ctx.harness.run`
42
+ spawns a harness. Personas that want to declare it manually can use:
43
+
44
+ ```jsonc
45
+ "mcpServers": {
46
+ "workforce": { "command": "npx", "args": ["@agentworkforce/mcp-workforce"] }
47
+ }
48
+ ```
49
+
50
+ ## Configuration
51
+
52
+ | Env var | Purpose | Required when |
53
+ |---|---|---|
54
+ | `WORKFORCE_WORKSPACE_ID` | Workspace this server is bound to | always |
55
+ | `WORKFORCE_PERSONA_ID` | Persona id (logged for audit) | optional |
56
+ | `WORKFORCE_RUNTIME_TOKEN` | Workspace-scoped token for cloud API calls | `workflow.*` |
57
+ | `WORKFORCE_CLOUD_URL` | Override cloud base URL | optional |
58
+ | `SUPERMEMORY_API_KEY` | Memory adapter credentials | `memory.*` |
59
+ | `SUPERMEMORY_ENDPOINT` | Override supermemory endpoint | optional |
60
+ | `RELAYFILE_MOUNT_ROOT` | Relayfile mount root the integration clients write into | `integration.*` |
61
+ | `RELAYFILE_ROOT` | Legacy alias for `RELAYFILE_MOUNT_ROOT` | optional |
62
+ | `WORKFORCE_WRITEBACK_TIMEOUT_MS` | Per-call writeback wait; default 30000 | optional |
63
+
64
+ Tools that lack their required env throw a clear setup error at first
65
+ call — the server itself still boots so partial wiring is debuggable.
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@agentworkforce/mcp-workforce",
3
+ "version": "0.0.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "workforce-mcp": "./dist/bin.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "README.md",
21
+ "package.json"
22
+ ],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/AgentWorkforce/workforce",
26
+ "directory": "packages/mcp-workforce"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "scripts": {
32
+ "build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
33
+ "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
34
+ "typecheck": "tsc -p tsconfig.json --noEmit",
35
+ "test": "tsc -p tsconfig.json && node --test dist/**/*.test.js dist/*.test.js",
36
+ "lint": "tsc -p tsconfig.json --noEmit"
37
+ },
38
+ "dependencies": {
39
+ "@agentworkforce/persona-kit": "workspace:*",
40
+ "@agentworkforce/runtime": "workspace:*",
41
+ "@modelcontextprotocol/sdk": "^1.21.0",
42
+ "zod": "^3.23.8"
43
+ }
44
+ }