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

33 lines
709 B
Markdown

---
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`
2. *
> sys.exit code=1
**srv = > agent.mcp_server name="marqdo-test"**
**srv = > `srv`.tool name="ping" fn="demo.ping" description="ping tool"**
**tools = [tools](srv)**
**n = > len value=`tools`**
1. `n` == 1
> print text=mcp-tool-ok
2. *
> print text=mcp-tool-fail
**t0 = [1](tools)**
**fn = [fn](t0)**
1. `fn` == "demo.ping"
> print text=mcp-fn-ok
2. *
> print text=mcp-fn-fail