BLE MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BLE_MCP_TRACE | No | JSONL tracing of every tool call. Set to '0', 'false', or 'no' to disable. | enabled |
| BLE_MCP_PLUGINS | No | Plugin policy: 'all' to allow all, or 'name1,name2' to allow specific plugins. | disabled |
| BLE_MCP_LOG_LEVEL | No | Python log level (DEBUG, INFO, WARNING, ERROR). | WARNING |
| BLE_MCP_MAX_SCANS | No | Maximum active scans per session. | 5 |
| BLE_MCP_AUTH_TOKEN | No | Password for OAuth approval page on HTTP transports. | |
| BLE_MCP_ALLOW_WRITES | No | Set to 'true', '1', or 'yes' to enable ble.write. | disabled |
| BLE_MCP_MAX_SESSIONS | No | Maximum concurrent MCP sessions (only for SSE and Streamable HTTP). | 1 |
| BLE_MCP_TOOL_SEPARATOR | No | Character used to separate tool name segments. | _ |
| BLE_MCP_TRACE_PAYLOADS | No | Include value_b64/value_hex in traced args (stripped by default). | disabled |
| BLE_MCP_MAX_CONNECTIONS | No | Maximum active BLE connections per session. | 3 |
| BLE_MCP_TRACE_MAX_BYTES | No | Max payload chars before truncation. | 16384 |
| BLE_MCP_WRITE_ALLOWLIST | No | Comma-separated UUID allowlist for writable characteristics. | |
| BLE_MCP_MAX_SUBSCRIPTIONS_PER_CONN | No | Maximum notification subscriptions per connection. | 10 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ble_scan_startA | Start a background BLE scan. Returns a scan_id immediately. The scan runs in the background for up to timeout_s seconds. Use ble.scan_get_results to check discovered devices and ble.scan_stop to end the scan early. |
| ble_scan_get_resultsA | Non-blocking: return the devices discovered so far by a running (or finished) scan. Also returns whether the scan is still active. Call this to check progress or to decide whether to stop early. |
| ble_scan_stopA | Stop a running scan early and return the final list of discovered devices. Safe to call on an already-finished scan. |
| ble_connectA | Connect to a BLE peripheral by address. Returns a connection_id, device identity (device_name, service_uuids from scan cache), and spec status (null if none attached). After connecting: 1) Use ble.spec.list to check for a matching protocol spec by device name or service UUIDs. If a match is found, attach it with ble.spec.attach. If no match, ask the user if they have a protocol spec for this device. 2) Use ble.plugin.list to check for a plugin whose name matches the device. If a matching plugin is loaded, its tools are available to use directly. |
| ble_disconnectB | Disconnect a BLE peripheral by connection_id. |
| ble_connection_statusA | Check whether a connection is still alive. Returns connected (bool), address, and disconnect_ts if the device disconnected unexpectedly. Use this to verify a connection before a sequence of operations. |
| ble_discoverB | Discover services and characteristics on a connected device. Results are cached per connection. |
| ble_mtuA | Return the negotiated MTU (Maximum Transmission Unit) for a connection. The effective max write payload per packet is mtu - 3 bytes (ATT header). Useful for determining chunk sizes for large writes. |
| ble_readC | Read the value of a GATT characteristic. |
| ble_writeA | Write a value to a GATT characteristic. Requires BLE_MCP_ALLOW_WRITES=true at server startup. Provide value as base64 (value_b64) or hex (value_hex). |
| ble_read_descriptorA | Read a GATT descriptor by handle. Use ble.discover to find descriptor handles. Descriptors provide metadata about characteristics (e.g. CCCD, user description). |
| ble_write_descriptorA | Write to a GATT descriptor by handle. Requires BLE_MCP_ALLOW_WRITES=true. Rarely needed directly — bleak handles CCCD for notify/indicate automatically. |
| ble_subscribeC | Subscribe to notifications/indications on a characteristic. |
| ble_unsubscribeC | Unsubscribe from a previously created subscription. |
| ble_wait_notificationA | Block until the next single notification arrives on a subscription, or timeout. For bursty / bulk flows (e.g. downloading a dataset or log file) prefer ble.drain_notifications instead. |
| ble_poll_notificationsA | Non-blocking: return up to max_items buffered notifications immediately. Returns an empty list if the queue is empty. Also returns a dropped counter showing how many notifications were lost to queue overflow since subscription start. |
| ble_drain_notificationsA | Batch-collect notifications: waits up to timeout_s for the first notification, then keeps collecting until idle_timeout_s passes with no new data, max_items is reached, or the total timeout_s expires. Ideal for bursty flows like downloading a log file or dataset over BLE notifications. |
| ble_connections_listA | List all tracked connections with their status, address, name, timestamps, and subscription count. Useful for recovering connection IDs after context loss. |
| ble_subscriptions_listA | List all active subscriptions with their status, queue depth, and dropped count. Optionally filter by connection_id. Useful for recovering subscription IDs. |
| ble_scans_listA | List all tracked scans with their status, filters, timestamps, and device count. Useful for recovering scan IDs after context loss. |
| ble_tasks_listA | List all registered background tasks (from plugins) with their status. Shows task_id, name, running/stopped, start time, and any error. |
| ble_tasks_cancelB | Cancel a running background task by task_id. |
| ble_spec_templateA | Return a markdown template for a new BLE protocol spec. Optionally pre-fill with a device name. |
| ble_spec_registerA | Register a spec file in the index. Validates YAML front-matter (requires kind: ble-protocol and name). The file path can be absolute or relative to CWD. |
| ble_spec_listA | List all registered specs with their metadata and matching hints. |
| ble_spec_attachA | Attach a registered spec to a connection session (in-memory only). The spec will be available via ble.spec.get for the duration of this connection. After attaching, check ble.plugin.list for a matching plugin, then present the user with their options: interact with the device using the spec (read/write characteristics, execute flows), use plugin shortcut tools if a plugin is loaded, extend an existing plugin with new tools, or create a new plugin using ble.plugin.template. |
| ble_spec_getA | Get the attached spec for a connection (returns null if none attached). |
| ble_spec_readC | Read full spec content, file path, and metadata by spec_id. |
| ble_spec_searchA | Full-text search over a spec's content. Returns matching snippets with line numbers and surrounding context. |
| ble_trace_statusB | Return tracing config and event count. |
| ble_trace_tailC | Return last N trace events (default 50). |
| ble_plugin_listA | List loaded plugins with their tool names and metadata. Each plugin may include a 'meta' dict with matching hints like service_uuids, device_name_contains, or description — use these to determine which plugin fits the connected device. Also returns whether plugins are enabled and the current policy. Plugins require BLE_MCP_PLUGINS env var — set to 'all' for all or 'name1,name2' to allow specific plugins. If disabled, tell the user to set this variable when adding the MCP server. |
| ble_plugin_reloadA | Hot-reload a plugin by name. Re-imports the module and refreshes tools. Requires BLE_MCP_PLUGINS env var to be set. |
| ble_plugin_templateA | Return a Python plugin template. Use this when creating a new plugin. Optionally pre-fill with a device name. Save the result to .ble_mcp/plugins/.py, fill in the tools and handlers, then load with ble.plugin.load. |
| ble_plugin_loadB | Load a new plugin from a file or directory path. Requires BLE_MCP_PLUGINS env var to be set. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/es617/ble-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server