Interoperability Flow#
This walkthrough shows the current interoperability story:
- Install a packaged tool with AgentPM.
- Run it directly from the shell with
agentpm run. - Expose it through the built-in MCP adapter with
agentpm serve --mcp. - Export a starter Skill scaffold with
agentpm export --skill.
The principle is:
Author and package with AgentPM. Expose through ecosystem adapters when needed.
Goal#
Use one installed tool as the source of truth for:
- shell execution
- MCP exposure
- Skill scaffold generation
The example below uses @zack/capitalize, but the same flow applies to other installed tools.
Prerequisites#
- A project with an
agent.json - AgentPM installed
Step 1: Install the tool#
agentpm install @zack/capitalizeThis prepares the tool under:
.agentpm/tools/<namespace>/<name>/<version>and records the resolved version in:
agent.lockStep 2: Run the tool directly#
Use the version pinned in agent.lock:
agentpm run @zack/capitalize --input '{"text":"hello world"}'Example result:
{"upper":"HELLO WORLD"}You can also provide JSON through stdin:
echo '{"text":"hello world"}' | agentpm run @zack/capitalizeor through a file:
agentpm run @zack/capitalize --input-file payload.jsonStep 3: Expose the same tool through MCP#
Start the built-in MCP adapter:
agentpm serve --mcpDefault bind:
127.0.0.1:7331By default, AgentPM exposes every tool pinned in agent.lock.
You can verify the tool list directly:
curl -X POST http://127.0.0.1:7331/mcp \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}'And call the tool:
curl -X POST http://127.0.0.1:7331/mcp \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "zack__capitalize",
"arguments": {
"text": "hello world"
}
}
}'MCP is the first built-in ecosystem adapter. Tool metadata and execution still come from AgentPM's canonical install + runner model rather than a separate MCP-specific runtime.
Public third-party adapters, including WASM-loaded plugins, are future work. Today, AgentPM ships the built-in MCP adapter.
Step 4: Export a starter Skill scaffold#
Generate a starter Skill from the installed tool metadata:
agentpm export --skill @zack/capitalizeDefault output:
skills/capitalize/
SKILL.md
references/
tool-contract.md
examples.md
scripts/
run.shThe generated files keep progressive disclosure:
SKILL.mdstays concise and workflow-oriented.references/tool-contract.mdholds deeper manifest-derived details.references/examples.mdholds starter invocation examples.scripts/run.shdelegates back toagentpm run.
The scaffold is intentionally a starting point, not a polished final workflow artifact.
Skills may become first-class AgentPM artifacts later. Today, agentpm export --skill is a scaffold/export surface for adapting installed tools into Skill-shaped workflows.
End-to-end summary#
agentpm install @zack/capitalize
agentpm run @zack/capitalize --input '{"text":"hello world"}'
agentpm serve --mcp
agentpm export --skill @zack/capitalizeThat is the intended interoperability story today:
- AgentPM stays the source of truth for packaging and execution.
runmakes tools shell-friendly.serve --mcpmakes them available to MCP-compatible clients.export --skillgenerates a starter workflow scaffold without changing the tool contract.