@digimetalab/agentlink
v0.1.0
Published
Universal MCP config sync for AI coding agents — Claude Code, Gemini CLI, OpenCode, Codex
Maintainers
Readme
agentlink
Universal MCP config sync for AI coding agents — one command to rule them all.
The Problem
You use multiple AI coding agents — Claude Code, Gemini CLI, Codex, OpenCode — and every single one has its own config file in a different location with a different format.
Add a new MCP server? You have to configure it four times. Remove one? Same story. It's 2026 and we're still copying JSON by hand.
agentlink fixes this.
What is agentlink?
agentlink is a CLI tool and npm package that acts as a universal MCP configuration layer across all major AI coding agents. Define your MCP servers once in a single agentlink.json file — agentlink syncs it everywhere.
Your agentlink.json
│
├──▶ ~/.claude/mcp.json (Claude Code)
├──▶ ~/.gemini/mcp_servers.json (Gemini CLI)
├──▶ ~/.opencode/mcp.json (OpenCode)
└──▶ ~/.codex/mcp.json (OpenAI Codex)Install
npm install -g agentlinkOr use without installing:
npx agentlinkQuick Start
# Initialize agentlink in your project
npx agentlink init
# Add an MCP server (syncs to all connected agents)
npx agentlink add github
# Sync your config to all detected agents
npx agentlink sync
# Check status — which agents are linked
npx agentlink statusCLI Commands
| Command | Description |
|---|---|
| agentlink init | Initialize agentlink.json in current directory |
| agentlink sync | Sync MCP config to all detected agents |
| agentlink sync --agents claude,gemini | Sync to specific agents only |
| agentlink add <mcp-server> | Add an MCP server and sync |
| agentlink remove <mcp-server> | Remove an MCP server and sync |
| agentlink list | List all configured MCP servers |
| agentlink status | Show all linked agents and their config paths |
| agentlink pull | Pull config from a specific agent as source of truth |
| agentlink diff | Show config differences between agents |
Supported Agents
| Agent | Config Path | Status |
|---|---|---|
| Claude Code | ~/.claude/mcp.json | ✅ Supported |
| Gemini CLI | ~/.gemini/mcp_servers.json | ✅ Supported |
| OpenCode | ~/.opencode/mcp.json | ✅ Supported |
| OpenAI Codex | ~/.codex/mcp.json | ✅ Supported |
| Cursor | .cursor/mcp.json | 🔜 Coming soon |
| Windsurf | .windsurf/mcp.json | 🔜 Coming soon |
agentlink.json Format
{
"$schema": "https://agentlink.dev/schema/v1.json",
"version": "1",
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
},
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}
},
"agents": {
"include": ["claude", "gemini", "opencode", "codex"],
"autoSync": true
}
}Use as a Library
import { AgentLink } from 'agentlink';
const link = new AgentLink();
// Detect all installed agents
const agents = await link.detectAgents();
console.log(agents); // ['claude', 'gemini', 'opencode']
// Sync config to all agents
await link.sync();
// Add a new MCP server programmatically
await link.addServer('github', {
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-github'],
env: { GITHUB_TOKEN: process.env.GITHUB_TOKEN }
});
// Get diff between agents
const diff = await link.diff('claude', 'gemini');Why agentlink?
- Zero learning curve — works with your existing MCP configs
- Agent auto-detection — finds installed agents automatically
- Conflict resolution — smart merge when configs diverge
- Env variable safety — never writes raw secrets to config files
- TypeScript-first — full type safety, works in any JS/TS project
- MCP standard — follows the Model Context Protocol specification
Roadmap
- [x] Core sync engine
- [x] Claude Code + Gemini CLI support
- [x] OpenCode + Codex support
- [ ] Cursor & Windsurf support
- [ ] GUI companion app
- [ ] Team config sharing via git
- [ ] MCP server marketplace integration
Contributing
PRs welcome! See CONTRIBUTING.md.
git clone https://github.com/digimetalab/agentlink
cd agentlink
npm install
npm run devLicense
MIT © digimetalab
