Python SDK for CircuitNotion MCP Server
Project description
CircuitNotion MCP SDK
Python SDK for the CircuitNotion MCP server.
Installation
pip install cn-mcp
For local development against a local MCP server:
export MCP_API_KEY="your-api-key"
export MCP_BASE_URL="http://localhost:8000"
Quick Start (tool_call only)
from cn_mcp import MCPClient
mcp = MCPClient(api_key="your-api-key")
session = mcp.tool_call("session_create")
session_id = session["session_id"]
try:
run = mcp.tool_call(
"terminal_exec",
session_id=session_id,
cmd="echo hello",
timeout_minutes=60,
)
print(run["stdout"])
zipped = mcp.tool_call("file_zip_session", session_id=session_id)
print(zipped["download_url"])
finally:
mcp.tool_call("session_dispose", session_id=session_id)
mcp.close()
Tool-Call Examples
Files
import base64
payload = base64.b64encode(b"hello").decode("utf-8")
written = mcp.tool_call(
"file_write",
session_id=session_id,
path="reports/out.txt",
content_base64=payload,
)
files = mcp.tool_call("file_list", session_id=session_id)
binary = mcp.tool_call("file_download", file_id=written["file_id"])
mcp.tool_call("file_delete", file_id=written["file_id"])
Devices
devices = mcp.tool_call("device_list")
result = mcp.tool_call("device_set_state", device_name="living room light", state="off")
Search
results = mcp.tool_call("web_search", query="CircuitNotion")
print(results.get("organic_results", []))
Scheduler
task = mcp.tool_call("time_schedule", payload={"message": "follow up"}, in_seconds=300)
tasks = mcp.tool_call("time_scheduled_tasks")
mcp.tool_call("time_cancel", task_id=task["task_id"])
Database
rows = mcp.tool_call(
"db_query",
session_id=session_id,
sql="SELECT name FROM sqlite_master WHERE type = ?",
params=["table"],
)
mcp.tool_call(
"db_execute",
session_id=session_id,
sql="INSERT INTO notes (body) VALUES (?)",
params=["hello"],
)
Timeout Note
The SDK defaults to an agent-friendly HTTP timeout and automatically extends
timeout behavior for long-running tools such as terminal_exec.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cn_mcp-0.3.7.tar.gz.
File metadata
- Download URL: cn_mcp-0.3.7.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ad623b01a734d4c1132e819981e4d1c15b2ff05a9e84e917f40fe30850eec0e
|
|
| MD5 |
4fcea94e824186ad538353288d470a35
|
|
| BLAKE2b-256 |
02a902d476c9327d3192c16d7f54ddc57d71275dd2af2f9f077bfd3021e0176b
|
Provenance
The following attestation bundles were made for cn_mcp-0.3.7.tar.gz:
Publisher:
pypi-publish.yml on ntirushwajeanmarc/cn-mcp-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cn_mcp-0.3.7.tar.gz -
Subject digest:
2ad623b01a734d4c1132e819981e4d1c15b2ff05a9e84e917f40fe30850eec0e - Sigstore transparency entry: 1338644842
- Sigstore integration time:
-
Permalink:
ntirushwajeanmarc/cn-mcp-sdk@4ef4c1a7cae3fb08f17fe805d41da8c96edc1995 -
Branch / Tag:
refs/tags/v0.3.7 - Owner: https://github.com/ntirushwajeanmarc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@4ef4c1a7cae3fb08f17fe805d41da8c96edc1995 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cn_mcp-0.3.7-py3-none-any.whl.
File metadata
- Download URL: cn_mcp-0.3.7-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9919d2a24696f00159d7c89e6608c584586c709702ae769d893ec1d4ef5a05e2
|
|
| MD5 |
fa1348a9c3d32191ba11ac2e4a0f3fdf
|
|
| BLAKE2b-256 |
68b5f692548f648d0c3b2156e59e8badb7f385fde0bd573877cd38c3dd19e0b1
|
Provenance
The following attestation bundles were made for cn_mcp-0.3.7-py3-none-any.whl:
Publisher:
pypi-publish.yml on ntirushwajeanmarc/cn-mcp-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cn_mcp-0.3.7-py3-none-any.whl -
Subject digest:
9919d2a24696f00159d7c89e6608c584586c709702ae769d893ec1d4ef5a05e2 - Sigstore transparency entry: 1338644849
- Sigstore integration time:
-
Permalink:
ntirushwajeanmarc/cn-mcp-sdk@4ef4c1a7cae3fb08f17fe805d41da8c96edc1995 -
Branch / Tag:
refs/tags/v0.3.7 - Owner: https://github.com/ntirushwajeanmarc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@4ef4c1a7cae3fb08f17fe805d41da8c96edc1995 -
Trigger Event:
push
-
Statement type: