@atollhq/mcp-server 0.1.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.
- package/README.md +89 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +1216 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# @atollhq/mcp-server
|
|
2
|
+
|
|
3
|
+
Remote-capable MCP server for Atoll. It mirrors the core `@atollhq/cli` workflows as MCP tools while calling the Atoll REST API directly, so clients do not need local Atoll CLI profiles or filesystem access.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @atollhq/mcp-server
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Remote HTTP
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
PORT=8787 atoll-mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The server exposes:
|
|
18
|
+
|
|
19
|
+
- `POST /mcp` -- MCP Streamable HTTP endpoint
|
|
20
|
+
- `GET /health` -- JSON health check
|
|
21
|
+
|
|
22
|
+
Remote clients should send the Atoll API key per request:
|
|
23
|
+
|
|
24
|
+
```http
|
|
25
|
+
Authorization: Bearer sk_atoll_...
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For single-tenant deployments, set:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
export ATOLL_API_KEY="sk_atoll_..."
|
|
32
|
+
export ATOLL_ORG_ID="org-uuid"
|
|
33
|
+
export ATOLL_BASE_URL="https://atollhq.com"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
When `org_id` is omitted from a tool call, the server uses `ATOLL_ORG_ID`. If that is not set, it uses the only org visible to the API key. If multiple orgs are visible, tools return an error asking for `org_id`.
|
|
37
|
+
|
|
38
|
+
## Local stdio
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
ATOLL_API_KEY=sk_atoll_... ATOLL_ORG_ID=org-uuid atoll-mcp --stdio
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Tool coverage
|
|
45
|
+
|
|
46
|
+
The MCP surface uses service-prefixed tool names to avoid collisions:
|
|
47
|
+
|
|
48
|
+
- `atoll_get_heartbeat`
|
|
49
|
+
- `atoll_list_orgs`, `atoll_get_auth_context`
|
|
50
|
+
- `atoll_list_issues`, `atoll_get_issue`, `atoll_create_issue`, `atoll_update_issue`, `atoll_archive_issue`, `atoll_unarchive_issue`
|
|
51
|
+
- `atoll_list_comments`, `atoll_add_comment`
|
|
52
|
+
- `atoll_list_projects`, `atoll_get_project`, `atoll_create_project`
|
|
53
|
+
- `atoll_list_goals`, `atoll_get_goal`, `atoll_create_goal`, `atoll_update_goal`
|
|
54
|
+
- `atoll_list_kpis`, `atoll_get_kpi`, `atoll_create_kpi`, `atoll_update_kpi`, `atoll_list_kpi_snapshots`, `atoll_record_kpi_snapshot`
|
|
55
|
+
- `atoll_create_kpi_http_sync_draft`, `atoll_validate_kpi_http_sync_config` for draft-only KPI sync setup
|
|
56
|
+
- `atoll_list_initiatives`, `atoll_get_initiative`, `atoll_create_initiative`, `atoll_update_initiative`, initiative link tools
|
|
57
|
+
- `atoll_list_milestones`, `atoll_create_milestone`, `atoll_upsert_milestone`
|
|
58
|
+
- `atoll_list_dependencies`, `atoll_add_dependency`, `atoll_remove_dependency`
|
|
59
|
+
- `atoll_list_webhooks`, `atoll_create_webhook`, `atoll_delete_webhook`
|
|
60
|
+
- `atoll_send_feedback`
|
|
61
|
+
- `atoll_api_request` for advanced REST endpoints not yet promoted to a first-class tool
|
|
62
|
+
|
|
63
|
+
`atoll_update_issue` accepts `comment_body` and `commentBody` with status updates. Use this when applying a heartbeat `start_work` recommendation so the KPI, initiative, initiative target, why-now, expected impact, first step, and success criteria remain as a durable issue comment while the issue status changes.
|
|
64
|
+
|
|
65
|
+
KPI HTTP sync admin routes are intentionally blocked from `atoll_api_request`. Use `atoll_create_kpi_http_sync_draft` or `atoll_validate_kpi_http_sync_config` for agent-authored drafts; human admins must use Atoll for exact-host allowlists, secret entry, dry-runs, publishing, disabling, and run-now snapshot writes.
|
|
66
|
+
|
|
67
|
+
## Skills packaging
|
|
68
|
+
|
|
69
|
+
Keep Atoll skills separate from this MCP server.
|
|
70
|
+
|
|
71
|
+
The MCP package should stay runtime-focused: transport, auth, validation, Atoll API calls, and structured tool responses. Skills are client-side agent guidance and already differ by environment (`skill-claude`, `skill-codex`, `skill-gemini`, ClawHub). The server exposes an `atoll://skills/packaging` resource that explains this decision to MCP clients, but it does not bundle local skill files.
|
|
72
|
+
|
|
73
|
+
## ChatGPT app path
|
|
74
|
+
|
|
75
|
+
OpenAI’s Apps SDK builds ChatGPT apps around an MCP server plus optional UI components. The next step is to make this package deployable at a public HTTPS URL, add OAuth or API-key setup for ChatGPT users, then add Apps SDK resources/components for richer Atoll views such as heartbeat, board, issue detail, and KPI trend panels.
|
|
76
|
+
|
|
77
|
+
Useful official starting points:
|
|
78
|
+
|
|
79
|
+
- `https://developers.openai.com/apps-sdk/`
|
|
80
|
+
- `https://developers.openai.com/apps-sdk/build/mcp-server`
|
|
81
|
+
- `https://developers.openai.com/apps-sdk/build/components`
|
|
82
|
+
- `https://developers.openai.com/apps-sdk/build/auth`
|
|
83
|
+
|
|
84
|
+
## Development
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bun test packages/mcp-server/test/*.test.ts
|
|
88
|
+
bun run --cwd packages/mcp-server build
|
|
89
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as node_http from 'node:http';
|
|
2
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
|
|
5
|
+
interface AtollApiClientOptions {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
fetch?: typeof fetch;
|
|
10
|
+
}
|
|
11
|
+
declare class AtollApiClient {
|
|
12
|
+
readonly baseUrl: string;
|
|
13
|
+
private readonly apiKey;
|
|
14
|
+
private readonly timeoutMs;
|
|
15
|
+
private readonly fetchImpl;
|
|
16
|
+
constructor(options: AtollApiClientOptions);
|
|
17
|
+
request<T = unknown>(method: string, path: string, body?: unknown): Promise<T>;
|
|
18
|
+
get<T = unknown>(path: string): Promise<T>;
|
|
19
|
+
post<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
20
|
+
put<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
21
|
+
patch<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
22
|
+
delete<T = unknown>(path: string): Promise<T>;
|
|
23
|
+
}
|
|
24
|
+
declare function resolveAuthToken(authorizationHeader?: string): string;
|
|
25
|
+
declare function resolveOrgId(client: AtollApiClient, explicitOrgId?: string): Promise<string>;
|
|
26
|
+
|
|
27
|
+
interface HealthResponse {
|
|
28
|
+
status: number;
|
|
29
|
+
headers: Record<string, string>;
|
|
30
|
+
body: string;
|
|
31
|
+
}
|
|
32
|
+
declare function extractBearerToken(header?: string): string | undefined;
|
|
33
|
+
declare function healthResponse(): HealthResponse;
|
|
34
|
+
declare function handleMcpHttpRequest(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
35
|
+
declare function createAtollHttpServer(): node_http.Server<typeof IncomingMessage, typeof ServerResponse>;
|
|
36
|
+
|
|
37
|
+
declare function listAtollToolNames(): string[];
|
|
38
|
+
interface AtollMcpServer {
|
|
39
|
+
server: McpServer;
|
|
40
|
+
instructions: string;
|
|
41
|
+
toolNames: string[];
|
|
42
|
+
}
|
|
43
|
+
declare function createAtollMcpServer(): AtollMcpServer;
|
|
44
|
+
|
|
45
|
+
export { AtollApiClient, createAtollHttpServer, createAtollMcpServer, extractBearerToken, handleMcpHttpRequest, healthResponse, listAtollToolNames, resolveAuthToken, resolveOrgId };
|