Make @imqueue first-class inside AI coding agents. When a developer asks their assistant to "build an @imqueue service" or "how do I expose a method", the agent should reach for authoritative docs and correct scaffolding rather than hallucinating an API. This is the GEO (Generative Engine Optimization) counterpart to SEO: instead of ranking in a search page, we rank at code-time, inside the tools developers already use.
Three capabilities, thirteen tools:
- Docs access —
search_docs,get_doc,list_packages - Offline scaffolding —
scaffold_service,scaffold_client(templates, no deps) - CLI bridge —
cli_status,cli_install,cli_help,create_service,generate_client,fleet(imq ctl),config(imq config),logs(imq log) (drive the installedimqbinary — install it, create projects, generate clients, manage the local fleet and CLI configuration)
AI agent (Claude Code / Cursor / …)
│ MCP (JSON-RPC over stdio)
▼
@imqueue/mcp ── fetch ──▶ imqueue.org
├─ docs.ts (/llms.txt, /<page>/index.md)
├─ packages.ts (static catalog)
└─ scaffold.ts (code templates)
- Transport: stdio (the universal local-MCP transport; works with every host today). A hosted Streamable HTTP variant is a later option (§7).
- Runtime: Node ≥ 18, TypeScript,
@modelcontextprotocol/sdkhigh-levelMcpServer,zodinput schemas. Ships as an npm bin (npx -y @imqueue/mcp). - Docs source: fetched live from imqueue.org's existing machine-readable feeds
and cached in-process (1 h TTL). No docs are bundled, so the server can never go
stale against a release. Only
imqueue.orgis ever fetched (host-checked).
imqueue.org already emits, for GEO:
/llms.txt— curated index (## Section+- [Title](url): description)/<page-url>index.md— a plain-markdown mirror of every page/blog/search-index.json— structured post index
The MCP server is a thin, agent-facing adapter over those — one source of truth.
Parse /llms.txt into {title, url, description, section} entries; rank by query-term
overlap (title ×3, section/description/url ×1); return the top N with URLs.
→ "how do I expose a method" → the RPC guide + API pages.
Resolve a page URL to its markdown mirror (…/index.md) and return the raw markdown
for reading/quoting. Host-restricted to imqueue.org.
Static catalog (rpc, core, cli, job, pg-pubsub, pg-cache, async-logger, http-protect) with one-liners + install commands, so the agent picks the right package first.
Emit an IMQService subclass with @expose()d, JSDoc-typed methods (JSDoc is
@imqueue's type source) + a bootstrap that start()s it. Omitting methods yields a
starter template. Points to imq service create for a fully provider-wired project.
@imqueue generates the real typed client from a running service
(imq client generate <Name>), so types never drift. The tool returns that command
plus an illustrative usage snippet (it does not fabricate a client that could go stale).
The server runs locally, so when @imqueue/cli is on PATH it can drive the real
imq (see src/cli.ts). Safety posture:
- Every call runs
imqwith stdin closed and a timeout, so an interactive prompt (a missing flag) fails fast with guidance rather than hanging the server. create_servicerunsimq service create … --dry-runby default (writes nothing); a real run requires an explicitapply: true— an agent must never create repos / push to remotes silently.cli_helpsurfaces the exact flags to pass so the run is non-interactive.generate_clientrunsimq client generate(the service must be running).cli_installrunsnpm install -g @imqueue/clito bootstrap the CLI when absent.fleetwrapsimq ctl <start|stop|restart|status>(status is read-only; the others change running processes).configwrapsimq config <check|get|set|init>(get/check read-only; set writes a single value; init is interactive so automation should prefer set).- If
imqis absent, the tools return an install hint and the offlinescaffold_*tools remain available.
search_docs:{ query: string, limit?: 1..20 }get_doc:{ url: string }list_packages:{}scaffold_service/scaffold_client:{ name|service: string, methods?: Method[] }whereMethod = { name, description?, params?: {name,type,description?}[], returns? }.
Every tool returns { content: [{ type: "text", text }] }; errors return the same
shape with isError: true (so the agent sees a message, not a transport failure).
Publish @imqueue/mcp to npm, then list it everywhere agents discover servers:
| Channel | Artifact / action |
|---|---|
| Official MCP registry | server.json (this repo) → publish via mcp-publisher. Namespace org.imqueue/mcp (DNS auth on imqueue.org). |
| Smithery | smithery.yaml (this repo) → connect the GitHub repo. |
| mcp.so / PulseMCP / Glama | Auto-index from npm + GitHub; submit/claim the listing. |
| Cursor / VS Code directories | Add the mcpServers JSON snippet to their community lists. |
| awesome-mcp-servers | PR the repo into the list. |
| imqueue.org | Add an "MCP server" section to /using-ai-assistants/ with the install snippet. |
Install snippet promoted everywhere:
{ "mcpServers": { "imqueue": { "command": "npx", "args": ["-y", "@imqueue/mcp"] } } }npm run smoke spawns the built server and drives the JSON-RPC handshake:
initialize → tools/list (asserts all five) → tools/call for scaffold_service
and list_packages (offline) and search_docs (live). CI can run it on every push.
- Streamable HTTP deployment (a hosted endpoint) for zero-install use and for hosts that prefer remote servers.
generate_clientfor real — spin up against a reachable running service and return the actual generated client.- Resources — expose docs pages as MCP resources (not just tool results) so hosts can surface them in their UI.
- Prompts — ship an "author an @imqueue service" prompt template.
- Richer search — fold in
/blog/search-index.jsontopics and light stemming to improve recall (e.g. "delayed jobs" → job/scheduling pages).
GPL-3.0, matching the framework; commercial licensing via imqueue.com.