Slack Connector
Executable Slack connector for search, channel discovery, history, and approved messaging.
Credential setup
bearerInstall a Slack app with search:read, channels:read, channels:history, and chat:write only when those tools are enabled.
Setup docs: https://api.slack.com/apps
After adding this connector, attach the credential on the server page, then run astrail tools list.
Hosted MCP endpoint
/api/mcp/preset-slackPrivate servers require an Astrail API key in the Authorization header.
MCP client snippets
ConnectClaude Desktop config
{
"mcpServers": {
"slack-connector": {
"url": "/api/mcp/preset-slack"
}
}
}cURL initialize
curl -sS -X POST "/api/mcp/preset-slack" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'cURL tools/list
curl -sS -X POST "/api/mcp/preset-slack" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'cURL tools/call
curl -sS -X POST "/api/mcp/preset-slack" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"slack_search_messages","arguments":{"query":"example","count":"example","page":"example"}}}'Runtime behavior
healthynot_checkedsafe_rest_executionnot recordednot recordednot recordednonestructured fallbackstandardauth_required / oauth_requiredmapping_requiredAstrail does not evaluate generated TypeScript inside Next.js. Hosted calls are routed through stored tool metadata and endpoint maps.
Tools
7slack_search_messagesSearch Slack messages visible to the connected user token.
slack_list_channelsList Slack channels visible to the connected token.
slack_get_conversation_historyFetch recent messages from a Slack conversation.
slack_post_messagePost a message to a Slack channel after approval.
slack_get_thread_repliesFetch replies in a Slack thread using cursor pagination.
slack_list_usersList workspace users with cursor pagination.
slack_add_reactionAdd an emoji reaction to a Slack message after approval.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({ name: "Slack Connector", version: "1.0.0" });
// Curated Astrail connector for: slack_search_messages, slack_list_channels, slack_get_conversation_history, slack_post_message, slack_get_thread_replies, slack_list_users, slack_add_reaction.
// The hosted endpoint executes its verified deterministic endpoint map. Attach a least-privilege provider credential before calling private tools.
server.tool("connector_status", "Confirm this curated connector template is installed.", z.object({}), async () => ({
content: [{ type: "text", text: "Connector installed. Attach provider credentials to enable hosted API calls." }],
}));
const transport = new StdioServerTransport();
await server.connect(transport);