Advanced Python Function Debugging with MCP Integration.
AI-Powered Python Function Analysis and Control
Gnosis Mystic gives AI assistants direct access to your Python functions through runtime hijacking and intelligent analysis. Add minimal decorators, and Claude can inspect, optimize, and control your code in real-time.
Mystic was inspired by Giantswarm's mcp-debug.
Code by fairly stock Claude Code. Prompts, code sketches, and planning by Claude Desktop using Gnosis Evolve tools.
AI assistants are blind to your running code:
Gnosis Mystic creates a direct AI-to-code interface:
@hijack_function(AnalysisStrategy())
def fetch_user_data(user_id):
response = requests.get(f"https://api.example.com/users/{user_id}")
return response.json()
# Claude can now see:
# - Call frequency and patterns
# - Performance metrics
# - Parameter distributions
# - Error rates and types
# You add minimal decoration
@hijack_function()
def expensive_calculation(data):
# Your logic unchanged
return complex_math(data)
# Claude can experiment with:
# - Adding caching strategies
# - Performance profiling
# - Mock data for testing
# - Alternative implementations
@hijack_function(SecurityStrategy())
def process_payment(user_id, credit_card, amount):
# Your business logic unchanged
return payment_processor.charge(credit_card, amount)
# Claude automatically detects and reports:
# - Sensitive data in logs
# - Security vulnerabilities
# - Data flow patterns
# Install from source
git clone https://github.com/gnosis/gnosis-mystic.git
cd gnosis-mystic
pip install -e ".[web]"
# Initialize your project
cd /path/to/your/project
mystic init
# Start the server for AI integration
mystic serve
# Let Claude discover your functions
mystic discover
import mystic
# Minimal decoration for AI visibility
@mystic.hijack()
def api_call(endpoint, data):
return requests.post(f"https://api.com/{endpoint}", json=data)
# Claude can now:
# - See all calls and responses
# - Measure performance
# - Suggest optimizations
# - Test improvements
@mystic.hijack(
strategies=[
mystic.AnalysisStrategy(track_performance=True),
mystic.SecurityStrategy(scan_sensitive_data=True)
]
)
def process_user_data(user_info):
# Your code unchanged
return database.save(user_info)
Initialize your project:
cd /your/project
mystic init
Start the server:
mystic serve
Add to Claude Desktop config:
{
"mcpServers": {
"gnosis-mystic": {
"command": "python",
"args": [
"C:\\path\\to\\gnosis-mystic\\mystic_mcp_standalone.py",
"--project-root",
"C:\\your\\project"
]
}
}
}
AI-Powered Development:
Once integrated, Claude can:
Gnosis Mystic creates a bridge between your code and AI:
Your Function + @hijack_function โ Mystic Layer โ AI Analysis
โ โ
โโโโโโโ Core Logic Preserved โโโโโ AI Control โโโ
We welcome contributions! See CONTRIBUTING.md for guidelines.
Apache 2.0 License - see LICENSE for details.
The future of Python development: Your code, enhanced by AI. ๐ฎโจ
Imagine Claude knowing exactly how your functions behave, optimizing them in real-time, and debugging issues before you even notice them. That's Gnosis Mystic.
{ "mcpServers": { "gnosis-mystic": { "command": "python", "args": [ "C:\\path\\to\\gnosis-mystic\\mystic_mcp_standalone.py", "--project-root", "C:\\your\\project" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories