Skip to main content
CrewAI multi-agent workflows often need to hand off work between agents — one agent produces an output, another consumes it. Artifacta is the durable store for that handoff: a producer agent stores an artifact, and a downstream agent retrieves it by id. This recipe wires the Artifacta MCP server into a crew as a tool source via CrewAI’s MCP support (crewai-toolsMCPServerAdapter).
This is a recipe, not a packaged adapter. CrewAI’s MCP integration is newer than the others Artifacta supports, so the API may shift — if your crewai-tools version differs, check its MCP docs for the current MCPServerAdapter signature. We’ll ship a packaged adapter (like the LangChain one) if CrewAI demand grows.

Prerequisites

  • Python 3.10+ and Node.js is not required — the Python artifacta-mcp server is launched directly.
  • An Artifacta API key (ak_live_…) from the API keys page.
  • An LLM provider configured for CrewAI (e.g. OPENAI_API_KEY).

1. Install

Install the Artifacta MCP server, CrewAI, and the CrewAI tools package (which provides the MCP adapter):
artifacta-mcp installs the artifacta-mcp console script that the adapter launches as a stdio subprocess.

2. Register Artifacta as a CrewAI tool source

MCPServerAdapter takes StdioServerParameters and yields a list of CrewAI tools — one per Artifacta MCP tool. Use the artifacta-mcp helper build_stdio_params to assemble the launch command, args, and env (it injects ARTIFACTA_API_KEY and translates the --allow-path / --allow-destructive flags):
The with block keeps the MCP server process alive while the crew runs; the tools are valid only inside it. If you prefer not to use the helper, build StdioServerParameters(command="artifacta-mcp", args=[...], env={"ARTIFACTA_API_KEY": "..."}) directly.
--allow-destructive (via allow_destructive=True) exposes the tools that mint public share links, delete artifacts, and irreversibly seal sessions. In an autonomous crew there is no human-in-the-loop confirmation, so enable it only when the crew is explicitly designed to perform those actions. Keep --allow-path scoped to a dedicated work directory — the built-in deny-list (~/.ssh, /etc, .env*, …) always wins, but a broad allow root still widens what agents can read. See path confinement.

3. Example crew — producer hands an artifact to a consumer

A two-agent crew: a researcher writes a summary and stores it in Artifacta; an editor retrieves that stored artifact by id and polishes it. The artifact is the handoff medium between the two agents.
The context=[write_task] wiring passes the researcher’s output (the art_… id) to the editor’s task, and both agents share the same Artifacta tool set — so the editor can fetch exactly what the researcher stored. This is the multi-agent handoff pattern from ARTIFACTA_MVP_SPEC_v5.md use case #5.

Recipe validation

CrewAI’s MCP integration is evolving, so this recipe is re-validated at each docs update and the live run is signed off by the operator.
If a CrewAI release changes the MCPServerAdapter signature or tool-binding shape, update the code samples and this table. If CrewAI traction warrants it, this recipe is promoted to a packaged artifacta_mcp.crewai adapter.

Troubleshooting

The Artifacta-side failures (auth, server not starting, path refusals) are the same as every other client — see Troubleshooting. For CrewAI-specific issues (the adapter not yielding tools, the with block closing before the crew runs), confirm your crewai-tools version supports MCPServerAdapter and that the with MCPServerAdapter(...) block wraps the entire crew.kickoff() call.