Slack Code
FreeNot checkedA focused remote MCP server that enables LLMs to search and execute Slack Web API operations with OAuth and write guardrails.
About
A focused remote MCP server that enables LLMs to search and execute Slack Web API operations with OAuth and write guardrails.
README
Model Context Protocol (MCP) is a standardized way for LLMs to use external systems through tools. This repository provides a focused remote MCP server for Slack Web API so agents can discover operations and execute validated API calls with a fixed low-context tool surface.
Design references:
The server supports streamable-http transport via /mcp.
Server in this Repository
| Server | Description | URL |
|---|---|---|
slack-code-mcp |
Search + execute over Slack Web API operations with OAuth and write guardrails | http://127.0.0.1:3000/mcp |
Tools Exposed
| Tool | Purpose | Typical use |
|---|---|---|
search |
Finds ranked operations from Slack method catalog + docs context | "list channels", "post message", "get conversation history" |
execute |
Validates and executes operation by operation_id |
Read and write API calls with typed validation |
auth_status |
Returns auth status for current caller | Preflight before execute |
Why Better Than Official MCP Patterns
Compared to official/provider MCP servers that expose many endpoint-level tools, this implementation is better for agent behavior:
- Fixed
3-tool interface keeps context and tool-selection ambiguity low. - Two-step control loop (
searchthenexecute) aligns with how agents plan and call tools. - Write safety is explicit: server policy gate plus per-call confirmation token.
- Performance controls (catalog cache, read cache, response truncation) reduce latency and context bloat.
Access from Any MCP Client
If your MCP client supports remote MCP directly:
{
"mcpServers": {
"slack-code-mcp": {
"transport": "streamable_http",
"url": "http://127.0.0.1:3000/mcp",
"headers": {
"x-user-id": "default"
}
}
}
}
If your client needs a command bridge:
{
"mcpServers": {
"slack-code-mcp": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:3000/mcp"],
"env": {
"MCP_REMOTE_HEADERS": "{\"x-user-id\":\"default\"}"
}
}
}
}
Quick Start
cd slack
npm install
npm run build
npm test
Seed access token from environment:
SLACK_BOT_TOKEN='<xoxb-token>' npm run seed:token
Start server:
TOKEN_STORE_PATH=./data/tokens.integration.json \
TOKEN_ENCRYPTION_KEY_BASE64='<seed-output-key>' \
PORT=3000 HOST=127.0.0.1 npm run dev
Smoke test:
curl -sS http://127.0.0.1:3000/healthz
MCP_URL=http://127.0.0.1:3000/mcp USER_ID=default npm run smoke:mcp
Tool Calling Flow
- Call
auth_status. - Call
searchwith intent (for example,list channels). - Pick an
operation_id. - Call
executewith required params inbody. - For writes: call
dry_run=true, then replay withconfirm_write_tokenandALLOW_WRITES=true.
Example search input:
{
"query": "post a message to a channel",
"limit": 5
}
Example read execute input:
{
"operation_id": "POST /conversations.list"
}
Example write execute dry run:
{
"operation_id": "POST /chat.postMessage",
"body": {
"channel": "C12345678",
"text": "Hello from Slack Code MCP"
},
"dry_run": true
}
Configuration
Key environment variables:
ALLOW_WRITES(defaultfalse)REQUEST_TIMEOUT_MSMAX_RETRIESCATALOG_CACHE_PATHREAD_CACHE_TTL_MSEXECUTE_MAX_BODY_BYTESEXECUTE_BODY_PREVIEW_CHARS
See .env.example for the full set.
Safety Model
- Mutating operations are blocked unless
ALLOW_WRITES=true. - Mutating calls require
confirm_write_tokenfrom matching dry-run request. - Sensitive headers and body fields are redacted.
Performance Model
- Fixed 3-tool MCP surface to keep context small.
- Persisted catalog cache enables fast startup and asynchronous refresh.
- Conditional docs refresh (
ETag/Last-Modified) where available. - Short TTL cache for repeated read operations.
- Execute body truncation controls context overhead.
Troubleshooting
- MCP Inspector connect failure: confirm URL is
http://127.0.0.1:3000/mcpand server is running. AUTH_REQUIRED: seed token or complete OAuth bootstrap.- Write blocked: set
ALLOW_WRITES=trueand use returnedconfirm_write_token. - Slack API error with HTTP 200: Slack methods often return
{ ok: false, error: "..." }; this is surfaced as tool error.
Development
- Source:
src - Tests:
tests - References:
REFERENCES.md
Installing Slack Code
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/dsouzaAnush/slack-code-mcpFAQ
Is Slack Code MCP free?
Yes, Slack Code MCP is free — one-click install via Unyly at no cost.
Does Slack Code need an API key?
No, Slack Code runs without API keys or environment variables.
Is Slack Code hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Slack Code in Claude Desktop, Claude Code or Cursor?
Open Slack Code on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Gmail
Read, send and search emails from Claude
by GoogleSlack
Send, search and summarize Slack messages
by SlackRunbear
No-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
Discord Server
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Klavis AI
Open Source MCP Infra. Hosted MCP servers and MCP clients on Slack and Discord.
Work90210/APIFold
Turn any REST API into a hosted MCP server. 18 free public servers (GitHub, Stripe, Slack, OpenAI, Notion, and more) — no setup required, bring your own API key
by Work90210arikusi/deepseek-mcp-server
MCP server for DeepSeek AI with chat, reasoning, multi-turn sessions, function calling, thinking mode, and cost tracking.
by arikusihashgraph-online/hashnet-mcp-js
MCP server for the Registry Broker. Discover, register, and chat with AI agents on the Hashgraph network.
by hashgraph-onlineprofullstack/mcp-server
A comprehensive MCP server aggregating 20+ tools including SEO optimization, document conversion, domain lookup, email validation, QR generation, weather data,
by profullstackWayStation-ai/mcp
Seamlessly and securely connect Claude Desktop and other MCP hosts to your favorite apps (Notion, Slack, Monday, Airtable, etc.). Takes less than 90 secs.
by waystation-aiCompare Slack Code with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All communication MCPs
