QWED-MCP

QWED-MCP

Enables deterministic verification for AI assistants by executing Python code that uses symbolic engines like SymPy and Z3 for math, logic, and code analysis.

Category
Visit Server

README

<div align="center"> <img src="assets/logo.svg" alt="QWED Logo - AI Verification Engine" width="80" height="80"> <h1>QWED-MCP šŸ”Œ</h1> <h3>Deterministic Verification for Claude Desktop & VS Code</h3>

PyPI Docker Verified Docker Scout Cloudflare Snyk Security Docs by Mintlify Deploys by Netlify License MCP GitHub stars Verified by QWED

</div>

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.0.

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

<details> <summary><b>Is QWED-MCP free?</b></summary>

Yes! Open source under Apache 2.0. Use it commercially, modify it, distribute it. </details>

<details> <summary><b>Does it work with VS Code Copilot?</b></summary>

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

<details> <summary><b>Do I need an API key?</b></summary>

No. QWED-MCP runs entirely locally. No API keys, no cloud calls. </details>

<details> <summary><b>What's the difference between this and QWED-Core?</b></summary>

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

<details> <summary><b>Can I add my own verification tools?</b></summary>

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


šŸ—ŗļø Roadmap

āœ… Released (v0.2.0)

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


<p align="center"> <b>Built by <a href="https://qwedai.com">QWED AI</a></b><br> <i>Making AI outputs trustworthy through formal verification</i> </p>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured