AWS IoT Core

io.github.nagarjunr由 GitHub 帳號 nagarjunr 發布v0.1.0更新於 Oct 24, 2026

MCP server for AWS IoT Core: device registry, shadows, jobs, rules, messaging.

發布方自己的服務:core.blue

概覽

AI 產生的概覽

針對 AWS IoT Core 的本地 MCP 伺服器,讓助理在 AWS 帳戶中管理裝置、影子、任務、憑證、政策與規則。

可以做什麼
列出、搜尋、建立、更新與刪除事物(裝置)、事物類型與事物群組,包含群組成員關係與機群索引查詢(搜尋需先啟用索引)。讀取、更新與刪除傳統或具名裝置影子,並列出某個事物的具名影子。透過 IoT 資料平面向裝置機群發布 MQTT 訊息。建立、列出、取消與刪除機群任務,並追蹤每台裝置的任務執行狀態。管理裝置驗證:產生金鑰對與憑證、設定憑證狀態,以及建立、附加與刪除 IoT 政策。列出、建立、啟用、停用與刪除以 SQL 為基礎的主題規則,並查詢帳戶的 IoT 資料端點。
適用情境
適合需要在本地工作階段中檢視或操作 AWS IoT Core 機群的情況,例如稽核已註冊裝置、讀取或更新影子狀態、推送 OTA 或遠端命令任務、檢視訊息路由規則。它僅涵蓋 IoT Core,不含 Greengrass、SiteWise、Device Defender 或 TwinMaker。
執行需求
以 Python 套件形式透過 uvx 在本地執行(stdio)。需要 AWS 憑證,使用標準 SDK 憑證鏈:AWS_ACCESS_KEY_ID、AWS_SECRET_ACCESS_KEY,可選 AWS_SESSION_TOKEN,或使用 AWS_PROFILE,或掛載的 IAM 角色。必須提供 AWS_REGION,因為 IoT Core 依區域劃分;可用 AWS_ENDPOINT_URL 覆寫端點。需要連線至 AWS 的網路。
安裝前請注意
它會以所提供憑證的權限操作真實 AWS 帳戶,應盡量縮小權限範圍。許多工具會寫入或刪除:事物、群組、影子、任務、憑證、政策與規則的建立/更新/刪除,以及向裝置發布 MQTT 訊息。刪除不可逆且需要 confirm=True;create/put 的覆寫檢查僅為盡力而為,並非無競態。create_keys_and_certificate 只回傳一次私密金鑰。憑證從環境變數或設定檔讀取。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 AWS IoT Core,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

AWS IoT Core MCP Server

A Model Context Protocol (MCP) server for AWS IoT Core — device registry, device shadows, jobs (fleet management), the rules engine, and messaging.

Scoped deliberately to IoT Core itself: no Greengrass (separate edge-deployment API), no IoT SiteWise (already has an official awslabs MCP server), no Device Defender/Events/TwinMaker — each of those is its own AWS service with its own API and would be its own connector.

Built with FastMCP and boto3.

Tools

Things (device registry)

ToolDescription
list_things(thing_type_name, attribute_name, attribute_value, thing_group_name, max_results)List things, optionally filtered.
search_things(query_string, index_name, max_results)Fleet-indexing search, e.g. attributes.location:"lab-1". Requires indexing to be enabled.
get_thing(thing_name)Fetch a thing's attributes and type.
create_thing(thing_name, thing_type_name, attributes, billing_group_name, overwrite=False)Register a new thing.
update_thing(thing_name, attributes, thing_type_name, remove_thing_type, attributes_merge=True)Update a thing's attributes/type.
delete_thing(thing_name, confirm=False)Delete a thing. Irreversible.

Thing Types & Thing Groups

ToolDescription
list_thing_types(thing_type_name) / get_thing_type(thing_type_name)List/read thing types.
create_thing_type(thing_type_name, description, searchable_attributes)Create a thing type. Immutable once created (AWS limitation) — only deprecation is supported after.
deprecate_thing_type(thing_type_name, undo=False)Deprecate (or un-deprecate) a thing type.
list_thing_groups(parent_group, name_prefix_filter) / get_thing_group(thing_group_name)List/read thing groups.
create_thing_group(thing_group_name, parent_group_name, attributes, overwrite=False)Create a thing group.
delete_thing_group(thing_group_name, confirm=False)Delete a thing group. Irreversible.
modify_thing_group_membership(thing_name, thing_group_name, action)action="add" or "remove" a thing from a group.
list_things_in_thing_group(thing_group_name)List members of a group.

Device Shadows (data plane)

ToolDescription
get_thing_shadow(thing_name, shadow_name)Read a thing's shadow document (desired/reported/delta). Omit shadow_name for the classic (unnamed) shadow.
update_thing_shadow(thing_name, desired, reported, shadow_name)Merge-update desired and/or reported state.
delete_thing_shadow(thing_name, shadow_name, confirm=False)Delete a shadow document.
list_named_shadows_for_thing(thing_name)List named (non-classic) shadows for a thing.

Messaging

ToolDescription
publish_message(topic, payload, qos=0)Publish an MQTT message to the device fleet via the IoT Data Plane.

Jobs (fleet management)

ToolDescription
list_jobs(status, thing_group_name, max_results) / get_job(job_id)List/read jobs.
create_job(job_id, thing_arns, document, description, target_selection="SNAPSHOT")Create a fleet job (e.g. an OTA update or remote command).
cancel_job(job_id, confirm=False, comment, force=False)Cancel a job.
delete_job(job_id, confirm=False, force=False)Delete a job. Irreversible.
list_job_executions_for_job(job_id, status) / list_job_executions_for_thing(thing_name, status)Track per-device execution status.

Certificates & Policies (device auth)

ToolDescription
create_keys_and_certificate(set_as_active=True)Generate a new key pair + certificate. The private key is returned only once — capture it immediately.
get_certificate(certificate_id) / list_certificates(page_size)Read certificate metadata.
set_certificate_status(certificate_id, status)ACTIVE, INACTIVE, or REVOKED.
delete_certificate(certificate_id, confirm=False, force_delete=False)Delete a certificate. Irreversible.
create_policy(policy_name, policy_document, overwrite=False) / get_policy / list_policiesManage IAM-style IoT policies (JSON documents).
delete_policy(policy_name, confirm=False)Delete a policy. Irreversible.
modify_policy_attachment(policy_name, target, action)Attach/detach a policy to/from a certificate ARN.
modify_thing_principal(thing_name, principal, action)Attach/detach a certificate (principal) to/from a thing.
list_thing_principals(thing_name) / list_principal_things(principal)Look up thing↔certificate associations either direction.

Rules Engine

ToolDescription
list_topic_rules(topic) / get_topic_rule(rule_name)List/read SQL-based message routing rules.
put_topic_rule(rule_name, sql, actions, description, sql_version, overwrite=False)Create or replace a rule. actions is a list of raw AWS action objects (e.g. {"lambda": {"functionArn": "..."}}).
set_topic_rule_enabled(rule_name, enabled)Enable/disable a rule without deleting it.
delete_topic_rule(rule_name, confirm=False)Delete a rule. Irreversible.

Misc

ToolDescription
get_endpoint(endpoint_type)Look up this account's IoT Core data endpoint (default iot:Data-ATS).

Safety conventions

Same as the rest of this repo: create_*/put_* default to overwrite=False (best-effort — the AWS IoT API itself has no conditional-write header for most of these operations, so this is a describe-then-create check, not fully race-free like Ditto's If-None-Match). Every delete_*/cancel_* requires confirm=True.

Configuration

Standard AWS SDK credential resolution — no custom env vars for auth. Set whichever of these your setup uses:

Env varDescription
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKENExplicit credentials.
AWS_PROFILENamed profile from ~/.aws/credentials.
AWS_REGION / AWS_DEFAULT_REGIONRequired — AWS IoT Core is regional.
AWS_ENDPOINT_URLOverride the API endpoint (e.g. for LocalStack). boto3 reads this natively.

Or an IAM role, if running somewhere with one attached (EC2/ECS/Lambda). See boto3's credential docs.

Running locally

bash
uv syncexport AWS_REGION=us-east-1# plus whichever credential env vars apply to youuv run awsiotcoremcpserver.py

See mcp.json for ready-to-use client configs (stdio and Docker).

Testing

This repo's design principles call for testing against a real instance rather than mocks. AWS IoT Core has no official local emulator, and LocalStack's IoT support requires a paid plan (no free tier) — so this server is the one exception in this repo: tests run against moto, a mature, free, open-source AWS API emulator (not hand-rolled mocks — it implements real request/response behavior for the actual boto3 calls this server makes).

bash
uv run pytest -v

License notes

No bundled deployment artifacts here (unlike the other servers) since there's no local broker/service to run — AWS IoT Core only exists as an AWS-hosted service.

來源:aws-iot-core/README.md,提交 5a985b6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Core 整合