Skip to content
Back to search

slack-mcp-client

A Slack bot and MCP client acts as a bridge between Slack and Model Context Protocol (MCP) servers. Using Slack as the interface, it enables large language models (LLMs) to connect and interact with various MCP servers through standardized MCP tools.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tuannvm--slack-mcp-client/badge.svg)](/listings/tuannvm--slack-mcp-client)

HTML

<a href="/listings/tuannvm--slack-mcp-client"><img src="/api/listings/tuannvm--slack-mcp-client/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

From Binary Release

Download the latest binary from the [GitHub releases page](https://github.com/tuannvm/slack-mcp-client/releases/latest) or install using Go:

# Install latest version using Go
go install github.com/tuannvm/slack-mcp-client@latest

# Or build from source
git clone https://github.com/tuannvm/slack-mcp-client.git
cd slack-mcp-client
make build
# Binary will be in ./bin/slack-mcp-client

Running Locally with Binary

After installing the binary, you can run it locally with the following steps:

1. Set up environment variables:

# Using environment variables directly
export SLACK_BOT_TOKEN="xoxb-your-bot-token"
export SLACK_APP_TOKEN="xapp-your-app-token"
export OPENAI_API_KEY="sk-your-openai-key"
export OPENAI_MODEL="gpt-4.1"  # or gpt-4o, o3-pro
export LOG_LEVEL="info"

# Or create a .env file and source it
cat > .env << EOL
SLACK_BOT_TOKEN="xoxb-your-bot-token"
SLACK_APP_TOKEN="xapp-your-app-token"
OPENAI_API_KEY="sk-your-openai-key"
OPENAI_MODEL="gpt-4o"
LOG_LEVEL="info"
EOL

source .env

2. Create a unified configuration file:

# Create config.json with the new unified configuration format
cat > config.json << EOL
{
  "\$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json",
  "version": "2.0",
  "slack": {
    "botToken": "\${SLACK_BOT_TOKEN}",
    "appToken": "\${SLACK_APP_TOKEN}"
  },
  "llm": {
    "provider": "openai",
    "useNativeTools": true,
    "providers": {
      "openai": {
        "model": "gpt-4o",
        "apiKey": "\${OPENAI_API_KEY}",
        "temperature": 0.7
      }
    }
  },
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "\$HOME"]
    }
  },
  "monitoring": {
    "enabled": true,
    "metricsPort": 8080,
    "loggingLevel": "info"
  },
  "observability": {
    "enabled": true,
    "provider": "simple-otel",
    "endpoint": "${OTEL_EXPORTER_OTLP_ENDPOINT}",
    "serviceName": "slack-mcp-client",
    "serviceVersion": "1.0.0"
  }
}
EOL

3. Run the application:

# Run with unified configuration (looks for config.json in current directory)
slack-mcp-client --config config.json

# Enable debug mode with structured logging
slack-mcp-client --config config.json --debug

# Validate configuration before running
slack-mcp-client --config-validate --config config.json

# Configure metrics port via config file or flag
slack-mcp-client --config config.json --metrics-port 9090

Migrating from Legacy Configuration

If you have an existing `mcp-servers.json` file from a previous version, you can migrate to the new unified configuration format:

# Automatic migration (recommended)
slack-mcp-client --migrate-config --config legacy-mcp-servers.json --output config.json

# Manual migration: Use examples as templates
cp examples/minimal.json config.json
# Edit config.json with your specific settings

# Validate the new configuration
slack-mcp-client --config-validate --config config.json

The new configuration format provides: - **Single File**: All settings in one `config.json` file - **JSON Schema**: IDE support with autocomplete and validation - **Environment Variables**: Use `${VAR_NAME}` syntax for secrets - **Smart Defaults**: Minimal configuration required for basic usage - **Comprehensive Options**: All underlying package settings exposed

The application will connect to Slack and start listening for messages. You can check the logs for any errors or connection issues.

RAG Setup and Usage

The client includes an improved RAG (Retrieval-Augmented Generation) system that's compatible with LangChain Go and provides professional-grade performance:

Quick Start with RAG

1. **Enable RAG in your configuration:**

{
  "$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json",
  "version": "2.0",
  "slack": {
    "botToken": "${SLACK_BOT_TOKEN}",
    "appToken": "${SLACK_APP_TOKEN}"

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 1,122 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Slack MCP Client
  2. **A production-ready bridge between Slack and AI models with full MCP compatibility.**
  3. This client enables AI models (OpenAI GPT-4.1, Anthropic Claude 4.5, Ollama local models) to interact with real tools and systems through Slack conversations. Built on the industry-standard Model Context Protocol (MCP), it provides secure access to filesystems, databases, Kubernetes clusters, Git repositories, and custom tools.
  4. [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/tuannvm/slack-mcp-client/build.yml?branch=main&label=CI%2FCD&logo=github)](https://github.com/tuannvm/slack-mcp-client/actions/workflows/build.yml)
  5. [![Go Version](https://img.shields.io/github/go-mod/go-version/tuannvm/slack-mcp-client?logo=go)](https://github.com/tuannvm/slack-mcp-client/blob/main/go.mod)
  6. [![Trivy Scan](https://img.shields.io/github/actions/workflow/status/tuannvm/slack-mcp-client/build.yml?branch=main&label=Trivy%20Security%20Scan&logo=aquasec)](https://github.com/tuannvm/slack-mcp-client/actions/workflows/build.yml)
  7. [![Docker Image](https://img.shields.io/github/v/release/tuannvm/slack-mcp-client?sort=semver&label=GHCR&logo=docker)](https://github.com/tuannvm/slack-mcp-client/pkgs/container/slack-mcp-client)
  8. [![GitHub Release](https://img.shields.io/github/v/release/tuannvm/slack-mcp-client?sort=semver)](https://github.com/tuannvm/slack-mcp-client/releases/latest)
  9. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  10. > **Compatible with MCP Specification 2025-06-18** - Compliant with the latest Model Context Protocol standards
  11. ## Recent Updates
  12. **Oct 2025**: langchaingo v0.1.14 with streaming fixes, enhanced agent parsing, and API key sanitization.
  13. ## Key Features
  14. - **Universal MCP Compatibility** - Supports all transport methods (HTTP, SSE, stdio)
  15. - **Multi-Provider LLM Support** - OpenAI GPT-4.1/4o, Anthropic Claude 4.5, Ollama (Llama 3.3, Qwen, Mistral, DeepSeek)
  16. - **Agent Mode** - Multi-step reasoning with LangChain for complex workflows
  17. - **RAG Integration** - Knowledge base with semantic search capabilities
  18. - **Thread-Aware Context** - Maintains separate conversation history per Slack thread
  19. - **User Context Integration** - Personalized responses with cached user information
  20. - **Unique Tool Naming** - Server-prefixed tool names prevent conflicts across MCP servers
  21. - **Production Ready** - Comprehensive configuration, monitoring, and security
  22. ## Use Cases
  23. - **DevOps Teams** - Infrastructure automation and monitoring through Slack
  24. - **Development Teams** - Code review, Git operations, and file management
  25. - **Support Teams** - Database queries, system status checks, and troubleshooting
  26. - **General Use** - AI assistance with actual tools and system integration
  27. ## MCP Compatibility
  28. **Compliant with the official Model Context Protocol (2025-06-18 specification):**
  29. - **All Transport Methods** - HTTP, SSE, and stdio protocols
  30. - **JSON-RPC 2.0** - Standard communication protocol
  31. - **Official MCP Servers** - Compatible with all [modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers)
  32. - **Custom MCP Servers** - Works with any MCP-compliant server
  33. - **Security Standards** - Implements user consent, data privacy, and tool safety requirements
  34. ## Authenticating to SSE MCP Servers
  35. Authentication with Server-Sent Events (SSE) MCP servers can be achieved using the following setup:
  36. Example:
  37. ```json
  38. {
  39. "httpHeaders": {
  40. "Authorization": "Bearer YOUR_TOKEN_HERE"
  41. }
  42. }
  43. ```
  44. Make sure to replace `YOUR_TOKEN_HERE` with your actual token for authentication.
  45. ## How It Works
  46. ![Image](https://github.com/user-attachments/assets/48a587e4-7895-4a6f-9745-61b21894c34c)
  47. ```mermaid
  48. flowchart LR
  49. User([👤 User]) --> Slack{🔗 Slack Interface}
  50. subgraph Infrastructure[Observability]
  51. Config[📋 Unified Config<br/>JSON Schema]
  52. Monitoring[📊 Monitoring<br/>Prometheus Metrics]
  53. Tracing[🔍 OpenTelemetry Tracing<br/>Langfuse & OTLP]
  54. Logging[📝 Structured Logging<br/>Debug & Analytics]
  55. end
  56. subgraph Core[Features]
  57. Slack --> Bridge[🌉 LLM-MCP Bridge<br/>Orchestration Layer]
  58. subgraph LLM[🤖 AI Processing]
  59. Bridge --> LLMRegistry[LLM Provider Registry]
  60. LLMRegistry --> OpenAI[OpenAI<br/>GPT-4o]
  61. LLMRegistry --> Anthropic[Anthropic<br/>Claude]
  62. LLMRegistry --> Ollama[Ollama<br/>Local Models]
  63. Bridge --> Agent{🎯 Agent Mode?}
  64. Agent -->|Yes| LangChain[🔄 LangChain Agent<br/>Multi-step Reasoning]
  65. Agent -->|No| Standard[⚡ Standard Mode<br/>Single Response]
  66. end
  67. subgraph Knowledge[📚 Knowledge & Memory]
  68. Bridge --> RAG[🧠 RAG System]
  69. RAG --> SimpleRAG[📄 JSON Store<br/>Simple Documents]
  70. RAG --> VectorRAG[🔍 OpenAI Vector Store<br/>Semantic Search]
  71. end
  72. subgraph Tools[🛠️ MCP Mode]
  73. Bridge --> MCPManager[MCP Client]
  74. MCPManager --> FileSystem[📁 Filesystem MCP Server<br/>Read/Write Files]
  75. MCPManager --> Git[🌿 Git MCP Server <br/>Repository Tools]
  76. MCPManager --> Kubernetes[☸️ Kubernetes MCP Server<br/>Cluster Management]
  77. end
  78. end
  79. Config -.-> Core
  80. Core -.-> Monitoring
  81. Core -.-> Tracing
  82. Core -.-> Logging
  83. style Core fill:#F8F9FA,stroke:#6C757D,stroke-width:3px
  84. style LLM fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
  85. style Knowledge fill:#E8F5E8,stroke:#388E3C,stroke-width:2px
  86. style Tools fill:#FFF3E0,stroke:#F57C00,stroke-width:2px
  87. style Infrastructure fill:#F3E5F5,stroke:#7B1FA2,stroke-width:2px
  88. style User fill:#4CAF50,stroke:#2E7D32,stroke-width:2px,color:#fff
  89. style Slack fill:#4A90E2,stroke:#1565C0,stroke-width:2px,color:#fff
  90. style Bridge fill:#FF9800,stroke:#E65100,stroke-width:2px,color:#fff
  91. style LangChain fill:#9C27B0,stroke:#4A148C,stroke-width:2px,color:#fff
  92. style RAG fill:#2196F3,stroke:#0D47A1,stroke-width:2px,color:#fff
  93. ```
  94. 1. **User** interacts through Slack, sending messages that trigger intelligent AI workflows
  95. 2. **LLM-MCP Bridge** serves as the intelligent orchestration layer that:
  96. - Routes requests to appropriate LLM providers (OpenAI, Anthropic, Ollama)
  97. - Chooses between Agent Mode (multi-step reasoning) or Standard Mode (single response)
  98. - Integrates RAG system for knowledge retrieval and context enhancement
  99. - Manages tool discovery and execution across multiple MCP servers
  100. 3. **Knowledge & Memory** system provides contextual intelligence:
  101. - Simple JSON store for lightweight document storage
  102. - OpenAI Vector Store for semantic search and enterprise-grade RAG
  103. 4. **Tool Ecosystem** connects to diverse external systems:
  104. - Filesystem operations for file management
  105. - Git integration for repository interactions
  106. - Kubernetes cluster management and monitoring
  107. - Custom tools via HTTP, SSE, or stdio protocols
  108. 5. **Infrastructure** ensures production-ready deployment:
  109. - Unified JSON configuration with environment variable support
  110. - Prometheus metrics for observability and monitoring
  111. - OpenTelemetry tracing with Langfuse and OTLP providers
  112. - Structured logging for debugging and analytics
  113. ## Features
  114. - ✅ **Multi-Mode MCP Client**:
  115. - Server-Sent Events (SSE) for real-time communication with automatic retry
  116. - HTTP transport for JSON-RPC
  117. - stdio for local development and testing
  118. - ✅ **Slack Integration**:
  119. - Uses Socket Mode for secure, firewall-friendly communication
  120. - Works with both channels and direct messages
  121. - Rich message formatting with Markdown and Block Kit
  122. - Thread-aware conversation tracking with separate context per thread
  123. - User context caching for personalized interactions
  124. - Customizable bot behavior and message history
  125. - ✅ **Multi-Provider LLM Support**:
  126. - OpenAI (GPT-4.1, GPT-4o, o3-pro)
  127. - Anthropic (Claude Sonnet 4.5, Opus 4.1)
  128. - Ollama (Llama 3.3, Qwen2.5, Mistral, DeepSeek)
  129. - Native tool calling and unified LangChain gateway
  130. - ✅ **Agent Mode**:
  131. - Autonomous AI agents powered by LangChain (langchaingo v0.1.14)
  132. - Enhanced multi-step reasoning and tool orchestration
  133. - Improved parsing for complex multi-line tool calls
  134. - Configurable agent iterations and behavior
  135. - Reliable streaming responses with memory leak fixes
  136. - Advanced prompt engineering capabilities
  137. - ✅ **RAG (Retrieval-Augmented Generation)**:
  138. - Multiple providers: Simple JSON storage, OpenAI Vector Store
  139. - Reusable vector stores with `vectorStoreId` support
  140. - Configurable search parameters and similarity metrics
  141. - PDF ingestion with intelligent chunking
  142. - CLI tools for document management
  143. - ✅ **Unified Configuration**:
  144. - Single JSON configuration file with JSON schema validation
  145. - Comprehensive timeout and retry configuration
  146. - Environment variable substitution and overrides
  147. - All underlying package options exposed
  148. - Smart defaults with full customization capability
  149. - Server-prefixed tool names to prevent naming conflicts
  150. - ✅ **Production Ready**:
  151. - Docker container support with GHCR publishing
  152. - Kubernetes Helm charts with OCI registry
  153. - Comprehensive logging and error handling
  154. - Test coverage with security scanning
  155. - ✅ **Monitoring & Observability**:
  156. - Prometheus metrics integration
  157. - Tool invocation tracking with error rates
  158. - LLM token usage monitoring by model and type
  159. - OpenTelemetry tracing with Langfuse and simple providers
  160. - Configurable observability providers with graceful fallbacks
  161. - Comprehensive span tracking for LLM operations and tool calls
  162. - Configurable metrics endpoint and logging levels
  163. ## Installation
  164. ### From Binary Release
  165. Download the latest binary from the [GitHub releases page](https://github.com/tuannvm/slack-mcp-client/releases/latest) or install using Go:
  166. ```bash
  167. # Install latest version using Go
  168. go install github.com/tuannvm/slack-mcp-client@latest
  169. # Or build from source
  170. git clone https://github.com/tuannvm/slack-mcp-client.git
  171. cd slack-mcp-client
  172. make build
  173. # Binary will be in ./bin/slack-mcp-client
  174. ```
  175. ### Running Locally with Binary
  176. After installing the binary, you can run it locally with the following steps:
  177. 1. Set up environment variables:
  178. ```bash
  179. # Using environment variables directly
  180. export SLACK_BOT_TOKEN="xoxb-your-bot-token"
  181. export SLACK_APP_TOKEN="xapp-your-app-token"
  182. export OPENAI_API_KEY="sk-your-openai-key"
  183. export OPENAI_MODEL="gpt-4.1" # or gpt-4o, o3-pro
  184. export LOG_LEVEL="info"
  185. # Or create a .env file and source it
  186. cat > .env << EOL
  187. SLACK_BOT_TOKEN="xoxb-your-bot-token"
  188. SLACK_APP_TOKEN="xapp-your-app-token"
  189. OPENAI_API_KEY="sk-your-openai-key"
  190. OPENAI_MODEL="gpt-4o"
  191. LOG_LEVEL="info"
  192. EOL
  193. source .env
  194. ```
  195. 2. Create a unified configuration file:
  196. ```bash
  197. # Create config.json with the new unified configuration format
  198. cat > config.json << EOL
  199. {
  200. "\$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json",
  201. "version": "2.0",
  202. "slack": {
  203. "botToken": "\${SLACK_BOT_TOKEN}",
  204. "appToken": "\${SLACK_APP_TOKEN}"
  205. },
  206. "llm": {
  207. "provider": "openai",
  208. "useNativeTools": true,
  209. "providers": {
  210. "openai": {
  211. "model": "gpt-4o",
  212. "apiKey": "\${OPENAI_API_KEY}",
  213. "temperature": 0.7
  214. }
  215. }
  216. },
  217. "mcpServers": {
  218. "filesystem": {
  219. "command": "npx",
  220. "args": ["-y", "@modelcontextprotocol/server-filesystem", "\$HOME"]
  221. }
  222. },
  223. "monitoring": {
  224. "enabled": true,
  225. "metricsPort": 8080,
  226. "loggingLevel": "info"
  227. },
  228. "observability": {
  229. "enabled": true,
  230. "provider": "simple-otel",
  231. "endpoint": "${OTEL_EXPORTER_OTLP_ENDPOINT}",
  232. "serviceName": "slack-mcp-client",
  233. "serviceVersion": "1.0.0"
  234. }
  235. }
  236. EOL
  237. ```
  238. 3. Run the application:
  239. ```bash
  240. # Run with unified configuration (looks for config.json in current directory)
  241. slack-mcp-client --config config.json
  242. # Enable debug mode with structured logging
  243. slack-mcp-client --config config.json --debug
  244. # Validate configuration before running
  245. slack-mcp-client --config-validate --config config.json
  246. # Configure metrics port via config file or flag
  247. slack-mcp-client --config config.json --metrics-port 9090
  248. ```
  249. ### Migrating from Legacy Configuration
  250. If you have an existing `mcp-servers.json` file from a previous version, you can migrate to the new unified configuration format:
  251. ```bash
  252. # Automatic migration (recommended)
  253. slack-mcp-client --migrate-config --config legacy-mcp-servers.json --output config.json
  254. # Manual migration: Use examples as templates
  255. cp examples/minimal.json config.json
  256. # Edit config.json with your specific settings
  257. # Validate the new configuration
  258. slack-mcp-client --config-validate --config config.json
  259. ```
  260. The new configuration format provides:
  261. - **Single File**: All settings in one `config.json` file
  262. - **JSON Schema**: IDE support with autocomplete and validation
  263. - **Environment Variables**: Use `${VAR_NAME}` syntax for secrets
  264. - **Smart Defaults**: Minimal configuration required for basic usage
  265. - **Comprehensive Options**: All underlying package settings exposed
  266. The application will connect to Slack and start listening for messages. You can check the logs for any errors or connection issues.
  267. ### RAG Setup and Usage
  268. The client includes an improved RAG (Retrieval-Augmented Generation) system that's compatible with LangChain Go and provides professional-grade performance:
  269. #### Quick Start with RAG
  270. 1. **Enable RAG in your configuration:**
  271. ```json
  272. {
  273. "$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json",
  274. "version": "2.0",
  275. "slack": {
  276. "botToken": "${SLACK_BOT_TOKEN}",
  277. "appToken": "${SLACK_APP_TOKEN}"
  278. },
  279. "llm": {
  280. "provider": "openai",
  281. "useNativeTools": true,
  282. "providers": {
  283. "openai": {
  284. "model": "gpt-4o",
  285. "apiKey": "${OPENAI_API_KEY}"
  286. }
  287. }
  288. },
  289. "rag": {
  290. "enabled": true,
  291. "provider": "simple",
  292. "chunkSize": 1000,
  293. "providers": {
  294. "simple": {
  295. "databasePath": "./knowledge.json"
  296. },
  297. "openai": {
  298. "indexName": "my-knowledge-base",
  299. "vectorStoreId": "vs_existing_store_id",
  300. "dimensions": 1536,
  301. "maxResults": 10
  302. }
  303. }
  304. }
  305. }
  306. ```
  307. 2. **Ingest documents using CLI:**
  308. ```bash
  309. # Ingest PDF files from a directory
  310. slack-mcp-client --rag-ingest ./company-docs --rag-db ./knowledge.json
  311. # Test search functionality
  312. slack-mcp-client --rag-search "vacation policy" --rag-db ./knowledge.json
  313. # Get database statistics
  314. slack-mcp-client --rag-stats --rag-db ./knowledge.json
  315. ```
  316. 3. **Use in Slack:**
  317. Once configured, the LLM can automatically search your knowledge base:
  318. **User**: "What's our vacation policy?"
  319. **AI**: "Let me search our knowledge base for vacation policy information..."
  320. *(Automatically searches RAG database)*
  321. **AI**: "Based on our company policy documents, you get 15 days of vacation..."
  322. #### RAG Features
  323. - **🎯 Smart Search**: Advanced relevance scoring with word frequency, filename boosting, and phrase matching
  324. - **🔗 LangChain Compatible**: Drop-in replacement for standard vector stores
  325. - **📈 Extensible**: Easy to add vector embeddings and other backends
  326. ### Custom Prompts and Assistants
  327. The client supports advanced prompt engineering capabilities for creating specialized AI assistants:
  328. #### System Prompts
  329. Create custom AI personalities and behaviors:
  330. ```bash
  331. # Create a custom system prompt file
  332. cat > sales-assistant.txt << EOL
  333. You are SalesGPT, a helpful sales assistant specializing in B2B software sales.
  334. Your expertise includes:
  335. - Lead qualification and discovery
  336. - Solution positioning and value propositions
  337. - Objection handling and negotiation
  338. - CRM best practices and sales processes
  339. Always:
  340. - Ask qualifying questions to understand prospect needs
  341. - Provide specific, actionable sales advice
  342. - Reference industry best practices
  343. - Maintain a professional yet friendly tone
  344. When discussing pricing, always emphasize value over cost.
  345. EOL
  346. # Use the custom prompt
  347. slack-mcp-client --system-prompt ./sales-assistant.txt
  348. ```
  349. #### Configuration-Based Prompts
  350. Define prompts in your configuration:
  351. ```json
  352. {
  353. "$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json",
  354. "version": "2.0",
  355. "slack": {
  356. "botToken": "${SLACK_BOT_TOKEN}",
  357. "appToken": "${SLACK_APP_TOKEN}"
  358. },
  359. "llm": {
  360. "provider": "openai",
  361. "useNativeTools": true,
  362. "customPrompt": "You are a helpful DevOps assistant specializing in Kubernetes and cloud infrastructure.",
  363. "providers": {
  364. "openai": {
  365. "model": "gpt-4.1",
  366. "apiKey": "${OPENAI_API_KEY}",
  367. "temperature": 0.7
  368. }
  369. }
  370. }
  371. }
  372. ```
  373. #### Assistant Roles
  374. Create specialized assistants for different use cases:
  375. - **DevOps Assistant**: Kubernetes, Docker, CI/CD expertise
  376. - **Sales Assistant**: Lead qualification, objection handling
  377. - **HR Assistant**: Policy questions, onboarding guidance
  378. - **Support Assistant**: Customer issue resolution
  379. - **Code Review Assistant**: Security, performance, best practices
  380. ### Agent Mode
  381. Agent Mode enables more interactive and context-aware conversations using LangChain's agent framework. Instead of single-prompt interactions, agents can engage in multi-step reasoning, use tools more strategically, and maintain better context throughout conversations.
  382. #### How Agent Mode Works
  383. Agent Mode uses LangChain's conversational agent framework to provide:
  384. 1. **Interactive Conversations**: Maintains context across multiple exchanges
  385. 2. **Strategic Tool Usage**: Agents decide when and how to use available tools
  386. 3. **Multi-Step Reasoning**: Can break down complex problems into manageable steps
  387. 4. **Streaming Responses**: Provides real-time updates during processing
  388. 5. **User Context Integration**: Incorporates cached user information for personalized responses
  389. 6. **Thread Context Awareness**: Maintains separate conversation history per Slack thread
  390. #### Agent Mode Configuration
  391. Enable Agent Mode in your configuration file:
  392. ```json
  393. {
  394. "$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json",
  395. "version": "2.0",
  396. "slack": {
  397. "botToken": "${SLACK_BOT_TOKEN}",
  398. "appToken": "${SLACK_APP_TOKEN}"
  399. },
  400. "llm": {
  401. "provider": "openai",
  402. "useNativeTools": true,
  403. "useAgent": true,
  404. "customPrompt": "You are a DevOps expert specializing in Kubernetes and cloud infrastructure. Always think through problems step by step.",
  405. "maxAgentIterations": 20,
  406. "providers": {
  407. "openai": {
  408. "model": "gpt-4.1",
  409. "apiKey": "${OPENAI_API_KEY}",
  410. "temperature": 0.7
  411. }
  412. }
  413. },
  414. "mcpServers": {
  415. "filesystem": {
  416. "command": "npx",
  417. "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
  418. },
  419. "github": {
  420. "command": "github-mcp-server",
  421. "args": ["stdio"],
  422. "env": {
  423. "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
  424. }
  425. }
  426. }
  427. }
  428. ```
  429. #### Configuration Options
  430. - **`llm.useAgent`**: Enable agent mode (default: false)
  431. - **`llm.useNativeTools`**: Use native LangChain tools vs system prompt-based tools (default: false)
  432. - **`llm.customPrompt`**: System prompt for agent behavior
  433. - **`llm.maxAgentIterations`**: Maximum agent reasoning steps (default: 20)
  434. #### Agent vs Standard Mode
  435. **Standard Mode**:
  436. - Single-prompt interactions
  437. - Tools described in system prompt as JSON schemas
  438. - Direct tool call parsing and execution
  439. - More predictable token usage
  440. - Simpler conversation flow
  441. **Agent Mode**:
  442. - Multi-turn conversational interactions
  443. - Context-aware tool usage decisions
  444. - Better user context integration
  445. - More natural conversation flow
  446. - Enhanced reasoning capabilities
  447. #### Agent Mode Examples
  448. **Interactive Development Consultation**:
  449. ```
  450. User: "I need help optimizing my React app performance"
  451. Agent Response:
  452. 🤖 I'd be happy to help optimize your React app performance! Let me understand your current setup better.
  453. [Agent maintains conversation context and asks relevant follow-up questions]
  454. Agent: "What specific performance issues are you experiencing? Are you seeing slow renders, large bundle sizes, or something else?"
  455. User: "The app takes too long to load initially"
  456. Agent: "Let me check your current bundle setup and suggest optimizations..."
  457. [Agent uses filesystem tools to analyze the project structure and provides targeted advice]
  458. ```
  459. **Contextual Problem Solving**:
  460. ```
  461. User: "Can you help me with my deployment pipeline?"
  462. Agent Response:
  463. 🤖 I'll help you with your deployment pipeline. Since I know you're working on a React project, let me check your current CI/CD setup.
  464. [Agent leverages previous conversation context and user information to provide personalized assistance]
  465. [Agent strategically uses relevant tools based on the conversation flow]
  466. ```
  467. #### Agent Mode Best Practices
  468. 1. **System Prompts**: Design clear, specific system prompts that guide the agent's behavior
  469. 2. **Tool Selection**: Provide relevant tools for the agent's domain
  470. 3. **Context Management**: Agents maintain better context across conversations
  471. 4. **User Personalization**: Leverage user context integration for personalized responses
  472. 5. **Tool Strategy**: Choose between native tools or system prompt-based tools based on your needs
  473. #### Limitations and Considerations
  474. - **OpenAI Agent**: Native OpenAI agent in langchaingo has known issues, uses conversational agent as workaround
  475. - **LangChain Dependency**: Agent mode requires LangChain provider
  476. - **Permissions**: May require additional Slack permissions for user information retrieval
  477. - **Performance**: Agent mode may have different performance characteristics than standard mode
  478. ### Kubernetes Deployment with Helm
  479. For deploying to Kubernetes, a Helm chart is available in the `helm-chart` directory. This chart provides a flexible way to deploy the slack-mcp-client with proper configuration and secret management.
  480. #### Installing from GitHub Container Registry
  481. The Helm chart is also available directly from GitHub Container Registry, allowing for easier installation without needing to clone the repository:
  482. ```bash
  483. # Add the OCI repository to Helm (only needed once)
  484. helm registry login ghcr.io -u USERNAME -p GITHUB_TOKEN
  485. # Pull the Helm chart
  486. helm pull oci://ghcr.io/tuannvm/charts/slack-mcp-client --version 0.1.0
  487. # Or install directly
  488. helm install my-slack-bot oci://ghcr.io/tuannvm/charts/slack-mcp-client --version 0.1.0 -f values.yaml
  489. ```
  490. You can check available versions by visiting the GitHub Container Registry in your browser.
  491. #### Prerequisites
  492. - Kubernetes 1.16+
  493. - Helm 3.0+
  494. - Slack Bot and App tokens
  495. #### Basic Installation
  496. ```bash
  497. # Create a values file with your configuration
  498. cat > values.yaml << EOL
  499. secret:
  500. create: true
  501. env:
  502. SLACK_BOT_TOKEN: "xoxb-your-bot-token"
  503. SLACK_APP_TOKEN: "xapp-your-app-token"
  504. OPENAI_API_KEY: "sk-your-openai-key"
  505. OPENAI_MODEL: "gpt-4o"
  506. LOG_LEVEL: "info"
  507. # Optional: Configure MCP servers
  508. configMap:
  509. create: true
  510. EOL
  511. # Install the chart
  512. helm install my-slack-bot ./helm-chart/slack-mcp-client -f values.yaml
  513. ```
  514. #### Configuration Options
  515. The Helm chart supports various configuration options including:
  516. - Setting resource limits and requests
  517. - Configuring MCP servers via ConfigMap
  518. - Managing sensitive data via Kubernetes secrets
  519. - Customizing deployment parameters
  520. For more details, see the [Helm chart README](helm-chart/slack-mcp-client/README.md).
  521. #### Using the Docker Image from GHCR
  522. The Helm chart uses the Docker image from GitHub Container Registry (GHCR) by default. You can specify a particular version or use the latest tag:
  523. ```yaml
  524. # In your values.yaml
  525. image:
  526. repository: ghcr.io/tuannvm/slack-mcp-client
  527. tag: "latest" # Or use a specific version like "1.0.0"
  528. pullPolicy: IfNotPresent
  529. ```
  530. To manually pull the image:
  531. ```bash
  532. # Pull the latest image
  533. docker pull ghcr.io/tuannvm/slack-mcp-client:latest
  534. # Or pull a specific version
  535. docker pull ghcr.io/tuannvm/slack-mcp-client:1.0.0
  536. ```
  537. If you're using private images, you can configure image pull secrets in your values:
  538. ```yaml
  539. imagePullSecrets:
  540. - name: my-ghcr-secret
  541. ```
  542. ### Docker Compose for Local Testing
  543. For local testing and development, you can use Docker Compose to easily run the slack-mcp-client along with additional MCP servers.
  544. #### Setup
  545. 1. Create a `.env` file with your credentials:
  546. ```bash
  547. # Create .env file from example
  548. cp .env.example .env
  549. # Edit the file with your credentials
  550. nano .env
  551. ```
  552. 2. Create a `mcp-servers.json` file (or use the example):
  553. ```bash
  554. # Create mcp-servers.json from example
  555. cp mcp-servers.json.example mcp-servers.json
  556. # Edit if needed
  557. nano mcp-servers.json
  558. ```
  559. 3. Start the services:
  560. ```bash
  561. # Start services in detached mode
  562. docker-compose up -d
  563. # View logs
  564. docker-compose logs -f
  565. # Stop services
  566. docker-compose down
  567. ```
  568. #### Docker Compose Configuration
  569. The included `docker-compose.yml` provides:
  570. - Environment variables loaded from `.env` file
  571. - Volume mounting for MCP server configuration
  572. - Examples of connecting to additional MCP servers (commented out)
  573. ```yaml
  574. version: '3.8'
  575. services:
  576. slack-mcp-client:
  577. image: ghcr.io/tuannvm/slack-mcp-client:latest
  578. container_name: slack-mcp-client
  579. environment:
  580. - SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}
  581. - SLACK_APP_TOKEN=${SLACK_APP_TOKEN}
  582. - OPENAI_API_KEY=${OPENAI_API_KEY}
  583. - OPENAI_MODEL=${OPENAI_MODEL:-gpt-4o}
  584. volumes:
  585. - ./mcp-servers.json:/app/mcp-servers.json:ro
  586. ```
  587. You can easily extend this setup to include additional MCP servers in the same network.
  588. ## Slack App Setup
  589. 1. Create a new Slack app at https://api.slack.com/apps
  590. 2. Enable Socket Mode and generate an app-level token
  591. 3. Check `Allow users to send Slash commands and messages from the chat tab` in App Home page, to enable direct message to Slack app.
  592. ![image](https://github.com/wyangsun/wyangsun.github.io/blob/master/slackapp.png)
  593. 4. Add the following Bot Token Scopes:
  594. - `app_mentions:read`
  595. - `chat:write`
  596. - `im:history`
  597. - `im:read`
  598. - `im:write`
  599. - `users:read`
  600. - `users.profile:read`
  601. - `channels:history`
  602. - `groups:history`
  603. - `mpim:history`
  604. 5. Enable Event Subscriptions and subscribe to:
  605. - `app_mention`
  606. - `message.im`
  607. 6. Install the app to your workspace
  608. For detailed instructions on Slack app configuration, token setup, required permissions, and troubleshooting common issues, see the [Slack Configuration Guide](docs/configuration.md).
  609. ## LLM Integration
  610. The client supports multiple LLM providers through a flexible integration system:
  611. ### LangChain Gateway
  612. The LangChain gateway enables seamless integration with various LLM providers:
  613. - **OpenAI**: Native support for GPT models (default)
  614. - **Ollama**: Local LLM support for models like Llama, Mistral, etc.
  615. - **Extensible**: Can be extended to support other LangChain-compatible providers
  616. ### LLM-MCP Bridge
  617. The custom LLM-MCP bridge layer enables any LLM to use MCP tools without requiring native function-calling capabilities:
  618. - **Universal Compatibility**: Works with any LLM, including those without function-calling
  619. - **Pattern Recognition**: Detects when a user prompt or LLM response should trigger a tool call
  620. - **Natural Language Support**: Understands both structured JSON tool calls and natural language requests
  621. ### Configuration
  622. LLM providers can be configured via environment variables or command-line flags:
  623. ```bash
  624. # Set OpenAI as the provider (default)
  625. export LLM_PROVIDER="openai"
  626. export OPENAI_MODEL="gpt-4.1" # or gpt-4o, o3-pro
  627. # Use Anthropic
  628. export LLM_PROVIDER="anthropic"
  629. export ANTHROPIC_API_KEY="your-anthropic-api-key"
  630. export ANTHROPIC_MODEL="claude-sonnet-4.5" # or claude-opus-4.1
  631. # Or use Ollama
  632. export LLM_PROVIDER="ollama"
  633. export LANGCHAIN_OLLAMA_URL="http://localhost:11434"
  634. export LANGCHAIN_OLLAMA_MODEL="llama3.3" # or qwen2.5-coder, mistral-small-3, deepseek-r1
  635. ```
  636. ### Switching Between Providers
  637. You can easily switch between providers by changing the `LLM_PROVIDER` environment variable:
  638. ```bash
  639. # Use OpenAI
  640. export LLM_PROVIDER=openai
  641. # Use Anthropic
  642. export LLM_PROVIDER=anthropic
  643. # Use Ollama (local)
  644. export LLM_PROVIDER=ollama
  645. ```
  646. ## Configuration
  647. The client uses two main configuration approaches:
  648. ### Environment Variables
  649. Configure LLM providers and Slack integration using environment variables:
  650. | Variable | Description | Default |
  651. | --------------------- | -------------------------------------------- | ---------- |
  652. | SLACK_BOT_TOKEN | Bot token for Slack API | (required) |
  653. | SLACK_APP_TOKEN | App-level token for Socket Mode | (required) |
  654. | OPENAI_API_KEY | API key for OpenAI authentication | (required) |
  655. | OPENAI_MODEL | OpenAI model to use | gpt-4.1 |
  656. | ANTHROPIC_API_KEY | API key for Anthropic authentication | (required for Anthropic) |
  657. | ANTHROPIC_MODEL | Anthropic model to use | claude-sonnet-4.5 |
  658. | LOG_LEVEL | Logging level (debug, info, warn, error) | info |
  659. | LLM_PROVIDER | LLM provider to use (openai, anthropic, ollama) | openai |
  660. | LANGCHAIN_OLLAMA_URL | URL for Ollama when using LangChain | http://localhost:11434 |
  661. | LANGCHAIN_OLLAMA_MODEL| Model name for Ollama when using LangChain | llama3.3 |
  662. | LANGFUSE_ENDPOINT | Langfuse API endpoint for observability | (optional) |
  663. | LANGFUSE_PUBLIC_KEY | Langfuse public key for authentication | (optional) |
  664. | LANGFUSE_SECRET_KEY | Langfuse secret key for authentication | (optional) |
  665. | OTEL_EXPORTER_OTLP_ENDPOINT | OTLP endpoint for simple tracing | (optional) |
  666. ### Monitoring & Observability Configuration
  667. The client includes comprehensive monitoring capabilities with both metrics and distributed tracing:
  668. #### Prometheus Metrics
  669. - **Metrics Endpoint**: Accessible at `/metrics` on the configured port
  670. - **Default Port**: 8080 (configurable via `--metrics-port` flag)
  671. - **Metrics Available**:
  672. - `slackmcp_tool_invocations_total`: Counter for tool invocations with labels for tool name, server, and error status
  673. - `slackmcp_llm_tokens`: Histogram for LLM token usage by type and model
  674. #### OpenTelemetry Tracing
  675. - **Supported Providers**:
  676. - `simple-otel`: Basic OpenTelemetry tracing to OTLP endpoints (requires endpoint configuration)
  677. - `langfuse-otel`: Advanced LLM observability with Langfuse integration (requires endpoint and auth)
  678. - `disabled`: No tracing (default when no endpoint configured)
  679. - **Automatic Fallbacks**: Failed providers automatically fall back to disabled state
  680. - **Comprehensive Tracking**: Spans for LLM operations, tool calls, and user interactions with detailed attributes
  681. Example configuration and usage:
  682. ```bash
  683. # Access metrics endpoint
  684. curl http://localhost:8080/metrics
  685. # Run with custom metrics port
  686. slack-mcp-client --metrics-port 9090
  687. # Enable Langfuse tracing (example)
  688. export LANGFUSE_ENDPOINT="https://cloud.langfuse.com"
  689. export LANGFUSE_PUBLIC_KEY="pk-your-public-key"
  690. export LANGFUSE_SECRET_KEY="sk-your-secret-key"
  691. # Enable simple OTLP tracing (example)
  692. export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
  693. ```
  694. ### Unified Configuration Format
  695. All configuration is now managed through a single `config.json` file with comprehensive options:
  696. ```json
  697. {
  698. "$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json",
  699. "version": "2.0",
  700. "slack": {
  701. "botToken": "${SLACK_BOT_TOKEN}",
  702. "appToken": "${SLACK_APP_TOKEN}",
  703. "messageHistory": 50,
  704. "thinkingMessage": "Processing..."
  705. },
  706. "llm": {
  707. "provider": "openai",
  708. "useNativeTools": true,
  709. "useAgent": false,
  710. "customPrompt": "You are a helpful assistant.",
  711. "maxAgentIterations": 20,
  712. "providers": {
  713. "openai": {
  714. "model": "gpt-4o",
  715. "apiKey": "${OPENAI_API_KEY}",
  716. "temperature": 0.7,
  717. "maxTokens": 2000
  718. },
  719. "anthropic": {
  720. "model": "claude-sonnet-4.5",
  721. "apiKey": "${ANTHROPIC_API_KEY}",
  722. "temperature": 0.7
  723. }
  724. }
  725. },
  726. "mcpServers": {
  727. "filesystem": {
  728. "command": "npx",
  729. "args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"],
  730. "initializeTimeoutSeconds": 30,
  731. "tools": {
  732. "allowList": ["read_file", "write_file", "list_directory"],
  733. "blockList": ["delete_file"]
  734. }
  735. },
  736. "web-api": {
  737. "url": "http://localhost:8080/mcp",
  738. "transport": "sse",
  739. "initializeTimeoutSeconds": 30
  740. }
  741. },
  742. "rag": {
  743. "enabled": true,
  744. "provider": "openai",
  745. "chunkSize": 1000,
  746. "providers": {
  747. "openai": {
  748. "vectorStoreId": "vs_existing_store_id",
  749. "dimensions": 1536,
  750. "maxResults": 10
  751. }
  752. }
  753. },
  754. "timeouts": {
  755. "httpRequestTimeout": "30s",
  756. "toolProcessingTimeout": "3m",
  757. "mcpInitTimeout": "30s"
  758. },
  759. "retry": {
  760. "maxAttempts": 3,
  761. "baseBackoff": "500ms",
  762. "maxBackoff": "5s"
  763. },
  764. "monitoring": {
  765. "enabled": true,
  766. "metricsPort": 8080,
  767. "loggingLevel": "info"
  768. },
  769. "observability": {
  770. "enabled": true,
  771. "provider": "langfuse-otel",
  772. "endpoint": "${LANGFUSE_ENDPOINT}",
  773. "publicKey": "${LANGFUSE_PUBLIC_KEY}",
  774. "secretKey": "${LANGFUSE_SECRET_KEY}",
  775. "serviceName": "slack-mcp-client",
  776. "serviceVersion": "1.0.0"
  777. }
  778. }
  779. ```
  780. For detailed configuration options and migration guides, see the [Configuration Guide](docs/configuration.md).
  781. ## Automatic Reload Feature
  782. The client supports optional automatic reloading to handle MCP server restarts without downtime - perfect for Kubernetes deployments where MCP servers may restart independently.
  783. > **Note**: The reload feature is **disabled by default** and must be explicitly enabled in your configuration file.
  784. ### Configuration
  785. To enable reload functionality, add reload settings to your `config.json`:
  786. ```json
  787. {
  788. "version": "2.0",
  789. "reload": {
  790. "enabled": true,
  791. "interval": "30m"
  792. }
  793. }
  794. ```
  795. **Configuration Options**:
  796. - `enabled`: Must be set to `true` to activate reload functionality (default: `false`)
  797. - `interval`: Time between automatic reloads (default: `"30m"`, minimum: `"10s"`)
  798. ### Usage
  799. **Automatic Reload**: When enabled, the application automatically reloads at the configured interval to reconnect to MCP servers and refresh tool discovery.
  800. **Manual Reload**: Even with automatic reload disabled, you can trigger manual reloads using signals:
  801. ```bash
  802. # In Kubernetes
  803. kubectl exec -it <pod-name> -- kill -USR1 1
  804. # Local process
  805. kill -USR1 <process-id>
  806. ```
  807. ### Benefits
  808. - **Zero Downtime**: Application stays running during reload
  809. - **Kubernetes-Friendly**: Pod continues running while application components restart
  810. - **Opt-in**: Disabled by default, only enabled when explicitly configured
  811. - **Flexible**: Both automatic (periodic) and manual (signal) triggers
  812. - **Safe**: Minimum interval validation prevents excessive reloading
  813. When enabled, the reload feature automatically:
  814. - Reconnects to all configured MCP servers
  815. - Rediscovers available tools
  816. - Refreshes configuration settings
  817. - Maintains Slack connection throughout the process
  818. Perfect for production environments where MCP servers may restart due to updates, scaling, or maintenance.
  819. ## Slack-Formatted Output
  820. The client includes a comprehensive Slack-formatted output system that enhances message display in Slack:
  821. - **Automatic Format Detection**: Automatically detects message type (plain text, markdown, JSON Block Kit, structured data) and applies appropriate formatting
  822. - **Markdown Formatting**: Supports Slack's mrkdwn syntax with automatic conversion from standard Markdown
  823. - Converts `**bold**` to `*bold*` for proper Slack bold formatting
  824. - Preserves inline code, block quotes, lists, and other formatting elements
  825. - **Quoted String Enhancement**: Automatically converts double-quoted strings to inline code blocks for better visualization
  826. - Example: `"namespace-name"` becomes `` `namespace-name` `` in Slack
  827. - Improves readability of IDs, timestamps, and other quoted values
  828. - **Block Kit Integration**: Converts structured data to Block Kit layouts for better visual presentation
  829. - Automatically validates against Slack API limits
  830. - Falls back to plain text if Block Kit validation fails
  831. For more details, see the [Slack Formatting Guide](docs/format.md).
  832. ## Transport Modes
  833. The client supports three transport modes:
  834. - **SSE (default)**: Uses Server-Sent Events for real-time communication with the MCP server, includes automatic retry logic for enhanced reliability
  835. - **HTTP**: Uses HTTP POST requests with JSON-RPC for communication
  836. - **stdio**: Uses standard input/output for local development and testing
  837. ## Documentation
  838. Comprehensive documentation is available in the `docs/` directory:
  839. ### Configuration & Setup
  840. - **[Slack Configuration Guide](docs/configuration.md)** - Complete guide for setting up your Slack app, including required permissions, tokens, and troubleshooting common issues
  841. ### Development & Implementation
  842. - **[Implementation Notes](docs/implementation.md)** - Detailed technical documentation covering the current architecture, core components, and implementation details
  843. - **[Requirements Specification](docs/requirements.md)** - Comprehensive requirements documentation including implemented features, quality requirements, and future enhancements
  844. ### User Guides
  845. - **[Slack Formatting Guide](docs/format.md)** - Complete guide to message formatting including Markdown-to-Slack conversion, Block Kit layouts, and automatic format detection
  846. - **[RAG Implementation Guide](docs/rag-json.md)** - Detailed guide for the improved RAG system with LangChain Go compatibility and performance optimizations
  847. - **[RAG SQLite Implementation](docs/rag-sqlite.md)** - Implementation plan for native Go SQLite integration with ChatGPT-like upload experience
  848. - **[Testing Guide](docs/test.md)** - Comprehensive testing documentation covering unit tests, integration tests, manual testing procedures, and debugging
  849. ### Quick Links
  850. - **Setup**: Start with the [Slack Configuration Guide](docs/configuration.md) for initial setup
  851. - **Agent Mode**: See the Agent Mode section above for autonomous AI agents with tool chaining
  852. - **RAG**: Check the [RAG Implementation Guide](docs/rag-json.md) for document knowledge base integration
  853. - **Formatting**: See the [Slack Formatting Guide](docs/format.md) for message formatting capabilities
  854. - **RAG SQLite**: See the [RAG SQLite Implementation](docs/rag-sqlite.md) for native Go implementation with modern upload UX
  855. - **Development**: Check the [Implementation Notes](docs/implementation.md) for technical details
  856. - **Testing**: Use the [Testing Guide](docs/test.md) for testing procedures and debugging
  857. - **Monitoring**: See the metrics configuration section above for Prometheus integration
  858. - **Dependencies**: Review [Dependencies](docs/DEPENDENCIES.md) for version tracking and upgrade history
  859. ## Contributing
  860. Contributions are welcome! Please feel free to submit a Pull Request.
  861. ## License
  862. This project is licensed under the MIT License - see the LICENSE file for details.
  863. ## CI/CD and Releases
  864. This project uses GitHub Actions for continuous integration and GoReleaser for automated releases.
  865. ### Continuous Integration Checks
  866. Our CI pipeline performs the following checks on all PRs and commits to the main branch:
  867. #### Code Quality
  868. - **Linting**: Using golangci-lint to check for common code issues and style violations
  869. - **Go Module Verification**: Ensuring go.mod and go.sum are properly maintained
  870. - **Formatting**: Verifying code is properly formatted with gofmt
  871. #### Security
  872. - **Vulnerability Scanning**: Using govulncheck to check for known vulnerabilities in dependencies
  873. - **Dependency Scanning**: Using Trivy to scan for vulnerabilities in dependencies
  874. - **SBOM Generation**: Creating a Software Bill of Materials for dependency tracking
  875. #### Testing
  876. - **Unit Tests**: Running tests with race detection and code coverage reporting
  877. - **Build Verification**: Ensuring the codebase builds successfully
  878. ### Release Process
  879. When changes are merged to the main branch:
  880. 1. CI checks are run to validate code quality and security
  881. 2. If successful, a new release is automatically created with:
  882. - Semantic versioning based on commit messages
  883. - Binary builds for multiple platforms
  884. - Docker image publishing to GitHub Container Registry
  885. - Helm chart publishing to GitHub Container Registry

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.