ak-mcp

ak-mcp

Provides AI coding tools with queryable documentation for the AK (Active Kernel) event-driven MCU framework, including API signatures, guides, and guardrails.

Category
Visit Server

README

ak-mcp — AK Active Kernel documentation MCP server

A free, public Model Context Protocol server that gives AI coding tools accurate, queryable documentation for the AK (Active Kernel) event-driven MCU framework in this repo.

It lets an AI assistant:

  • understand the AK kernel core (scheduler, message pools, timers, FSM/TSM),
  • look up exact API signatures and arguments (extracted straight from the headers, so they never drift),
  • follow the rules & format for creating tasks, drivers, and screens,
  • design new tasks/drivers without touching the kernel, boot, networks, or common code.

How it works

application/sources/ak/inc/*.h ──► scripts/extract.mjs ─┐
corpus/ (hand-written guides,      scripts/build-corpus  ├─► generated/corpus.json
         guardrails, enrichment) ──────────────────────┘        (docs + BM25 index)
                                                                      │
                                          src/core (resources + tools + prompts)
                                          ├── src/worker  →  Cloudflare Worker (remote HTTP)
                                          └── src/cli     →  npx ak-mcp (stdio, local)

Signatures come from the kernel headers; semantics/examples are layered on per symbol (corpus/enrichment/). A CI drift check fails if any cross-reference points at a symbol the headers no longer define.

What it exposes

Tools

Tool Purpose
search_ak_docs(query, section?, limit?) BM25 search across everything
get_ak_api(symbol) exact signature, params, returns, semantics, examples, FATAL codes
list_ak_api(module?) browse the API by module (task/message/timer/fsm/tsm/ak/port)
get_ak_guide(topic) recipes: create-task, create-driver, create-screen, use-timer, isr-bridge, tune-pools
get_ak_guardrails() do-not-modify zones + kernel invariants

Prompts: ak-new-task, ak-new-driver — guided scaffolding that enforces conventions and guardrails.

Resources: ak://index, and ak://{section}/{id} for every concept, guide, guardrail, and API entry.

Develop

npm install
npm run build:corpus     # generate generated/corpus.json from the headers + corpus/
npm run drift            # build + fail on broken cross-references
npm test                 # extractor, corpus integrity, and search ranking (no deps needed)
npm run typecheck        # core + cli

The corpus pipeline (scripts/*.mjs) and tests are zero-dependency and run on plain Node ≥ 20 — no install required for npm run build:corpus / node --test.

Run locally (stdio)

npm run build            # build:corpus + tsc -> dist/
node dist/cli/bin.js     # or, after publishing: npx -y ak-mcp

Inspect it with the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/cli/bin.js

Client config (Claude Desktop / Cursor):

{ "mcpServers": { "ak": { "command": "npx", "args": ["-y", "ak-mcp"] } } }

Deploy (remote, public)

The Worker bundles corpus.json at build time, so it needs no database.

npm run dev              # local Streamable HTTP at http://localhost:8787/mcp
npm run deploy           # build:corpus + wrangler deploy

Endpoints: /mcp (Streamable HTTP), /sse (legacy), / (landing page).

Remote client config:

{ "mcpServers": { "ak": { "url": "https://ak-mcp.<your-account>.workers.dev/mcp" } } }

Using it in VS Code (vibe coding): see docs/vscode-vibe-coding.md for step-by-step setup (Copilot Agent mode, Cursor, Cline, Claude Code), a copy-paste .vscode/mcp.json template, and a project steering file (examples/copilot-instructions.md).

CI (.github/workflows/ak-mcp.yml) runs build + drift + tests + typecheck on every change, and deploys from main when CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets are set.

Adding documentation

  • A new API got added to the kernel? Nothing to do for the signature — it's extracted automatically. Add corpus/enrichment/<symbol>.md to give it semantics/examples.
  • A new recipe or concept? Add a markdown file under corpus/guides/ or corpus/concepts/ with frontmatter (id, title, tags, summary, optional apis).
  • Run npm run drift to verify all references resolve.

Enrichment / content frontmatter:

---
symbol: timer_set            # enrichment only
summary: One-line summary.
fatal_codes: MT:0x30
see_also: timer_remove_attr, timer_tick
tags: timer, periodic
---
Markdown body (semantics, examples) ...

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured