
Discrete Structures
io.github.ZohaibCodezPublished by GitHub account ZohaibCodezv0.1.4Updated Oct 24, 2026
Comprehensive tools for discrete mathematics: logic, algorithms, number theory, cryptography
Overview
A local MCP server giving assistants 21 discrete-mathematics tools: boolean logic, number theory, algorithm visualizations and classical/RSA/AES cryptography.
- What you can do
- Evaluate, simplify and convert boolean expressions, including truth tables and CNF/DNF forms. Test primality, factor numbers, compute GCD/LCM, modular arithmetic and Euler's totient. Step through sorting, binary search and graph algorithms such as Dijkstra and BFS/DFS. Encrypt and decrypt with Caesar, Vigenere, RSA and AES, and generate RSA key pairs.
- When to use it
- Useful for teaching or studying discrete mathematics, algorithms and cryptography, for working through algorithmic interview problems, or for quick number-theory and boolean-logic calculations with explanations.
- Requirements
- Runs locally as a Python package (Python 3.11+) launched with uvx or pip; no accounts, API keys or environment variables are declared. Desktop MCP clients only.
Installation
In SourceWeft
- Open Discrete Structures in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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! ⭐
Source: mcp-server/README.md at commit b878c1c
Tools
0Version history
1- v0.1.4LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.