Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Three-layer model — safe read-only tools run silently; everything else asks:

Full MCP client, both transports:

- **stdio** — local servers, configured in `.klaatai/mcp.json`, built-in presets (filesystem, GitHub, Postgres, Puppeteer, Brave Search, Fetch, …)
- **stdio** — local servers, configured in `.klaatai/mcp.json`, built-in presets (filesystem, GitHub, Postgres, Puppeteer, Brave Search, SQLite, Slack, …)
- **Streamable HTTP** — remote servers via `"url"` config or `/mcp add <url>`; SSE and JSON responses, session management, and **OAuth 2.1** (discovery + dynamic client registration + PKCE browser flow) when the server requires auth — tokens cached in `~/.klaatai/mcp-oauth.json`

Manage live with `/mcp`.
Expand Down
23 changes: 23 additions & 0 deletions src/mcp/presets.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { describe, expect, test } from "bun:test";
import { MCP_PRESETS, getMCPPreset } from "./presets";

describe("MCP presets", () => {
test("slack preset is registered", () => {
const slack = getMCPPreset("slack");
expect(slack).toBeDefined();
expect(slack!.name).toBe("Slack");
expect(slack!.envVars).toContain("SLACK_BOT_TOKEN");
expect(slack!.envVars).toContain("SLACK_TEAM_ID");
expect(slack!.config.command).toBe("npx");
expect(slack!.config.args).toEqual(["-y", "@modelcontextprotocol/server-slack"]);
});

test("preset lookup is case-insensitive", () => {
expect(getMCPPreset("Slack")?.id).toBe("slack");
});

test("ids are unique", () => {
const ids = MCP_PRESETS.map(p => p.id);
expect(new Set(ids).size).toBe(ids.length);
});
});
11 changes: 11 additions & 0 deletions src/mcp/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ export const MCP_PRESETS: MCPPreset[] = [
description: "SQLite access via MCP",
},
},
{
id: "slack",
name: "Slack",
description: "Read channels, post messages, and search Slack history",
envVars: ["SLACK_BOT_TOKEN", "SLACK_TEAM_ID"],
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-slack"],
description: "Slack API via MCP — requires SLACK_BOT_TOKEN and SLACK_TEAM_ID env vars",
},
},
];

/** Look up a preset by id (case-insensitive). */
Expand Down
Loading