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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentport_cli-0.1.0.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentport_cli-0.1.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file agentport_cli-0.1.0.tar.gz.

File metadata

  • Download URL: agentport_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 46.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentport_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e81854c43846e494b3662147670ca54a70a422b7664d8738512e39b3aa0ccecc
MD5 f04b4ec93d07571fc2f2de393d98dc9e
BLAKE2b-256 0797f1b784527641edf40de591640d05e1a30d74e77b8bb70d78ef9952704656

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentport_cli-0.1.0.tar.gz:

Publisher: release.yml on omrgpt/agentport

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentport_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentport_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentport_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 462daa8df2446f2e7574a0db55f4d021686aa97e2437fb4ca3bc389211fbc688
MD5 c2614c468c8b8d0bec69ef6bbcf6f811
BLAKE2b-256 167572975f75c97180958a0f56f841100e712ff340afda0bc820c0ceec464d4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentport_cli-0.1.0-py3-none-any.whl:

Publisher: release.yml on omrgpt/agentport

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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