MCP server setup¶
MCP (Model Context Protocol) is a standard way for an AI app to call tools. crew-dcs includes a small MCP server, so an AI app such as Claude Desktop can look up Domo users and roles for you. This page shows how to run it on your own machine with your own Domo credential.
This is separate from Using crew-dcs with an AI agent, where an agent writes Python scripts for you. Here the AI app calls Domo directly through the server's tools.
What you need¶
- crew-dcs installed with the
mcpextra, as in Install. That means"crew-dcs[mcp]"in your project's dependencies, thenuv sync. - A Domo instance name and a Domo access token. These are the same two values
as in Authenticating to Domo:
DOMO_INSTANCE(formycompany.domo.com, that ismycompany) andDOMO_ACCESS_TOKEN.
Use the module crew_dcs.mcp_server.server
The package also contains crew_dcs.mcp_server, with no .server on the
end. That one is the hosted multi-user service. It needs server settings you
don't have and fails to start without them. Run the .server module, as
below.
What the server offers¶
The server uses the DOMO_INSTANCE and DOMO_ACCESS_TOKEN it is started with,
so it acts as whoever owns that token. Every Domo tool still asks for an
instance argument. In this local mode, the server ignores its value and uses
DOMO_INSTANCE. A client may still fill it in for you.
These tools are available:
| Tool | What it does | Changes Domo? |
|---|---|---|
get_roles_with_membership |
Return every role in the instance together with the users assigned to it. | No |
get_user |
Retrieve a Domo user by ID. | No |
group_create |
Not implemented. | Not implemented |
group_create_from_name |
Create a new group in Domo. | Yes |
group_get_by_id |
Fetch a group by its ID from the Domo API. | No |
list_domo_capabilities |
List Domo capability toolsets (by class). Use reveal_toolset to expand one. | No |
list_my_domo_instances |
List the Domo instances you can target (slug, display name, aliases). | No |
reveal_toolset |
Reveal a capability toolset's tools for this session, then call them. | No |
role_create |
Create a new entity and return it (classmethod: no instance yet). | Yes |
role_get_by_id |
Fetch an entity by its unique identifier. | No |
update_users_role |
Assign users to a role. Defaults to dry_run: returns the plan without applying. Call again with dry_run=False to apply (per-item, fault-tolerant). | Yes (can change or remove data) |
group_create does nothing yet
group_create is not implemented and always returns an error. Use
group_create_from_name to create a group. The server also wrongly marks
group_create as read-only; that flag is a known bug.
A Domo access token carries the permissions of the user it was created for. Create the token for a dedicated Domo user whose role allows only what you want the AI app to do, not for your own account. The steps are in Best practice: the access-token account pattern.
Check it starts¶
You can try it from a terminal first. Run these from your project folder. This
uses the virtual environment (.venv) that uv sync made.
export DOMO_INSTANCE="mycompany"
export DOMO_ACCESS_TOKEN="paste-your-domo-token-here"
.venv/bin/python -m crew_dcs.mcp_server.server
$env:DOMO_INSTANCE = "mycompany"
$env:DOMO_ACCESS_TOKEN = "paste-your-domo-token-here"
.venv\Scripts\python.exe -m crew_dcs.mcp_server.server
It prints a short banner saying it is starting the server crew-dcs on the
stdio transport, then waits. That is normal: an MCP client talks to it through
the program's input and output, so there is nothing to type. Press Ctrl+C to
stop it.
If you start it with neither variable set, it still starts. A tool call then fails with "DOMO_INSTANCE and DOMO_ACCESS_TOKEN must be set".
Connect Claude Desktop¶
Claude Desktop reads a JSON settings file. Open it from Claude Desktop under
Settings, Developer, Edit Config. It is usually at
~/Library/Application Support/Claude/claude_desktop_config.json on macOS and
%APPDATA%\Claude\claude_desktop_config.json on Windows. Add a crew-dcs entry
under mcpServers, using the full path to the Python inside your project's
.venv:
{
"mcpServers": {
"crew-dcs": {
"command": "C:/Users/you/my-domo-scripts/.venv/Scripts/python.exe",
"args": ["-m", "crew_dcs.mcp_server.server"],
"env": {
"DOMO_INSTANCE": "mycompany",
"DOMO_ACCESS_TOKEN": "paste-your-domo-token-here"
}
}
}
}
On macOS or Linux the command is the path to .venv/bin/python in your project.
Use forward slashes in JSON paths. Restart Claude Desktop, and the tools appear
in the chat.
The server does not read your .env file, so the values have to be in this
env block, or in the environment of the process that starts the server. That
makes the token sit in plain text in the settings file. Keep that file private,
and never paste its contents into a chat.
Connect Claude Code¶
claude mcp add crew-dcs \
--env DOMO_INSTANCE=mycompany \
--env DOMO_ACCESS_TOKEN=paste-your-domo-token-here \
-- /path/to/my-domo-scripts/.venv/bin/python -m crew_dcs.mcp_server.server
Run claude mcp list to see it. This puts the token in Claude Code's settings,
with the same warning as above. The command, token included, is also saved in
your shell history, so clear that entry afterwards or set the values another way. Type your token into your own terminal and not
into a conversation.
Connect another MCP client¶
Most MCP clients accept the same three things: a command, its arguments, and
environment variables. Give it the path to your .venv Python, the arguments
-m crew_dcs.mcp_server.server, and the two variables. The server speaks MCP
over standard input and output (stdio), which every MCP client supports.
What was checked, and what wasn't¶
The commands above were run: the server starts over stdio, and an MCP handshake
returned the tool names in the table. A call with no credentials failed with the
message quoted above. The tool table is generated from the server's own tool list,
so it can't drift from what the server offers. The behaviour of each tool was not
tested. The tools were not run against a live Domo
instance, and Claude Desktop, Claude Code and other clients were not tested.
Those steps follow each client's documented settings format, so check them
against your client's own docs if one doesn't connect.
The hosted version of this server is not offered to outside users, and this page doesn't cover it.