Skip to main content

Peircean Abduction

A Logic Harness for Abductive Inference.

"Abduction is the process of forming an explanatory hypothesis. It is the only logical operation which introduces any new idea." — Charles Sanders Peirce

Peircean Abduction is a Model Context Protocol (MCP) server that gives LLMs the ability to perform rigorous abductive reasoning. It forces models to generate multiple competing hypotheses for an observation and evaluate them using Inference to the Best Explanation (IBE).

✨ Features

  • MCP-First Design: Built to be used directly within Claude Desktop, Cursor, or any MCP-compliant client.
  • Provider Agnostic: Works with Anthropic, OpenAI, Gemini, and Ollama.
  • No API Key Required (Default): By default, it generates prompts for you to run. You only need an API key if you want the tool to execute the reasoning loop autonomously.
  • Council of Critics: Simulates a debate between a Logician, Empiricist, and Scientist to refine hypotheses.

🚀 Quick Start

1. Install

pip install peircean-abduction

2. Connect to Claude Desktop

Run the installer to automatically configure Claude Desktop:

peircean --install

3. Use it!

Open Claude and ask:

"Use the peircean_observe_anomaly tool to analyze why my server latency spiked but CPU usage is flat."

🛠️ Configuration

You can configure the provider and other settings via the interactive wizard:

peircean config wizard

Or by setting environment variables in a .env file:

# Provider Selection
PEIRCEAN_PROVIDER=anthropic  # anthropic, openai, gemini, ollama
PEIRCEAN_MODEL=claude-3-5-sonnet-20241022

# API Keys (Only needed for interactive/autonomous mode)
ANTHROPIC_API_KEY=sk-...
OPENAI_API_KEY=sk-...

# Feature Toggles
PEIRCEAN_ENABLE_COUNCIL=true
PEIRCEAN_INTERACTIVE_MODE=false # Set to true to let the tool call the LLM directly

📦 Supported Models

  • Anthropic: Claude 3.5 Sonnet (Recommended), Claude 3 Opus, Claude 3 Haiku
  • OpenAI: GPT-4o, GPT-4 Turbo
  • Gemini: Gemini 1.5 Pro
  • Ollama: Llama 3, Mistral

📚 Documentation

📄 License

MIT

Metadata

Release files for peircean-abduction 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peircean-abduction 1.2.3
File Size Uploaded
peircean_abduction-1.2.3.tar.gz 123.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peircean-abduction 1.2.3
File Interpreter ABI Platform
peircean_abduction-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 195.0 kB

Release files / peircean_abduction-1.2.3.tar.gz

Download URL peircean_abduction-1.2.3.tar.gz
Size 123.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9bb5b393afb157c92f0cd415ebab783ddc1fbbb51b3ba8abbc3dcf4ef7b2f251
BLAKE2b-256 checksum
How to use checksums
6743188778dc29612a2e36a22d33f80d41a13b00e5c71a7995bcc775921defb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.

Transparency log

Release files / peircean_abduction-1.2.3-py3-none-any.whl

Download URL peircean_abduction-1.2.3-py3-none-any.whl
Size 71.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
134d991570d274c8efb55e3d602e23248d98c347bba280aaf6b401c215c7c682
BLAKE2b-256 checksum
How to use checksums
05d88686e2257cb66090c3befd7d3ce3d897fc7b9ec2807aec6abe951804f5ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page