MCPcopy Index your code
hub / github.com/abdolence/slack-morphism-rust

github.com/abdolence/slack-morphism-rust @v2.22.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.22.0 ↗ · + Follow
883 symbols 1,316 edges 100 files 76 documented · 9%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cargo tests and formatting security audit

Slack Morphism for Rust

Slack Morphism is a modern client library for Slack Web/Events API/Socket Mode and Block Kit.

Documentation

Please follow to the official website: https://slack-rust.abdolence.dev.

Examples

https://github.com/abdolence/slack-morphism-rust/tree/master/examples

The examples require to work the following environment variables (from your Slack bot profile in api.slack.com):

  • SLACK_TEST_TOKEN - for Slack client example
  • SLACK_TEST_APP_TOKEN - for Slack client with Socket Mode example
  • SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_BOT_SCOPE, SLACK_REDIRECT_HOST - for OAuth routes for Events API example
  • SLACK_SIGNING_SECRET for all routes for Events API example

To run example use with environment variables:

# SLACK_... cargo run --example <client|events_api_server|axum_events_api_server|socket_mode> --all-features

Routes for this example are available on http://:8080:

  • /auth/install - to begin OAuth installation
  • /auth/callback - a callback endpoint for Slack OAuth profile config
  • /push - for Slack Push Events
  • /interaction - for Slack Interaction Events
  • /command - for Slack Command Events

Testing Events API with ngrok

For development/testing purposes you can use ngrok:

ngrok http 8080

and copy the URL it gives for you to the example parameters for SLACK_REDIRECT_HOST.

Example testing with ngrok:

SLACK_CLIENT_ID=<your-client-id> \
SLACK_CLIENT_SECRET=<your-client-secret> \
SLACK_BOT_SCOPE=app_mentions:read,incoming-webhook \
SLACK_REDIRECT_HOST=https://<your-ngrok-url>.ngrok.io \
SLACK_SIGNING_SECRET=<your-signing-secret> \
cargo run --example events_api_server  --all-features

Licence

Apache Software License (ASL)

Author

Abdulla Abdurakhmanov

with the great help of contributors, particularly: - Naoki Ikeguchi (@siketyan) - David Rousselie (@dax)

and many others

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Class 473
Method 262
Function 87
Enum 46
Interface 15

Languages

Rust100%

Modules by API surface

src/models/blocks/kit.rs97 symbols
src/api/conversations.rs56 symbols
src/models/common/mod.rs49 symbols
src/api/chat.rs43 symbols
src/models/events/push.rs39 symbols
src/api/users.rs30 symbols
src/api/files.rs28 symbols
src/client.rs24 symbols
src/signature_verifier.rs18 symbols
src/api/apps.rs17 symbols
src/models/events/interaction.rs16 symbols
src/models/blocks/view.rs15 symbols

For agents

$ claude mcp add slack-morphism-rust \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page