Files
marqdo/tests/ext/agent-mcp-server-smoke.mq.md
T
cflmyandCursor abcb141737 refactor: prefer link-index get across examples and tests
Migrate remaining footnote-style collection access in examples,
public/structure, and ext/lib smokes to [key](base); teach link-index in
structure pages and use bracket calls in the cafe journal example.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 12:54:38 +08:00

709 B


title: agent mcp server smoke description: Offline assemble mcp_server + one tool (no serve). import agent:ext/ai/agent.mq.md import plugin:lib/plugin.mq.md import sys:lib/sys.mq.md import demo:agent-mcp-server-helpers.mq.md

main

p = > plugin.native_path name="agent"

  1. p

plugin.load path=p

sys.exit code=1

srv = > agent.mcp_server name="marqdo-test" srv = > srv.tool name="ping" fn="demo.ping" description="ping tool" tools = tools n = > len value=tools

  1. n == 1

print text=mcp-tool-ok

print text=mcp-tool-fail

t0 = 1 fn = fn

  1. fn == "demo.ping"

print text=mcp-fn-ok

print text=mcp-fn-fail