CMSIS-MCP  Version 0.0.0
Embedded MCP server with serial transport
 
Loading...
Searching...
No Matches
C MCP server

Register tools and optional read-only resources, then serve JSON-RPC requests. More...

Content

 Argument types and protocol errors
 Discovery schema types, opaque handles and protocol error constants.
 
 Tool registration and callbacks
 Describe tools for clients and bind validated inputs to callbacks.
 
 Read-only virtual resources
 Expose virtual text through resources/list and resources/read.
 
 Startup and request memory
 Prepare persistent metadata and manage bounded request storage.
 
 Request dispatch and transport
 Serve complete JSON-RPC messages with synchronous response delivery.
 
 Memory and index diagnostics
 Read counters without allocating memory.
 
 Portable serial transport
 Serial I/O with stdio defaults and weak functions on CMSIS boards.
 

Description

Register tools and optional read-only resources, then serve JSON-RPC requests.

Application sequence

Startup metadata uses the heap. Request parsing, callback output and serialization share the bounded arena configured by C_MCP_ARENA_SIZE. Reset occurs after the synchronous sender returns. Resource support is controlled by C_MCP_ENABLE_VFS. Registration strings must remain valid and unchanged until free_tools().

Warning
Dispatch is single-threaded and non-reentrant. cJSON allocation hooks are process-wide: do not replace them or use cJSON concurrently with dispatch.