Connect your agent
uigraph-mcp is a standard MCP stdio server, so any MCP-compatible agent can run it. The configs below cover the common ones; for anything else, point the client at the uigraph-mcp command with the same env block (see Any other MCP client).
In every config, set UIGRAPH_MCP_SERVER_URL to your organization's MCP server URL — use https://mcp.uigraph.app for UIGraph Cloud, or the URL of your own deployment if you self-host UIGraph.
Make sure @uigraph/mcp is installed first: npm i -g @uigraph/mcp.
Quick setup with init
The fastest path is the built-in initializer. It writes the config for your agent, merging into any existing file, and installs @uigraph/mcp globally if uigraph-mcp is not already on your PATH.
Run it without an argument to pick your agent from an interactive list:
uigraph-mcp init
Or pass the agent directly:
uigraph-mcp init cursor
Supported agents: cursor, claude-code, claude-desktop, vscode, windsurf, gemini, opencode, codex.
The manual configs below show what each command writes, in case you prefer to edit by hand.
Cursor
Writes .cursor/mcp.json in the current directory. Or add it manually to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"uigraph": {
"command": "uigraph-mcp",
"env": {
"UIGRAPH_MCP_SERVER_URL": "https://mcp.uigraph.app"
}
}
}
}
Claude Code
Add it with the CLI:
claude mcp add uigraph --env UIGRAPH_MCP_SERVER_URL=https://mcp.uigraph.app -- uigraph-mcp
Or add it manually to .mcp.json (project) or ~/.claude.json (global):
{
"mcpServers": {
"uigraph": {
"command": "uigraph-mcp",
"env": {
"UIGRAPH_MCP_SERVER_URL": "https://mcp.uigraph.app"
}
}
}
}
Claude Desktop
Add it to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\, Linux: ~/.config/Claude/):
{
"mcpServers": {
"uigraph": {
"command": "uigraph-mcp",
"env": {
"UIGRAPH_MCP_SERVER_URL": "https://mcp.uigraph.app"
}
}
}
}
VS Code
Add it to .vscode/mcp.json (project) or your user mcp.json. VS Code groups servers under servers:
{
"servers": {
"uigraph": {
"command": "uigraph-mcp",
"env": {
"UIGRAPH_MCP_SERVER_URL": "https://mcp.uigraph.app"
}
}
}
}
Windsurf
Add it to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"uigraph": {
"command": "uigraph-mcp",
"env": {
"UIGRAPH_MCP_SERVER_URL": "https://mcp.uigraph.app"
}
}
}
}
Gemini CLI
Add it to ~/.gemini/settings.json:
{
"mcpServers": {
"uigraph": {
"command": "uigraph-mcp",
"env": {
"UIGRAPH_MCP_SERVER_URL": "https://mcp.uigraph.app"
}
}
}
}
Codex
Add it to ~/.codex/config.toml:
[mcp_servers.uigraph]
command = "uigraph-mcp"
env = { "UIGRAPH_MCP_SERVER_URL" = "https://mcp.uigraph.app" }
opencode
Add it to opencode.json (project) or ~/.config/opencode/opencode.json (global):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"uigraph": {
"type": "local",
"command": ["uigraph-mcp"],
"enabled": true,
"environment": {
"UIGRAPH_MCP_SERVER_URL": "https://mcp.uigraph.app"
}
}
}
}
Any other MCP client
Any agent that supports MCP stdio servers can use UIGraph. Configure a server with:
- command:
uigraph-mcp - environment:
UIGRAPH_MCP_SERVER_URLset to your organization's server URL (plusUIGRAPH_ACCESS_TOKEN/UIGRAPH_ORG_IDif needed — see Environment variables)
Clients that group servers under a key typically use either mcpServers or servers; match whatever your client expects. The command and environment stay the same.