Skip to main content

IOA Library

Client and server bridge between MAS Lab tools and the Model Context Protocol (MCP), plus Agent2Agent (A2A) exposure of agents. Use it to call tools served by an MCP server, or to publish a MAS tool manifest as an MCP server. The Quickstart below shows both.

Agents keep the same tool names and arguments. MCP endpoints come from infra ToolServerRegistry entries; the agent manifest does not declare providers. An MCP usage: connect dependency replaces the implicit local provider. To keep in-process tools beside MCP, add an explicit protocol: local infra claim.

Layout

  • src/library_ioa/plugins/mcp/spec.py — infra server entry → client config
  • src/library_ioa/plugins/mcp/contract.py — MCP Tool/CallToolResult ↔ MAS list_tools/call_tool
  • src/library_ioa/plugins/mcp/client — SDK-backed client (one session per list/call)
  • src/library_ioa/plugins/mcp/provider.py — kind: mcp tool-provider plugin
  • src/library_ioa/plugins/mcp/server — wrap a MAS tool manifest as an MCP server (mas-mcp)
  • src/library_ioa/utils — result/error helpers
  • docs/ — tutorial and protocol-compliance notes (docs/mcp/, docs/a2a/)

Reusable MCP YAML lives in library-samples/infra/mcp-localhost.yaml.

Dependencies

dependencies = ["mcp>=2.2"]           # PyPI; not a git clone of mcp-python-sdk
optional-dependencies.cli = ["mcp[cli]"]
optional-dependencies.all = ["mcp[cli]"]

Protocol conformance is Node @modelcontextprotocol/conformance (npx). Do not commit vendored mcp-python-sdk / mcp-conformance trees.

Quickstart

From the mas-lab repo root (after uv sync):

# terminal 1
mas-mcp serve \
  --tool-manifest library-samples/tools/web-search.tool.yaml \
  --tool web-search \
  --host 127.0.0.1 \
  --port 9001 \
  --transport streamable-http
# terminal 2: official SDK CLI + mas-mcp client
mcp version
mas-mcp tools list --url http://127.0.0.1:9001/mcp
mas-mcp tools call --url http://127.0.0.1:9001/mcp \
  --tool web-search --arguments '{"query":"Apple stock price"}'

mas-ctl chat docs/tutorials/01-building-an-agent/agent.yaml \
  -o docs/tutorials/01-building-an-agent/overlays/tools.yaml \
  -o docs/tutorials/01-building-an-agent/overlays/skills.yaml \
  --infra-ref ../../../library-samples/infra/mcp-localhost.yaml \
  --infra-ref ../../../library-samples/infra/local-tools.yaml \
  -q "What is the current price of Apple stock?" \
  --trace

The serve terminal logs MCP tool call name=web-search for both mas-mcp tools call and the agent.

Runtime wiring

  • MCPClient opens and closes the streamable-HTTP session in the same asyncio task (run_sync from the provider)
  • LocalToolProvider: in-process Python tools (local flavour or implicit standard:local-tools infra)
  • MCPToolProvider: kind: mcp (library_ioa.plugins.mcp.provider)

A2A exposure

The generic runtime server command starts the registered agent_expose plugin from the agent's Application endpoint (usage: listen):

mas-ctl serve docs/tutorials/01-building-an-agent/agent.yaml \
  --infra-ref path/to/a2a-qa.yaml

Use the official A2A CLI for discovery and messaging:

a2a card get http://127.0.0.1:9005
a2a send -a http://127.0.0.1:9005 "What is the capital of France?"

For a MAS, declare remote dependencies as named endpoints in an infra/v1 Application manifest, and keep workflow.nodes[].delegates_to as the topology. See the A2A feature page at docs/a2a/protocol-compliance.md.

Development notes

  • The bridge lives in the library_ioa.plugins.mcp package.
  • The runtime provider plugin registers kind: mcp manifests through MCPProviderPlugin.
  • The SDK-backed client connects using mcp.client.stdio.stdio_client and ClientSession.
  • A separate MCP server process can expose the same tool contract without changing the agent manifest.

Metadata

Release files for mas-lab-library-ioa 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mas-lab-library-ioa 0.2.0
File Size Uploaded Provenance Actions
mas_lab_library_ioa-0.2.0.tar.gz 136.7 kB With provenance Details for mas_lab_library_ioa-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mas-lab-library-ioa 0.2.0
File Interpreter ABI Platform Actions
mas_lab_library_ioa-0.2.0-py3-none-any.whl Python 3 none any Details for mas_lab_library_ioa-0.2.0-py3-none-any.whl

Total release size: 177.6 kB

Release files / mas_lab_library_ioa-0.2.0.tar.gz

Download URL mas_lab_library_ioa-0.2.0.tar.gz
Size 136.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cf9d7161d4c4ddb7093ed38441ebc9ee02d768ec1be3dc3c43b600893a6bbb46
BLAKE2b-256 checksum
How to use checksums
c37035809353b9d0837478d10507d4db119fd1b456fd723ba79ad4d452fc0291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / mas_lab_library_ioa-0.2.0-py3-none-any.whl

Download URL mas_lab_library_ioa-0.2.0-py3-none-any.whl
Size 40.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22f7ab29dcbea479e04df0c15669f87342930e368f3b58168b7464414d8dd160
BLAKE2b-256 checksum
How to use checksums
fb6bf6c0df07442a950f5e1a565bc38f844ce533520617568f539ca621d535b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for mas-lab-library-ioa 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mas_lab_library_ioa-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page