
Discrete Structures
io.github.ZohaibCodez由 GitHub 账号 ZohaibCodez 发布v0.1.4更新于 Oct 24, 2026
Comprehensive tools for discrete mathematics: logic, algorithms, number theory, cryptography
概览
本地 MCP 服务器,为助手提供 21 个离散数学工具:布尔逻辑、数论、算法可视化,以及古典、RSA 与 AES 密码学。
- 可以做什么
- 求值、化简布尔表达式,生成真值表并转换为 CNF/DNF 形式。判断素数、分解质因数、计算最大公约数与最小公倍数、模运算和欧拉函数。逐步演示排序、二分查找以及 Dijkstra、BFS/DFS 等图算法。使用凯撒、维吉尼亚、RSA 和 AES 进行加解密,并生成 RSA 密钥对。
- 适用场景
- 适合教学或学习离散数学、算法与密码学,练习算法面试题,或需要带解释的数论与布尔逻辑计算时使用。
- 运行要求
- 以 Python 包形式在本地运行(需 Python 3.11+),通过 uvx 或 pip 启动;未声明账号、API 密钥或环境变量。仅支持桌面 MCP 客户端。
安装
在 SourceWeft 中
- 打开 控制台中的 Discrete Structures,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
🎓 Discrete Structures MCP Server
[PyPI version] [Python Version] [MCP Registry] [License: MIT] [Downloads]
Professional-grade AI tools for discrete mathematics, algorithms, and cryptography
Installation • Features • Quick Start • Documentation • Examples
🚀 Overview
Discrete Structures MCP Server is a comprehensive Model Context Protocol server that brings 21 powerful mathematical tools to AI assistants like Claude Desktop, Cline, and Zed. Perfect for students, educators, and developers working with discrete mathematics, data structures, algorithms, and cryptography.
Why Choose This Server?
- 🎯 21 Production-Ready Tools across 4 categories
- 📚 Educational Focus with step-by-step visualizations
- 🔒 Enterprise Cryptography (RSA, AES, Caesar, Vigenere)
- 📊 Algorithm Visualizations for sorting and graph algorithms
- 🧮 Boolean Logic with CNF/DNF conversion
- 🔢 Number Theory including prime factorization and modular arithmetic
- ⚡ Fast Installation via
uvx discrete-structures-mcp - 🌐 MCP Registry Listed for easy discovery
✨ Features
📦 Installation
⚡ Quick Install (Recommended)
📥 Install with pip
🛠️ Development Installation
🎯 Quick Start
Usage with Claude Desktop
Add to your claude_desktop_config.json:
Usage with Other MCP Clients
Compatible with any MCP client:
- Cline - VS Code extension
- Zed - Modern code editor
- Continue - AI code assistant
- Custom MCP clients via Python SDK
💻 Example Tool Calls
💻 Example Tool Calls
🔢 Number Theory Examples
Calculate GCD and LCM
Prime Factorization
Modular Arithmetic
🧮 Boolean Logic Examples
Generate Truth Table
Simplify Boolean Expression
Convert to CNF
📊 Algorithm Visualization Examples
Visualize Bubble Sort
Binary Search
Dijkstra's Algorithm
🔐 Cryptography Examples
RSA Encryption
AES Encryption
Caesar Cipher
🎓 Use Cases
- Computer Science Education - Teach algorithms and data structures
- Cryptography Learning - Understand encryption methods
- Mathematics Research - Number theory and discrete math
- Algorithm Analysis - Visualize complexity and performance
- Code Interviews - Practice common algorithmic problems
- Academic Projects - Implement mathematical concepts
🏗️ Technical Stack
- Language: Python 3.11+
- Framework: Model Context Protocol (MCP)
- Math Libraries: SymPy, NumPy
- Crypto: Python Cryptography library
- Graphs: NetworkX
- Build: UV package manager
📊 Performance
- Startup Time: < 2 seconds
- Response Time: < 100ms for most operations
- Memory: < 50MB baseline
- Concurrency: Async/await support
🔒 Security Note
Educational Purpose: Caesar and Vigenere ciphers are for learning only. Use AES or RSA for real-world encryption.
🤝 Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links & Resources
Official Links
- 🏠 Homepage: GitHub Repository
- 📦 PyPI Package: discrete-structures-mcp
- 🌐 MCP Registry: Official Listing
- 📝 Documentation: README
- 🐛 Issue Tracker: Report Bugs
Community
- 💬 Discussions: GitHub Discussions
- 📢 Announcements: Watch repository for updates
- 🤝 Contributing: See contribution guide
MCP Resources
- 📖 MCP Documentation: modelcontextprotocol.io
- 🛠️ MCP SDK: Python SDK
- 🌟 MCP Servers: Community Servers
📈 Project Stats
[GitHub stars] [GitHub forks] [GitHub issues] [GitHub pull requests]
🙏 Acknowledgments
- Model Context Protocol team at Anthropic
- SymPy and NumPy communities
- Python Cryptography developers
- NetworkX graph library maintainers
- All contributors and users
📞 Support
- 📧 Email: Open an issue for support
- 💬 Discussions: Use GitHub Discussions
- 🐛 Bugs: Report via Issues
- 💡 Features: Request via Issues with enhancement label
Made with ❤️ for the discrete mathematics and computer science community
⭐ Star this repo if you find it useful! ⭐
来源:mcp-server/README.md,提交 b878c1c
工具
0版本历史
1- v0.1.4最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。