AlexandrAI AGENTS.md
agents-md

LMSSEP Slack MCP Server Agent Guide

Project-specific AGENTS.md guidance for the LMSSEP Slack MCP server, message retrieval, posting, deletion, search, digest generation, extraction scripts, and token safety.

AGENTS.md

Guidance for coding agents working on LMSSEP Slack MCP Server.

Project Overview

The Slack server exposes tools for thread retrieval, single-message retrieval, channel history, public and ephemeral posting, deletion, thread search, user-message search, digest generation, and digest posting. It also includes standalone extraction scripts for backups and analysis.

Key paths:

  • slack/README.md: tool overview.
  • slack/main.py: MCP entrypoint.
  • slack/requirements.txt: dependencies.
  • slack/configs/: local Slack credential config.
  • slack/scripts/: extraction scripts.
  • slack/output/: local backups and generated exports.

Setup Commands

bashcd <project-root>/slack
pip install -r requirements.txt
cp configs/slack.py.template configs/slack.py
python3 main.py

Use placeholders such as <SLACK_CHANNEL_ID>, <SLACK_USER_ID>, <THREAD_URL>, <BOT_TOKEN>, and <USER_TOKEN> in examples.

Tool Rules

  • Retrieval tools should preserve thread/message context and timestamps.
  • Posting tools must require explicit channel and text inputs.
  • Deletion and bulk deletion are high-risk operations; require clear operator intent.
  • Search tools should rank results and return enough context for follow-up.
  • Digest generation should cite source channel/date scope internally without leaking tokens.

Script Rules

  • Extraction scripts should write JSON or Markdown under the documented output tree.
  • Date and user filters must be explicit for bulk exports.
  • Do not broaden a user's requested export scope without confirmation.

Testing

  • Test config validation without real tokens.
  • Unit test formatting, pagination handling, date filters, and redaction.
  • Use a small controlled workspace or fixture for destructive operation tests.

Security

  • Never commit configured Slack tokens or exported private messages.
  • Redact user IDs, channel IDs, workspace hostnames, and message URLs in public examples.
  • Treat digests and backups as confidential unless explicitly approved for sharing.