feat: add MCP client examples (no-auth, slack-identity, DCR, external-auth)#66
Draft
zimeg wants to merge 26 commits into
Draft
feat: add MCP client examples (no-auth, slack-identity, DCR, external-auth)#66zimeg wants to merge 26 commits into
zimeg wants to merge 26 commits into
Conversation
Add manifests, READMEs, requirements, and static files for all four MCP client examples (no-auth, slack-identity, DCR, external-auth). Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Force-add .env.example files that are excluded by the .env* gitignore pattern to provide template environment configuration. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Fix body-consuming bug in SlackSignatureMiddleware that prevented the downstream MCP handler from reading the request body. Add replay_receive to make the body available after signature verification. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
- Add 4 integration tests for profile card MCP server - Add mcp:connect to OAuth scopes to match manifest - Add MCP examples to CI test matrix with fail-fast: false - Add dependabot entries for both MCP example directories - Update root README with AI/MCP examples section - Make mypy conditional in CI (only if installed) Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
- Add mypy>=2.1.0 to both MCP example requirements - Use ToolAnnotations object instead of dict literal - Handle None case for model_extra in slack-identity - Remove conditional mypy in CI (all examples have it now) Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
- Use Route instead of Mount to serve /mcp directly (eliminates 307 redirect that Slack's MCP client does not follow on POST) - Add _meta.ui.csp with esm.sh domains to dice resource (unblocks script loading in sandboxed iframe) - Document --host-header=rewrite for ngrok (satisfies DNS-rebinding protection allowlist) - Reorder app.py sections to mirror JS examples (MCP first, Bolt second) - Clean up test files (inline MCP_PATH, move helpers to bottom) Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
- Add docstrings mirroring JS examples, remove section comments - Inline bolt_handler, rename tests to match JS equivalents - Replace httpx with httpx2, sort requirements alphabetically - Use os.environ[] instead of fallback empty string for signing secret Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
roll_dicetool, structured content, and a custom dice roller UI resource. No user-level auth required._meta.slackcontext to look up user profiles via OAuth. Demonstrates installation flow with install button fallback.Architecture
All code examples use Starlette to compose Bolt (via
SlackRequestHandler) and MCP (viaFastMCP.streamable_http_app()) in a single ASGI process. ASlackSignatureMiddlewareverifies request signatures before forwarding to the MCP handler.Also included
fail-fast: false)Test plan
pytest -vpasses for no-auth (3 tests)pytest -vpasses for slack-identity (4 tests)ruff check+ruff format --checkpasses for bothmypy ./**/*.pypasses for bothslack runagainst a dev workspace🤖 Generated with Claude Code