Skip to content

Commit 774b109

Browse files
authored
Add Codex notes for mcp.md
1 parent 5e23d41 commit 774b109

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

docs/mcp.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ This approach allows agents to connect to UCM's MCP server directly via stdin/st
1212

1313
Note that this causes an additional UCM to run as an entirely independent process for each agent you're using.
1414

15+
#### Claude Code
16+
1517
To configure the MCP for use with Claude (and any tools which read Claude's json config), edit your Claude Desktop config JSON file, which is found:
1618

1719
* On Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
1820
* On Windows: `%APPDATA%\Claude\claude_desktop_config.json`
21+
* On Linux: `$HOME/.claude.json`
1922

2023
Configure a `unison` key in your `mcpServers` object as below. Replace `<path-to-ucm>` with the path to your `ucm` executable.
2124
E.g. on Mac this is likely `/opt/homebrew/bin/ucm`, you can run `which ucm` to find your UCM executable path.
@@ -32,7 +35,7 @@ E.g. on Mac this is likely `/opt/homebrew/bin/ucm`, you can run `which ucm` to f
3235

3336
E.g. my complete file on Mac looks like this:
3437

35-
```
38+
``` json
3639
{
3740
"mcpServers": {
3841
"unison": {
@@ -45,6 +48,32 @@ E.g. my complete file on Mac looks like this:
4548

4649
After saving the file, restart the Claude Desktop app. You should then see a new "unison" option in the MCP server list.
4750

51+
#### Codex
52+
53+
Codex is primarily used for OpenAI models, but can be used with other model providers that support the OpenAI API.
54+
55+
Configuration is similar to Claude Code; locate your Codex config file:
56+
57+
* On Linux: `$HOME/.codex/config.toml`
58+
59+
``` toml
60+
[mcp_servers.unison]
61+
command = "/path/to/ucm"
62+
args = ["mcp"]
63+
```
64+
65+
Restart `codex`; you should now be able to see the Unison MCP server by entering `/mcp` in Codex:
66+
67+
```
68+
/mcp
69+
70+
🔌 MCP Tools
71+
72+
• Server: unison
73+
• Command: /home/bbarker/.nix-profile/bin/ucm mcp
74+
• Tools: docs, get-current-project-context, lib-install, list-definition-dependencies, list-definition-dependents, list-library-definitions, list-local-projects, list-project-branches,
75+
list-project-definitions, list-project-libraries, search-by-type, search-definitions-by-name, share-project-readme, share-project-search, typecheck-code, view-definitions
76+
```
4877

4978
### Connecting to a running UCM executable (not recommended)
5079

0 commit comments

Comments
 (0)