ak-mcp
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_ak_docsA | Full-text search across AK concepts, guides, guardrails, and API entries. Returns ranked results with resource URIs. |
| get_ak_apiA | Exact signature, parameters, return value, semantics, examples, and FATAL codes for an AK kernel function, macro, or type (e.g. 'timer_set', 'task_post_pure_msg'). |
| list_ak_apiA | List AK kernel API symbols, optionally filtered by module (task, message, timer, fsm, tsm, ak, port), each with a one-line summary. |
| get_ak_guideA | Step-by-step recipe (with skeleton code, Makefile.mk steps, and wiring) for a common AK task. Topics: agent-workflow, create-driver, create-screen, create-task, debug-uart-shell, isr-bridge, kernel-task-log, start-project, tune-pools, use-timer. |
| get_ak_guardrailsA | The rules every AK contribution must follow: which directories are off-limits (kernel, boot, networks, common) and the kernel invariants (no blocking, fixed pools, 64-byte payload, max 7 refs, priority 0 reserved). Consult before generating code. |
| start_ak_projectA | Begin a new firmware project from the AK base kit. Resolves the LATEST ak-base-kit-stm32l151 release (or a given tag) and returns the exact commands to download, extract, and lay out the project, plus the steps to customize it. Call this when an engineer wants to start/create/bootstrap a new AK-based project. |
| analyze_ak_logA | Paste raw UART console output from an AK board (boot logs, -SIG-> traces, FATAL banners, |
| decode_ak_lcdA | See the board's OLED screen headlessly: paste the raw output of the shell command |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| ak-new-task | Scaffold a new AK task following kernel conventions and guardrails. |
| ak-new-driver | Scaffold a new hardware-agnostic AK driver using function-pointer injection. |
| ak-new-project | Download the latest ak-base-kit-stm32l151 release and customize it for the engineer. |
| ak-debug | Guided debugging: capture the UART console, drive the shell, and diagnose with analyze_ak_log. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| ak-index | List of every AK concept, guide, guardrail, and API resource. |
| AK_VERSION | #define AK_VERSION "1.3" |
| AK_ENABLE | #define AK_ENABLE (0x01) |
| AK_DISABLE | #define AK_DISABLE (0x00) |
| AK_FLAG_ON | #define AK_FLAG_ON (0x01) |
| AK_FLAG_OFF | #define AK_FLAG_OFF (0x00) |
| AK_RET_OK | #define AK_RET_OK (0x01) |
| AK_RET_NG | #define AK_RET_NG (0x00) |
| AK_SYS_DEFINE_SIG | #define AK_SYS_DEFINE_SIG (0) |
| AK_USER_DEFINE_SIG | #define AK_USER_DEFINE_SIG (10) |
| TASK_PRI_MAX_SIZE | #define TASK_PRI_MAX_SIZE (8) |
| TASK_PRI_LEVEL_0 | #define TASK_PRI_LEVEL_0 (0) |
| TASK_PRI_LEVEL_1 | #define TASK_PRI_LEVEL_1 (1) |
| TASK_PRI_LEVEL_2 | #define TASK_PRI_LEVEL_2 (2) |
| TASK_PRI_LEVEL_3 | #define TASK_PRI_LEVEL_3 (3) |
| TASK_PRI_LEVEL_4 | #define TASK_PRI_LEVEL_4 (4) |
| TASK_PRI_LEVEL_5 | #define TASK_PRI_LEVEL_5 (5) |
| TASK_PRI_LEVEL_6 | #define TASK_PRI_LEVEL_6 (6) |
| TASK_PRI_LEVEL_7 | #define TASK_PRI_LEVEL_7 (7) |
| AK_TASK_INTERRUPT_ID | #define AK_TASK_INTERRUPT_ID (0xEE) |
| AK_TASK_IDLE_ID | #define AK_TASK_IDLE_ID (0xEF) |
| LOG_QUEUE_OBJECT_SIZE | #define LOG_QUEUE_OBJECT_SIZE (512) |
| LOG_QUEUE_IRQ_SIZE | #define LOG_QUEUE_IRQ_SIZE (128) |
| task_pri_t | typedef uint8_t task_pri_t |
| task_id_t | typedef uint8_t task_id_t |
| pf_task | typedef void (*pf_task)(ak_msg_t*) |
| pf_task_polling | typedef void (*pf_task_polling)() |
| task_t | typedef struct { task_id_t id; task_pri_t pri; pf_task task; } task_t |
| task_polling_t | typedef struct { task_id_t id; uint8_t ability; pf_task_polling task_polling; } task_polling_t |
| exception_info_t | typedef struct { uint32_t except_number; uint32_t timestamp; } exception_info_t |
| task_create | Register the application's task table; must be terminated by an AK_TASK_EOT_ID sentinel row. |
| task_post | Low-level primitive to enqueue a message you built by hand to a task; the kernel owns and frees it afterwards. |
| task_post_pure_msg | Post a signal-only message (no payload) to a task - the cheapest and most common way to trigger a task. |
| task_post_common_msg | Post a message with a small inline payload (≤ 64 B) copied into a common-pool message. |
| task_post_dynamic_msg | Post a message with a variable/large heap-allocated payload; avoid in ISRs. |
| task_remove_msg | uint8_t task_remove_msg(task_id_t task_id, uint8_t sig) |
| task_init | int task_init() |
| task_run | Enter the kernel's infinite scheduler loop; dispatches ready messages then polling tasks. Never returns. |
| task_polling_create | void task_polling_create(task_polling_t* task_polling_tbl) |
| task_polling_set_ability | Enable or disable a polling task at runtime. |
| task_polling_run | void task_polling_run() |
| task_entry_interrupt | Call first in any ISR that touches the kernel; pairs with task_exit_interrupt to bracket the handler. |
| task_exit_interrupt | void task_exit_interrupt() |
| task_self | task_id_t task_self() |
| get_current_task_id | task_id_t get_current_task_id() |
| get_current_task_info | task_t* get_current_task_info() |
| get_current_active_object | ak_msg_t* get_current_active_object() |
| task_irq_io_entry_trigger | void task_irq_io_entry_trigger() |
| task_irq_io_exit_trigger | void task_irq_io_exit_trigger() |
| task_pri_queue_dump | void task_pri_queue_dump() |
| AK_MSG_NULL | #define AK_MSG_NULL ((ak_msg_t*)0) |
| AK_MSG_NG | #define AK_MSG_NG (0) |
| AK_MSG_OK | #define AK_MSG_OK (1) |
| AK_COMMON_MSG_POOL_SIZE | #define AK_COMMON_MSG_POOL_SIZE (8) |
| AK_COMMON_MSG_DATA_SIZE | #define AK_COMMON_MSG_DATA_SIZE (64) |
| AK_PURE_MSG_POOL_SIZE | #define AK_PURE_MSG_POOL_SIZE (32) |
| AK_DYNAMIC_MSG_POOL_SIZE | #define AK_DYNAMIC_MSG_POOL_SIZE (8) |
| AK_DYNAMIC_DATA_POOL_SIZE | #define AK_DYNAMIC_DATA_POOL_SIZE (128) |
| AK_DYNAMIC_PDU_SIZE | #define AK_DYNAMIC_PDU_SIZE (4) |
| AK_MSG_TYPE_MASK | #define AK_MSG_TYPE_MASK (0xC0) |
| AK_MSG_REF_COUNT_MASK | #define AK_MSG_REF_COUNT_MASK (0x3F) |
| AK_MSG_REF_COUNT_MAX | #define AK_MSG_REF_COUNT_MAX (7) |
| get_msg_ref_count | #define get_msg_ref_count(x) ((((ak_msg_t*)x)->ref_count) & AK_MSG_REF_COUNT_MASK) |
| reset_msg_ref_count | #define reset_msg_ref_count(x) ((((ak_msg_t*)x)->ref_count) = (((ak_msg_t*)x)->ref_count) & (~AK_MSG_REF_COUNT_MASK)) |
| get_msg_type | #define get_msg_type(x) ((((ak_msg_t*)x)->ref_count) & AK_MSG_TYPE_MASK) |
| set_msg_sig | #define set_msg_sig(m, s) (((ak_msg_t*)m)->sig = s) |
| set_msg_src_task_id | #define set_msg_src_task_id(m, t) (((ak_msg_t*)m)->src_task_id = t) |
| set_msg_des_task_id | #define set_msg_des_task_id(m, t) (((ak_msg_t*)m)->des_task_id = t) |
| set_if_src_task_id | #define set_if_src_task_id(m, t) (((ak_msg_t*)m)->if_src_task_id = t) |
| set_if_des_task_id | #define set_if_des_task_id(m, t) (((ak_msg_t*)m)->if_des_task_id = t) |
| set_if_src_type | #define set_if_src_type(m, t) (((ak_msg_t*)m)->if_src_type = t) |
| set_if_des_type | #define set_if_des_type(m, t) (((ak_msg_t*)m)->if_des_type = t) |
| set_if_sig | #define set_if_sig(m, s) (((ak_msg_t*)m)->if_sig = s) |
| set_if_data_common_msg | #define set_if_data_common_msg(m, d, s) set_data_common_msg(m, d, s) |
| set_if_data_dynamic_msg | #define set_if_data_dynamic_msg(m, d, s) set_data_dynamic_msg(m, d, s) |
| PURE_MSG_TYPE | #define PURE_MSG_TYPE (0x80) |
| COMMON_MSG_TYPE | #define COMMON_MSG_TYPE (0xC0) |
| DYNAMIC_MSG_TYPE | #define DYNAMIC_MSG_TYPE (0x40) |
| dbg_handler_t | typedef struct { uint32_t start_post; uint32_t start_exe; uint32_t stop_exe; } dbg_handler_t |
| ak_msg_t | typedef struct ak_msg_t { struct ak_msg_t* next; dbg_handler_t dbg_handler; uint8_t src_task_id; uint8_t des_task_id; uint8_t ref_count; uint8_t sig; uint8_t if_src_task_id; uint8_t if_des_task_id; uint8_t if_src_type; uint8_t if_des_type; uint8_t if_sig; } ak_msg_t |
| ak_msg_common_t | typedef struct { ak_msg_t msg_header; uint8_t len; uint8_t data[AK_COMMON_MSG_DATA_SIZE]; } ak_msg_common_t |
| ak_msg_pure_t | typedef struct { ak_msg_t msg_header; } ak_msg_pure_t |
| ak_msg_dynamic_t | typedef struct { ak_msg_t msg_header; uint32_t len; uint8_t* data; } ak_msg_dynamic_t |
| ak_msg_if_header_t | typedef struct { uint8_t type; uint8_t src_task_id; uint8_t des_task_id; uint8_t sig; uint8_t if_src_type; uint8_t if_des_type; } __AK_PACKETED ak_msg_if_header_t |
| ak_msg_pure_if_t | typedef struct { ak_msg_if_header_t header; } ak_msg_pure_if_t |
| ak_msg_common_if_t | typedef struct { ak_msg_if_header_t header; uint8_t len; uint8_t data[AK_COMMON_MSG_DATA_SIZE]; } __AK_PACKETED ak_msg_common_if_t |
| ak_msg_dynamic_if_t | typedef struct { ak_msg_if_header_t header; uint32_t len; uint8_t *data; } __AK_PACKETED ak_msg_dynamic_if_t |
| msg_init | void msg_init() |
| msg_free | void msg_free(ak_msg_t* msg) |
| msg_force_free | void msg_force_free(ak_msg_t* msg) |
| msg_inc_ref_count | Keep a message alive past a single delivery (for fan-out); max reference count is 7. |
| msg_dec_ref_count | void msg_dec_ref_count(ak_msg_t* msg) |
| ak_malloc | void* ak_malloc(size_t) |
| ak_free | void ak_free(void*) |
| get_pure_msg | ak_msg_t* get_pure_msg() |
| get_pure_msg_pool_used | uint32_t get_pure_msg_pool_used() |
| get_pure_msg_pool_used_max | uint32_t get_pure_msg_pool_used_max() |
| get_common_msg | Allocate a common-pool message (with a 64-byte inline buffer); returns a ready message with ref_count 1. Never NULL. |
| get_common_msg_pool_used | uint32_t get_common_msg_pool_used() |
| get_common_msg_pool_used_max | uint32_t get_common_msg_pool_used_max() |
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/the-ak-foundation/mcp-docs-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server