Use Cosyte with AI agents
An AI coding agent can work with the Cosyte packages in three ways: it can call our parsers
through the MCP server in @cosyte/cli, it can load our Agent Skills, and it can read this site's
documentation as plain Markdown instead of HTML.
The MCP server in @cosyte/cli
@cosyte/cli ships an MCP (Model Context Protocol) server,
cosyte-mcp. It is a local stdio subprocess that your MCP client starts on your machine, not a
hosted endpoint.
Register it
Add this to your MCP client's configuration:
{
"mcpServers": {
"cosyte": { "command": "npx", "args": ["-y", "--package", "@cosyte/cli", "cosyte-mcp"] }
}
}
--package is required. The shorter ["-y", "@cosyte/cli", "mcp"] does not work: it fails with
could not determine executable to run.
In Claude Code, this command registers the same server:
claude mcp add --transport stdio cosyte -- npx -y --package @cosyte/cli cosyte-mcp
Everything after -- is the command that starts the server. See Anthropic's
claude mcp add documentation for scopes and other options.
Versions 0.0.1 and 0.0.2 cannot be installed
@cosyte/cli 0.0.1 and 0.0.2 are published on npm, but they cannot be installed. npm install,
npx and the registration above all fail on them with an ENOENT error, and a published version
cannot be changed. Use a later version.
The four tools
| Tool | What it does |
|---|---|
parse | Parses an HL7 v2 or FHIR R4 message to typed JSON. |
validate | Validates a message and reports the verdict. |
inspect | Returns a value-free structural summary of a message. |
convert | Converts an HL7 v2 message to a FHIR R4 Bundle. |
Each tool runs the same code as the matching cosyte command in a terminal, so the agent and the
terminal get identical results. Every tool publishes an outputSchema, and a message that parses but is
invalid is a successful validate call that reports the verdict, not a tool error.
What reaches the agent
The CLI's PHI posture carries over to the MCP server, with one door removed:
- There is no
--unsafe-show-valuesoption on the agent surface. - A tool result carries the data you asked for: the parsed model, or the converted
Bundle. Parsing a message hands its contents to the agent. - A tool error carries only a value-free diagnostic: a stable code and a position, never a name, a date of birth, a medical record number or a field value.
- The CLI writes no temporary files and logs to no file.
The @cosyte/cli documentation covers the result contract and every command.
Agent Skills for each package
cosyte/agent-skills (MIT) holds an Agent Skill
(SKILL.md) for each @cosyte package, a Cursor rule for each skill, and an AGENTS.md. A skill
tells a coding agent which package fits a task and how to use it: the install line, an example with
synthetic data, the key API names, the package's current limits and known defects, and how to
handle PHI.
In Claude Code, install them as a plugin from your shell:
claude plugin marketplace add cosyte/agent-skills
claude plugin install cosyte@cosyte
Inside a Claude Code session, the same two steps are /plugin marketplace add cosyte/agent-skills
and /plugin install cosyte@cosyte. To copy the skill folders instead, or to use them with OpenAI
Codex or Cursor, follow the repository's README. It also says what has not been tested yet: its
plugin manifests have not been run through claude plugin validate, and an install has not been
run in each tool.
This site as Markdown
Every file below covers the newest released version of each package. Superseded versions are left out, and so is any package that has not published documentation yet.
| What | Where |
|---|---|
| The index | https://docs.cosyte.com/llms.txt |
| Every package, full text | https://docs.cosyte.com/llms-full.txt |
| One package, full text | https://docs.cosyte.com/<package>/llms-full.txt |
| One page, as Markdown | the page's URL with .md appended |
The index follows the llms.txt format. It links each package's
documentation and each package's full-text file, so an agent can start there and fetch only what it
needs. For example, the Markdown copy of https://docs.cosyte.com/hl7/intro is
https://docs.cosyte.com/hl7/intro.md.
A Markdown copy is the page's source with the front matter removed and its links made absolute,
so it reads correctly on its own. In a full-text file, each page opens with a URL: line naming the
page and a Markdown: line naming its copy.