Skip to main content

nodus-mcp

Model Context Protocol (MCP) library for Nodus — bidirectional client and server, implementing the 2026-07-28 RC specification.

Status: v0.1.0 — published on PyPI.


Authentication warning

v0.1 does not support OAuth 2.0. Only bearer-token authentication is implemented. Servers that require OAuth 2.0 / OIDC authentication (including many production MCP deployments) cannot be used with nodus-mcp v0.1. OAuth support is planned for v0.2.

To connect to a server with a bearer token:

from nodus_mcp import HttpTransport, McpClient

client = McpClient()
transport = HttpTransport("https://server/mcp", bearer_token="sk-...")
conn = client.connect(transport, alias="srv")

Installation

pip install nodus-mcp

# Development install (both repos checked out):
pip install -e . --no-deps
# Set PYTHONPATH to nodus-lang source:
# PYTHONPATH="path/to/nodus-lang/src" python ...

Quick start

Run an MCP server

# Spawned-child stdio mode (parent process connects to our stdin/stdout)
nodus-mcp serve --stdio

# HTTP mode
nodus-mcp serve --http --port 8080 --bearer-token my-api-key

To expose tools, use the Python API before serving:

from nodus_mcp import McpServer, HttpServerTransport

server = McpServer()
server.set_resource_list_handler(lambda: [
    {"uri": "file:///data", "name": "Data Directory"}
])

transport = HttpServerTransport("localhost", 8080)
transport.serve(server.dispatch)

Connect to a server

nodus-mcp connect http://localhost:8080 --bearer-token my-api-key

Interactive REPL:

Connected. Server: my-server 1.0. Tools: 3. Type 'help' for commands.
mcp> list
  my.tool — Does something useful
mcp> call my.tool {"x": 42}
{"content": [{"type": "text", "text": "done"}]}
mcp> quit

Use from a Nodus script

import "nodus-mcp"

// Discover and call tools (requires McpClient.connect() in host Python code)
let result = tool.invoke("mcp.srv.my_tool", {x: 42})

Entry-point contract

# nodus-mcp registers itself in the nodus.nd entry-point group:
# nodus-mcp = "nodus_mcp.nd:get_nd_root"
#
# After pip install nodus-mcp, any Nodus script can:
#   import "nodus-mcp"
# and get the adapter module without additional configuration.
# See docs/guide/library-entry-points.md in nodus-lang for the contract.

Deprecated features (Roots + Sampling)

nodus-mcp v0.1 includes Roots and Sampling despite their deprecation in the 2026-07-28 RC, because existing MCP servers in the ecosystem use them (real interop need) and the RC's 12-month deprecation window extends to at least 2027-07-28.

Do not remove Roots or Sampling before:

  1. The protocol has actually removed them, AND
  2. nodus-mcp has shipped a replacement

The removal gate is 2027-07-28 at the earliest. See docs/governance/TECH_DEBT.md (TD-001, TD-002) and docs/design/05-deprecated-features.md §C1.


Known limitations

Limitation Details
No OAuth support Bearer token only; see auth warning above
resources/subscribe not implemented Server-push deferred to v0.2
Server-initiated requests (HTTP) roots/list, sampling/createMessage, elicitation/create are stdio-only; HTTP has no push channel (TD-007)
Partial JSON Schema validation _validate_args checks required fields and primitive types; enum, pattern, minLength etc. are not enforced server-side (TD-008)
Resource handler KeyError convention Resource read handlers must raise KeyError(uri) for unknown URIs (TD-009)
requestState is on the wire Server-issued elicitation state travels to the client; never checkpoint secrets (TD-010)

Spec target

2026-07-28 RC — stateless (no session initialization handshake, no Mcp-Session-Id). Capabilities travel in _meta per-request. server/discover replaces capability exchange.

Release files for nodus-mcp 0.1.4

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

Source distribution (sdist)

Source distribution for nodus-mcp 0.1.4
File Size Uploaded
nodus_mcp-0.1.4.tar.gz 101.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nodus-mcp 0.1.4
File Interpreter ABI Platform
nodus_mcp-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 160.1 kB

Release files / nodus_mcp-0.1.4.tar.gz

Download URL nodus_mcp-0.1.4.tar.gz
Size 101.6 kB
Tags Source
SHA-256 checksum
How to use checksums
43d01f500c34e0d2f28576f09d47fc5ebc065e31d4557b5edc603745a5d69e9a
BLAKE2b-256 checksum
How to use checksums
7ba38d9f60f13b4b4fe6707dce65a29ceb6fe67b2c0fd7c4db6a9ade305331d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / nodus_mcp-0.1.4-py3-none-any.whl

Download URL nodus_mcp-0.1.4-py3-none-any.whl
Size 58.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc8a6e7f5239f532a1972d018a4c4196f24dc04043edc4abb1a1a1d43144e8b1
BLAKE2b-256 checksum
How to use checksums
678082ebf2124e409ea01d27b04c6fa1caadd63fdb5c446a04ef88825fbc530c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

0.1.5

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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