QWED-MCP Overview
Model Context Protocol (MCP) Server for QWED VerificationWhy QWED-MCP?
The Problem
LLMs are powerful but unreliable for:- Mathematical calculations - They approximate, don’t compute
- Logical reasoning - They guess patterns, don’t prove
- Code security - They miss edge cases, don’t analyze
- SQL queries - They don’t validate, just generate
The Solution
QWED-MCP gives AI assistants access to deterministic verification tools:| Without QWED-MCP | With QWED-MCP |
|---|---|
| Claude calculates → 95% correct | Claude + verify_math → 100% correct |
| Claude writes SQL → might inject | Claude + verify_sql → injection detected |
| Claude reasons → might be wrong | Claude + verify_logic → formally proven |
| Claude codes → might be unsafe | Claude + verify_code → security checked |
How It Works
Available Tools
| Tool | Engine | Use Case |
|---|---|---|
verify_math | SymPy | Verify calculations, derivatives, integrals |
verify_logic | Z3 SMT | Prove logical arguments, check validity |
verify_code | AST | Detect security vulnerabilities in code |
verify_sql | Pattern | SQL injection detection, query validation |
Installation
From PyPI (Recommended)
From Source
Verify Installation
Quick Start
Claude Desktop Setup
-
Find your config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
- Add QWED-MCP server:
- Restart Claude Desktop
-
Test it! Ask Claude:
“What’s the derivative of x^3? Use verify_math to check.”
VS Code Setup
- Install MCP extension (if not already)
- Add to settings.json:
- Restart VS Code
Python Client
You can also use QWED-MCP programmatically:Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
QWED_LOG_LEVEL | Logging level (DEBUG, INFO, WARNING, ERROR) | INFO |
QWED_TIMEOUT | Tool execution timeout in seconds | 30 |
Example with Environment Variables
Windows (PowerShell):Use Cases
1. Financial Calculations
Verify that AI-generated financial calculations are correct:2. Research Validation
Ensure scientific claims are logically valid:3. Secure Coding
Check AI-generated code for security issues:4. SQL Security
Prevent SQL injection in generated queries:Links
- PyPI: pypi.org/project/qwed-mcp
- GitHub: github.com/QWED-AI/qwed-mcp
- Docker Hub (organization): hub.docker.com/orgs/qwedai/repositories
- Docker Hub (QWED Verification): qwedai/qwed-verification
- Docker Hub (QWED MCP): qwedai/qwed-mcp
- MCP Protocol: modelcontextprotocol.io
- QWED Core: QWED Verification Engine