Files
marqdo/tests/ext/agent-mcp-server-smoke.mq.md
T
cflmyandCursor b5c07385e9 feat(markup): finish v0.3 stock migration and green gold
Migrate remaining .mq.md (tests/ext/public/examples), stop elevating local assigns to params, inject form_target in Go libweb, and skip live LLM gold without a real key.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:43:44 +08:00

706 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 = srv[^tools] n = > len value=tools

  1. n == 1

print text=mcp-tool-ok

print text=mcp-tool-fail

t0 = tools[^1] fn = t0[^fn]

  1. fn == "demo.ping"

print text=mcp-fn-ok

print text=mcp-fn-fail