Connecting an MCP server to your client
Adding a locally running MCP server to OpenCode, Codex and Claude Code.
The Model Context Protocol (MCP) is an open protocol that lets an AI coding assistant call external tools. Our open source projects run as local stdio servers: the client program starts them itself and talks over standard input and output. No network port is opened.
In the examples below the server name is ornek and the command is ornek-mcp. Take the command of your own tool from its setup page.
OpenCode
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"ornek": {
"type": "local",
"command": ["ornek-mcp"],
"enabled": true,
"timeout": 120000
}
}
}If you want it to apply to your whole user account, write the file under ~/.config/opencode/; if you will use it in only one project, write it to the opencode.jsonc file in the project root.
Codex
[mcp_servers.ornek]
command = "ornek-mcp"
args = []Claude Code
claude mcp add --scope user ornek -- ornek-mcp
claude mcp listHow do I know it works?
- Run the command on its own in a terminal:
ornek-mcp --version. If it does not print a version, the client cannot start it either. - Close the client completely and open it again; most clients read the configuration only at startup.
- Look for the server's tools in the client's tool list. OpenCode prefixes tool names with the server name (
ornek_...).