Skip to main content

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

Project description

QWED Logo - AI Verification Engine

QWED-MCP ๐Ÿ”Œ

Deterministic Verification for Claude Desktop & VS Code

PyPI Docker Verified Docker Scout Cloudflare Snyk Security Docs by Mintlify Deploys by Netlify 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:

"Write a python script that verifies a 10,000 investment at 7.5% for 5 years using the qwed_new math engine, and run it using execute_python_code."


โš ๏ธ Migration Note: Deprecation of verify_* Tools

To solve "context bloat" and align with the new MCP standard (RFC-9728), all 1:1 functional tools (e.g., verify_math, verify_sql, verify_code) have been removed as of v0.2.1.

They have been replaced with a single, highly capable tool: ๐Ÿ‘‰ execute_python_code

Before:

"Use verify_math to check this formula." (Claude loads 14 different tool schemas into context)

After:

"Use execute_python_code to write and run a script that imports qwed_new.engines.math_engine to verify..." (Claude loads 1 tool schema into context)

If you see an "Unknown tool" error, it means Claude is trying to use a legacy tool. Simply tell Claude: "The verify_* tools are removed. Use execute_python_code to natively write and run a Python verification script."


๐Ÿ”ง Available Tools

Tool Description Use Case
execute_python_code Subprocess Execution The single entrypoint for all QWED capabilities. Executes dynamically generated Python code in a subprocess with restricted environment variables. Note: Runs with server privileges; ensure inputs are trusted.

๐Ÿ’ก Example Prompts for Claude

Note: Claude already knows how to use QWED natively via standard Python imports.

Financial Calculations

A bank says: "Invest $10,000 at 7.5% compounded quarterly for 5 years = $14,356.29"
Please write a short Python script using the standard compound interest formula to verify this, and run it with execute_python_code.

Loan EMI Verification

Verify: โ‚น10,00,000 loan at 9% for 5 years = EMI of โ‚น20,758
Write a python script importing necessary tools to verify this EMI calculation, and execute it using execute_python_code.

Complex Reasoning Workflows (The Power of Python)

Read the user terms in the attached document. 
1. Use execute_python_code to extract and verify the legal clauses using qwed_legal.
2. In the same script, verify if the referenced financial penalties align with the allowed boundaries.

๐Ÿ—๏ธ How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Claude Desktop / VS Code             โ”‚
โ”‚           (MCP Client)                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚ MCP Protocol (JSON-RPC)
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           QWED-MCP Server                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ execute_python_code()                     โ”‚
โ”‚  โ””โ”€โ–บ Subprocess Execution (Restricted Env)โ”‚
โ”‚       โ””โ”€โ–บ Native QWED library execution   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฏ Why QWED-MCP?

Note: Subprocess execution provides answers/checks purely based on what QWED SDK methods are invoked inside the executed scripts. Execution itself does not guarantee injection detection without specific SDK calls.

Without QWED-MCP With QWED-MCP
LLM calculates โ†’ 95% correct Executes Python script calling qwed_finance โ†’ 100% correct
LLM writes SQL โ†’ might inject Script uses qwed_new analyzer โ†’ injection detected
LLM reasons โ†’ might be wrong Z3 solver executed via SDK โ†’ formally proven
LLM codes โ†’ might be unsafe AST check script executed โ†’ 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ยณ?" โ”‚ โ”€โ”€โ–บ โ”‚ execute_python_code() โ”‚ โ”€โ”€โ–บ โ”‚      "3xยฒ" โœ“      โ”‚
โ”‚ "Write script to  โ”‚     โ”‚ Runs SymPy natively   โ”‚     โ”‚ (STDOUT Captured) โ”‚
โ”‚ check."           โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”’ 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 (v0.2.1)

  • Context bloat resolution (RFC-9728 compatibility)
  • Unified execute_python_code environment
  • Secure process isolation (env-restricted) and robust timeouts
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qwed_mcp-0.2.1.tar.gz (46.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qwed_mcp-0.2.1-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file qwed_mcp-0.2.1.tar.gz.

File metadata

  • Download URL: qwed_mcp-0.2.1.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qwed_mcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 87bd41333298bb85166a130b8a181df50a088fda8cc9f0b1e151c746c0e50765
MD5 7485e0f21f7798c893529999170af1a1
BLAKE2b-256 f966725694b2e1415f0158ed0ce07ae03a767f45fc8d572eec66c32420ea283f

See more details on using hashes here.

Provenance

The following attestation bundles were made for qwed_mcp-0.2.1.tar.gz:

Publisher: publish.yml on QWED-AI/qwed-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qwed_mcp-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: qwed_mcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qwed_mcp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56d86ca41ae1b78aa745a39f7a38db45505317e160bd5edbecc37bffda616e2a
MD5 a0db6104fa2c502009c8d8bc4d1b5cba
BLAKE2b-256 a38e8780c7bf19d58bd327ff223b3a509332d04fb0e4e55b12246bae0854a5b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for qwed_mcp-0.2.1-py3-none-any.whl:

Publisher: publish.yml on QWED-AI/qwed-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page