1. Conduid
  2. Developer Tools
  3. Adafruit Circuitpython Mcp3xxx
MCP server · Developer Tools

Adafruit Circuitpython Mcp3xxx

CircuitPython library for MCP300x SPI ADC's, may later support MCP320x as well

Unclaimed MIT hacktoberfestdevtools
58Fair

Scored 15 hours ago · breakdown

About Adafruit Circuitpython Mcp3xxx

Adafruit Circuitpython Mcp3xxx is an MCP server published by adafruit in the Developer Tools category: circuitPython library for MCP300x SPI ADC's, may later support MCP320x as well.

The repository has 42 stars and 21 forks, with the last commit 5 months ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Adafruit Circuitpython Mcp3xxx

Powered by Claude · Grounded in docs

I know everything about Adafruit Circuitpython Mcp3xxx. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 15 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • !Dependencies pinnedNo lockfile. Installs can pull different code over time.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

1.5.21.5.2 - Update Ruff Version · 23 Apr 2026Full Changelog: https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/compare/1.5.1...1.5.2
1.5.11.5.1 - License syntax and pre-commit versions · 27 Mar 2026Full Changelog: https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/compare/1.5.0...1.5.1
1.5.01.5.0 - 12 bit & Support for MCP3202, 3204, and 2308 · 7 Jan 2026What's Changed MCP32xx (12 bit) ADC support and optional baudrate parameter for SPI comms by @kevinjwalters in https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/pull/47 New Contributors @kevinjwalters made their first contribution…
1.4.221.4.22 - Update Ruff Config & RTD Style Fix · 20 Oct 2025Full Changelog: https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/compare/1.4.21...1.4.22
1.4.211.4.21 - Update RTD Config · 17 Jun 2025Full Changelog: https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/compare/1.4.20...1.4.21

README

Introduction

.. image:: https://readthedocs.org/projects/adafruit-circuitpython-mcp3xxx/badge/?version=latest :target: https://docs.circuitpython.org/projects/mcp3xxx/en/latest/ :alt: Documentation Status

.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg :target: https://adafru.it/discord :alt: Discord

.. image:: https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/workflows/Build%20CI/badge.svg :target: https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx/actions/ :alt: Build Status

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Code Style: Ruff

CircuitPython library for the MCP3xxx series of analog-to-digital converters.

Currently supports:

  • MCP3008: 8-Channel 10-Bit ADC With SPI Interface <https://www.adafruit.com/product/856>_

Dependencies

This driver depends on:

  • Adafruit CircuitPython <https://github.com/adafruit/circuitpython>_
  • Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>_

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>_.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI <https://pypi.org/project/adafruit-circuitpython-mcp3xxx/>_. To install for current user:

.. code-block:: shell

pip3 install adafruit-circuitpython-mcp3xxx

To install system-wide (this may be required in some cases):

.. code-block:: shell

sudo pip3 install adafruit-circuitpython-mcp3xxx

To install in a virtual environment in your current project:

.. code-block:: shell

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-mcp3xxx

Usage Example

MCP3008 Single Ended

.. code-block:: python

import busio
import digitalio
import board
import adafruit_mcp3xxx.mcp3008 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn

# create the spi bus
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)

# create the cs (chip select)
cs = digitalio.DigitalInOut(board.D5)

# create the mcp object
mcp = MCP.MCP3008(spi, cs)

# create an analog input channel on pin 0
chan = AnalogIn(mcp, MCP.P0)

print('Raw ADC Value: ', chan.value)
print('ADC Voltage: ' + str(chan.voltage) + 'V')

MCP3008 Differential

.. code-block:: python

import busio
import digitalio
import board
import adafruit_mcp3xxx.mcp3008 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn

# create the spi bus
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)

# create the cs (chip select)
cs = digitalio.DigitalInOut(board.D5)

# create the mcp object
mcp = MCP.MCP3008(spi, cs)

# create a differential ADC channel between Pin 0 and Pin 1
chan = AnalogIn(mcp, MCP.P0, MCP.P1)

print('Differential ADC Value: ', chan.value)
print('Differential ADC Voltage: ' + str(chan.voltage) + 'V')

MCP3004 Single-Ended

.. code-block:: python

import busio
import digitalio
import board
import adafruit_mcp3xxx.mcp3004 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn

# create the spi bus
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)

# create the cs (chip select)
cs = digitalio.DigitalInOut(board.D5)

# create the mcp object
mcp = MCP.MCP3004(spi, cs)

# create an analog input channel on pin 0
chan = AnalogIn(mcp, MCP.P0)

print('Raw ADC Value: ', chan.value)
print('ADC Voltage: ' + str(chan.voltage) + 'V')

MCP3004 Differential

.. code-block:: python

import busio
import digitalio
import board
import adafruit_mcp3xxx.mcp3004 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn

# create the spi bus
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)

# create the cs (chip select)
cs = digitalio.DigitalInOut(board.D5)

# create the mcp object
mcp = MCP.MCP3004(spi, cs)

# create a differential ADC channel between Pin 0 and Pin 1
chan = AnalogIn(mcp, MCP.P0, MCP.P1)

print('Differential ADC Value: ', chan.value)
print('Differential ADC Voltage: ' + str(chan.voltage) + 'V')

Documentation

API documentation for this library can be found on Read the Docs <https://docs.circuitpython.org/projects/mcp3xxx/en/latest/>_.

For information on building library documentation, please check out this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>_.

Contributing

Contributions are welcome! Please read our Code of Conduct <https://github.com/adafruit/adafruit_CircuitPython_MCP3xxx/blob/main/CODE_OF_CONDUCT.md>_ before contributing to help this project stay welcoming.

README fetched from the repository 15 hours ago. The original is authoritative.

Questions

About Adafruit Circuitpython Mcp3xxx

How do I install Adafruit Circuitpython Mcp3xxx?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Adafruit Circuitpython Mcp3xxx safe to use with an AI agent?

Its trust score is 58 out of 100 (fair). It passes 3 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Adafruit Circuitpython Mcp3xxx still maintained?

Yes — the latest release is 1.5.2 (23 Apr 2026), and the last commit was 5 months ago. The repository has 42 stars and 5 open issues.