Skip to main content

AgentPort

One config, every coding agent. A lightweight, security-first converter between the config formats of AI coding assistants.

You write your guidelines once. AgentPort ports them everywhere.

                ┌──────────────┐
   AGENTS.md ──▶│              ├──▶ CLAUDE.md            (Claude Code)
   SKILL.md  ──▶│  agentport   ├──▶ .cursor/rules/*.mdc  (Cursor)
   mcp.json  ──▶│              ├──▶ GEMINI.md / .rules / .clinerules / ...
                └──────────────┼──▶ .github/copilot-instructions.md
                               ├──▶ opencode.json / codex config.toml
                               └──▶ .claude/skills / .opencode/skill / ...

Why

Every coding assistant invented its own instruction format: AGENTS.md, CLAUDE.md, .cursorrules, copilot-instructions.md, .windsurfrules, .clinerules, GEMINI.md, ... — plus per-tool MCP server configs and skill formats. Keeping them in sync by hand is tedious and error-prone. Existing tools solve only one slice (usually rules propagation) and tend to pull in a dependency tree.

AgentPort is the missing converter: any format → any other format, for instructions and MCP configs and skills.

  • Zero dependencies. Pure Python stdlib (3.10+). One pip install, no supply-chain surface.
  • Security-first. No network. No eval. Path containment, size caps, symlink refusal, duplicate-key rejection, atomic writes, secret masking. See SECURITY.md.
  • Lossless where possible, honest where not. When a target format lacks a feature (e.g. Codex has no "disabled" flag for servers), AgentPort warns instead of silently dropping data.
  • Deterministic output. Same input + same flags = byte-identical files.

Install

pip install .

or run straight from a checkout:

python -m agentport --help        # from repo root (uses src/)
python selftest.py                # dependency-free verification

Quick start

# What does my project already have?
agentport detect

# Write AGENTS.md once, propagate to all other tools
agentport instructions sync --from agents          # skips existing files
agentport instructions sync --force                # overwrite all targets

# Single conversion, with preview
agentport instructions convert AGENTS.md --to cursor --dry-run --diff
agentport instructions convert AGENTS.md --to copilot --force

# Port your Claude Desktop MCP servers into VS Code + OpenCode + Codex
agentport mcp convert claude_desktop_config.json --to vscode
agentport mcp convert claude_desktop_config.json --to opencode --out opencode.json
agentport mcp convert claude_desktop_config.json --to codex   --out ~/.codex/config.toml

# Inspect an MCP config without leaking secrets
agentport mcp show .cursor/mcp.json

# Skills: validate against the spec, then install everywhere
agentport skills validate ./my-skill
agentport skills import ./my-skill --to claude     # -> .claude/skills/my-skill
agentport skills import ./my-skill --to opencode   # -> .opencode/skill/my-skill
agentport skills export  ./my-skill --to cursor    # -> .cursor/rules/my-skill.mdc

Supported formats

Instructions (instructions convert|sync)

Key File Tool
agents AGENTS.md Codex, OpenCode, many
claude CLAUDE.md Claude Code
gemini GEMINI.md Gemini CLI
amp AGENT.md Amp
zed .rules Zed
windsurf .windsurfrules Windsurf
cline .clinerules Cline
aider CONVENTIONS.md Aider
copilot .github/copilot-instructions.md GitHub Copilot
cursor .cursor/rules/*.mdc Cursor (frontmatter)
cursor-legacy .cursorrules Cursor (legacy)

Cursor .mdc files get synthesized frontmatter (description, globs, alwaysApply); converting from .mdc strips it back off. Override with --description/--globs/--always-apply.

MCP server configs (mcp convert|show)

Family Typical file stdio http/sse disabled flag
claude claude_desktop_config.json yes warn no
cursor .cursor/mcp.json yes yes via extra key
vscode .vscode/mcp.json yes yes no
opencode opencode.json(c) ("mcp" section) yes yes enabled
codex ~/.codex/config.toml yes recent no
windsurf ~/.codeium/windsurf/mcp_config.json yes warn no
gemini ~/.gemini/settings.json yes warn no

Semantics:

  • Default is a merge: existing servers are kept; name collisions keep the existing entry unless --conflict overwrite; --replace discards the old file content; --prune drops servers absent from the source.
  • Project-scoped targets (cursor/vscode/opencode) merge in place at their canonical path. Machine-global targets (claude/codex/windsurf/gemini) require explicit --out so AgentPort never touches your home directory on its own.
  • Unknown keys are preserved per-server so round-trips don't shred exotic options. Existing top-level keys ($schema, theme, inputs, ...) are preserved too.
  • OpenCode's "command": [cmd, arg...] array form and environment map are translated automatically; enabled: false maps to the disabled flag.

Skills (skills validate|normalize|import|export)

Validates the common SKILL.md spec (lowercase-hyphen name ≤ 64 chars, description ≤ 1024 chars, body required). normalize auto-fixes casing, whitespace and over-long descriptions. Import copies auxiliary files under strict caps (200 files / 2 MiB) while skipping symlinks and executables. Claude-only allowed-tools is moved under metadata for non-Claude targets.

Safety & exit codes

Code Meaning
0 success
1 usage/format errors (bad target, invalid frontmatter, ...)
2 safety refusal (path escape, oversized/binary input, symlink)
3 conflict (existing file; re-run with --force)
70 unexpected bug (please report)

Add --strict to turn warnings into failures, --dry-run/--diff to preview, --root <dir> to operate on another project.

Use it from your agent

A ready-made skill is included so Claude Code / OpenCode / agents-spec clients can drive AgentPort themselves:

agentport skills import integration/skills/agent-port --to claude

Comparison

AgentPort Ruler ad-hoc scripts
Instructions propagation yes yes partial
Bidirectional conversion yes no no
MCP config conversion yes (7 clients) no rare
Skills handling yes no no
Dependencies 0 Node.js tree varies

Development

pip install -e .[dev]
python selftest.py && pytest tests -q

See CONTRIBUTING.md for design rules and how to add a new target format (it's a registry entry plus round-trip tests).

License

MIT — see LICENSE.

Metadata

Release files for agentport-cli 0.1.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 agentport-cli 0.1.0
File Size Uploaded
agentport_cli-0.1.0.tar.gz 46.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentport-cli 0.1.0
File Interpreter ABI Platform
agentport_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 84.2 kB

Release files / agentport_cli-0.1.0.tar.gz

Download URL agentport_cli-0.1.0.tar.gz
Size 46.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e81854c43846e494b3662147670ca54a70a422b7664d8738512e39b3aa0ccecc
BLAKE2b-256 checksum
How to use checksums
0797f1b784527641edf40de591640d05e1a30d74e77b8bb70d78ef9952704656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 25, 2026.

Transparency log

Release files / agentport_cli-0.1.0-py3-none-any.whl

Download URL agentport_cli-0.1.0-py3-none-any.whl
Size 37.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
462daa8df2446f2e7574a0db55f4d021686aa97e2437fb4ca3bc389211fbc688
BLAKE2b-256 checksum
How to use checksums
167572975f75c97180958a0f56f841100e712ff340afda0bc820c0ceec464d4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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