MPC — Metastable Propositional Calculus MCP server

MPC — Metastable Propositional Calculus MCP server

mpc-mcp-server•byronviers

An MCP server exposing a Metastable Propositional Calculus engine that analyzes the thermodynamic and physical feasibility of logical assertions across multi-step reasoning.

License: Not specified•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Performs full MPC analysis producing hypotheses, phases, a frustration matrix, free energy, spin-glass ground state, and a Theorem 6.1 bound.
  • •Traces multi-step reasoning with an Entity Ledger that tracks epistemic drift and η_i accumulation.
  • •Assigns each claim a phase (c/s/k/r) with a rationale.
  • •Computes the Theorem 6.1 budget N_max estimate purely arithmetically, without an API call.

BEST FOR

  • •Verifying whether a complex sequence of claims can be logically maintained together without collapsing into contradiction.
  • •Detecting epistemic drift and structural conflicts (k-states) by calculating energetic holding costs of premises over time.
  • •Analyzing claims step by step with a multi-step reasoning trace.

ABOUT MPC-MCP-SERVER

MPC — Metastable Propositional Calculus MCP server is cataloged as an MCP server attributed to ronviers. An MCP server exposing a Metastable Propositional Calculus engine that analyzes the thermodynamic and physical feasibility of logical assertions across multi-step reasoning. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MPC — Metastable Propositional Calculus MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What do the MPC truth values mean?

Truth values are c (committed), s (suspended), k (conflict), and r (reset).

上游原版 README

在 GitHub 查看同一版本原文

README.md · c81439548556 · 采集于 2026-11-13 13:24:00 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MPC — Metastable Propositional Calculus

Metastable Propositional Calculus (MPC) engine. Analyzes the thermodynamic and physical feasibility of logical assertions across multi-step reasoning. Unlike standard Boolean logic, MPC detects epistemic drift and structural conflicts (k-states) by calculating the energetic holding costs of maintaining premises over time. Use this to rigorously verify whether a complex sequence of claims can be logically maintained together without collapsing into contradiction.

Truth values: c (committed) · s (suspended) · k (conflict) · r (reset)


Theory & Background

To successfully use this tool, it helps to understand the theoretical foundation of MPC. The framework models propositions as systems resting in a latent energy landscape rather than as instantaneous, costless Boolean states. For a detailed explanation of the physics, mathematics, and logic driving the engine, please review the foundational project artifacts:


What's new in v0.3

FeatureDetail
FastMCPReplaced low-level MCP server with FastMCP for cleaner tool definitions and better client compatibility
Five-provider routingAnthropic · Google · OpenAI · Kimi (Moonshot AI) · Ollama — all first-class
Dynamic model listingReal-time queries to each provider's list-models endpoint; 5-minute TTL cache
Zero env-var conflictsEach provider has its own variable: ANTHROPIC_API_KEY, GOOGLE_API_KEY, OPENAI_API_KEY, KIMI_API_KEY, OLLAMA_HOST
Provider tab in UISide-by-side key configuration, per-provider status, model counts
list_available_models toolNew MCP tool for dynamic model discovery
Retry logicTransient errors retried up to 3× with exponential back-off
/status + /env endpointsProvider health and env-var audit without exposing key values

Providers

ProviderSDKKey Env VarNotes
AnthropicanthropicANTHROPIC_API_KEYClaude claude-opus-4-6, claude-sonnet-4-6, Haiku
Googlegoogle-generativeaiGOOGLE_API_KEYGemini 2.5 Pro, 2.0 Flash, 1.5
OpenAIopenaiOPENAI_API_KEYGPT-4o, o1, o3-mini, etc.
Kimiopenai (OpenAI-compatible)KIMI_API_KEYMoonshot AI · moonshot.cn
Ollamastdlib urllibOLLAMA_HOSTLocal models, no key needed

API keys are resolved in order: explicit argument → environment variable → .env file. No provider ever reads another provider's key variable.


Install

# Core — all five providers included
pip install -e .

# Add QuTiP for exact partition function (Ising Hamiltonian)
pip install qutip

# Add NetKet for spin-glass ground-state solver (requires JAX)
pip install "jax[cpu]" netket

# Full stack
pip install -e ".[full]"

Requires Python ≥ 3.11.


Quick start

Set API keys

# Any combination — only set what you have
export ANTHROPIC_API_KEY=sk-ant-…
export GOOGLE_API_KEY=AIza…
export OPENAI_API_KEY=sk-…
export KIMI_API_KEY=sk-…          # Moonshot AI key
export OLLAMA_HOST=http://localhost:11434   # default; omit if standard

Or use the Providers tab in the browser UI to enter and persist keys to .env.

Start the server

mpc-server

Starts:

  • MCP server on stdio (register in Claude Desktop or any MCP client)
  • Browser UI on http://localhost:7771

Claude Desktop configuration

{
  "mcpServers": {
    "mpc": {
      "command": "mpc-server",
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-…",
        "GOOGLE_API_KEY": "AIza…",
        "OPENAI_API_KEY": "sk-…",
        "KIMI_API_KEY": "sk-…"
      }
    }
  }
}

MCP Tools

ToolDescriptionAPI call?
compile_textFull MPC analysis: hypotheses, phases, frustration matrix, free energy (QuTiP), spin-glass ground state, Theorem 6.1 bound✓
compile_sequenceMulti-step trace with Entity Ledger — tracks epistemic drift and η_i accumulation✓
read_claimsPer-claim phase assignment (c/s/k/r) with rationale✓
budget_estimateTheorem 6.1 N_max = O(√(2E*/αε_min d_avg)) — pure arithmetic✗
list_available_modelsReal-time model catalogue across all five providers✗ (cached)

All tools accept provider_api_key as an optional parameter; omitting it reads from environment variables automatically.


Python API

import mpc_core

# Full analysis — Anthropic (default)
result = mpc_core.compile("Your text here…", api_key="sk-ant-…")

# Google Gemini
result = mpc_core.compile("…", model="gemini-2.0-flash", api_key="AIza…")

# OpenAI
result = mpc_core.compile("…", model="gpt-4o", api_key="sk-…")

# Kimi (Moonshot AI)
result = mpc_core.compile("…", model="moonshot-v1-32k", api_key="sk-…")

# Local Ollama (no key needed)
result = mpc_core.compile("…", model="llama3:8b")

print(result.energy_model.free_energy)      # F = -kT ln Z
print(result.ground_state.energy)           # Ising ground-state energy
print(result.ground_state.stable_ids)       # most compatible hypothesis subset
print(result.analytical_summary)

# Per-claim phase assignment
phases = mpc_core.read_claims(
    ["All ravens are black.", "Some ravens are albino."],
    api_key="sk-ant-…",
    model="claude-sonnet-4-6",
)

# Budget theorem (no API call)
est = mpc_core.budget_estimate(N=8, d_avg=2.5, epsilon_min=1.2)
print(est.interpretation)

# Multi-step trace with Entity Ledger
seq = mpc_core.compile_sequence(
    ["Step 1 text…", "Step 2 text…", "Step 3 text…"],
    api_key="sk-ant-…",
)

# Dynamic model listing
from mpc_core.providers import list_models, ProviderID
models = list_models(ProviderID.ANTHROPIC, "sk-ant-…")

# Free-energy surface (no API call)
from mpc_core.thermodynamics import free_energy_surface
surface = free_energy_surface(my_epsilon_matrix, T_range=(0.2,5), E_star_range=(2,40))
# surface["F"][T_index][E_star_index] → F value

Browser UI — tabs

TabDescription
Analyse textFull MPC analysis with hypothesis cards, thermodynamic strip (Z, F, S), ground-state box
Read claimsOne claim per line → instant phase assignment
3D Free EnergyInteractive Plotly F(T, E*) surface with N_max Theorem 6.1 contour
Energy landscapeAnimated 2-D canvas with budget/temperature sliders
Compatibility matrixPairwise ε_ij frustration table
Budget calculatorTheorem 6.1 N_max — no API key needed
Historical Heatmapη_i accumulation across a reasoning trace (Addendum V)
ProvidersAPI key configuration, per-provider status and model counts

HTTP API (localhost:7771)

MethodPathDescription
GET/Browser UI (index.html)
GET/modelsModel catalogue using env-var keys
POST/modelsRefresh catalogue with caller-supplied keys
GET/envWhich env vars are set (values redacted)
POST/statusProvider connectivity health check
POST/setenvPersist a key to .env
POST/MPC actions (compile, compile_sequence, read_claims, budget_estimate, free_energy_surface, ground_state)

Testing

# Arithmetic tests (no API key required)
pytest tests/ -v

# Live API tests — any provider combination
ANTHROPIC_API_KEY=sk-ant-…  pytest tests/ -v
GOOGLE_API_KEY=AIza…        pytest tests/ -v
OPENAI_API_KEY=sk-…         pytest tests/ -v
KIMI_API_KEY=sk-…           pytest tests/ -v

Architecture

mpc_core/
  providers.py     NEW v0.3 — ProviderID enum, per-provider key resolution,
                   dynamic model listing with TTL cache, all_models_catalogue()
  router.py        REWRITTEN — five-backend dispatch, retry logic, auth-error fast-fail
  compiler.py      compile() · read_claims() · budget_estimate() · compile_sequence()
  entity_ledger.py Cross-step entity registry (four-layer pipeline)
  thermodynamics.py QuTiP partition function · NetKet spin-glass · free_energy_surface()
  json_repair.py   Best-effort repair of truncated LLM JSON
  models.py        MPCResult dataclass hierarchy

mpc_server/
  server.py        REWRITTEN — FastMCP application + HTTP UI proxy (port 7771)
                   New endpoints: GET /env, POST /status, POST /models

static/
  index.html       REWRITTEN — provider selector tabs, per-provider key inputs,
                   dynamic model dropdowns, /status integration

Roadmap

  • v0.1 ✓ Core compiler, MCP server, reference UI
  • v0.2 ✓ Multi-backend routing · QuTiP · NetKet · 3D Plotly · Historical heatmap
  • v0.3 ✓ FastMCP · Five providers · Dynamic model listing · Provider UI · Retry logic
  • v0.4 Spectral Laplacian extension of Theorem 6.1, community-aware N_max bounds
  • v0.5 Streaming analysis; differential η_i display per hypothesis per step

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MPC — Metastable Propositional Calculus MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mpc-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent