Skip to content

QWED-AI/qwed-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

41 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
QWED Logo - AI Verification Engine

QWED Protocol

Model Agnostic Verification Layer for AI

PyPI Docker Verified Docker Scout Cloudflare Snyk Security License MCP GitHub stars Verified by QWED

MCP Server for QWED Verification โ€” Bring deterministic verification to Claude Desktop, VS Code, and any MCP-compatible AI assistant.

๐Ÿ“š Full Documentation: docs.qwedai.com/mcp


โšก Quick Install

pip install qwed-mcp

๐Ÿš€ Setup with Claude Desktop

Step 1: Find your config file

OS Path
Windows %APPDATA%\Claude\claude_desktop_config.json
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

Step 2: Add QWED-MCP

macOS/Linux:

{
  "mcpServers": {
    "qwed-verification": {
      "command": "qwed-mcp"
    }
  }
}

Windows (use python -m):

{
  "mcpServers": {
    "qwed-verification": {
      "command": "python",
      "args": ["-m", "qwed_mcp.server"]
    }
  }
}

Step 3: Restart Claude Desktop

Quit completely (system tray โ†’ Quit) and reopen.

Step 4: Test it!

Ask Claude:

"Verify the derivative of xยณ equals 3xยฒ using verify_math"


๐Ÿ”ง Available Tools

Tool Engine Use Case
verify_math SymPy Verify calculations, derivatives, integrals
verify_logic Z3 Solver Prove logical arguments, validate reasoning
verify_code AST Analysis Detect security vulnerabilities
verify_sql Pattern Matching SQL injection detection

๐Ÿ’ก Example Prompts for Claude

Financial Calculations

A bank says: "Invest $10,000 at 7.5% compounded quarterly for 5 years = $14,356.29"
Use verify_math to check using A = P(1 + r/n)^(nt)

Loan EMI Verification

Verify: โ‚น10,00,000 loan at 9% for 5 years = EMI of โ‚น20,758
Use the EMI formula: EMI = P ร— r ร— (1+r)^n / ((1+r)^n - 1)

Logic Verification

Use verify_logic:
Premises: "All mammals are warm-blooded", "Dolphins are mammals"
Conclusion: "Dolphins are warm-blooded"

Code Security Check

Use verify_code to check this for security issues:

def run_command(cmd):
    os.system(cmd)
    return eval(get_response())

SQL Injection Detection

Use verify_sql to check:
SELECT * FROM accounts WHERE user_id = '1' OR '1'='1'

๐Ÿ—๏ธ How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Claude Desktop / VS Code             โ”‚
โ”‚           (MCP Client)                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚ MCP Protocol (JSON-RPC)
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           QWED-MCP Server                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  verify_math()    โ†’ SymPy (symbolic math) โ”‚
โ”‚  verify_logic()   โ†’ Z3 SMT Solver         โ”‚
โ”‚  verify_code()    โ†’ Python AST Analysis   โ”‚
โ”‚  verify_sql()     โ†’ Regex Pattern Match   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฏ Why QWED-MCP?

Without QWED-MCP With QWED-MCP
LLM calculates โ†’ 95% correct verify_math() โ†’ 100% correct
LLM writes SQL โ†’ might inject verify_sql() โ†’ injection detected
LLM reasons โ†’ might be wrong verify_logic() โ†’ formally proven
LLM codes โ†’ might be unsafe verify_code() โ†’ security checked

๐Ÿ’ก What QWED-MCP Is (and Isn't)

โœ… QWED-MCP IS:

  • MCP Server that adds verification tools to Claude Desktop and VS Code
  • Deterministic โ€” uses SymPy (math), Z3 (logic), AST (code) for exact verification
  • Open source โ€” works with any MCP-compatible AI assistant
  • A safety layer โ€” catches LLM hallucinations in real-time

โŒ QWED-MCP is NOT:

  • A replacement for Claude โ€” it enhances Claude with verification tools
  • A chatbot โ€” it's a backend server that Claude calls
  • Internet-connected โ€” all verification happens locally
  • A fine-tuned model โ€” uses symbolic engines, not ML

Think of QWED-MCP as giving Claude a "calculator" for math and a "theorem prover" for logic.

Claude reasons. QWED-MCP verifies.


๐Ÿ†š How We're Different from Other MCP Servers

Aspect Other MCP Servers QWED-MCP
Purpose Connect to APIs, databases, files Verify LLM outputs
Approach Fetch external data Compute deterministic proofs
Engines API wrappers SymPy, Z3, AST analyzers
Accuracy Depends on data source 100% mathematically proven
Offline Often need internet Fully local, no APIs

With Claude Desktop

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Claude       โ”‚ โ”€โ”€โ–บ โ”‚    QWED-MCP     โ”‚ โ”€โ”€โ–บ โ”‚  Verified Answer โ”‚
โ”‚ "What's d/dx xยณ?" โ”‚     โ”‚ verify_math()   โ”‚     โ”‚    "3xยฒ" โœ“       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”’ Security & Privacy

All verification happens locally. Nothing is sent to external servers.

Concern QWED-MCP Approach
Data Transmission โŒ No external API calls
Storage โŒ Nothing logged or stored
Dependencies โœ… Local engines (SymPy, Z3)
Code Analysis โœ… Your code never leaves your machine

Perfect for:

  • Enterprises with strict security policies
  • Air-gapped development environments
  • Sensitive code review workflows

โ“ FAQ

Is QWED-MCP free?

Yes! Open source under Apache 2.0. Use it commercially, modify it, distribute it.

Does it work with VS Code Copilot?

QWED-MCP works with any MCP-compatible client. VS Code with Claude extension supports MCP, so yes!

Do I need an API key?

No. QWED-MCP runs entirely locally. No API keys, no cloud calls.

What's the difference between this and QWED-Core?

QWED-Core is the Python library. QWED-MCP wraps it as an MCP server so Claude can use it as a tool.

Can I add my own verification tools?

Yes! The server is extensible. Fork it and add your custom @mcp.tool() functions.


๐Ÿ—บ๏ธ Roadmap

โœ… Released (v1.0.0)

  • verify_math โ€” SymPy symbolic math
  • verify_logic โ€” Z3 SMT solver
  • verify_code โ€” Python AST security analysis
  • verify_sql โ€” SQL injection detection
  • Claude Desktop integration
  • Windows/macOS/Linux support

๐Ÿšง In Progress

  • verify_json โ€” JSON Schema validation tool
  • verify_finance โ€” NPV/IRR/amortization tool
  • Cursor IDE integration guide

๐Ÿ”ฎ Planned

  • verify_legal โ€” Deadline and liability verification
  • verify_statistics โ€” Hypothesis test validation
  • SSE (Server-Sent Events) transport for web UIs
  • TypeScript implementation

๐Ÿ“ Examples

See the examples/ folder for:

  • Python client usage
  • Sample verification scripts
  • Integration examples

๐Ÿ› ๏ธ Development

# Clone
git clone https://github.com/QWED-AI/qwed-mcp.git
cd qwed-mcp

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Format code
black src/

๐Ÿ“– Documentation

Resource Link
Full Docs docs.qwedai.com/mcp
Tools Reference docs.qwedai.com/mcp/tools
Examples docs.qwedai.com/mcp/examples
Troubleshooting docs.qwedai.com/mcp/troubleshooting
MCP Protocol modelcontextprotocol.io

๐Ÿ”— Related Projects


๐Ÿ“„ License

Apache 2.0 โ€” See LICENSE


Built by QWED AI
Making AI outputs trustworthy through formal verification

About

MCP Server for QWED Verification - Use QWED verification tools in Claude Desktop, VS Code, and any MCP client

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors