Asana's current MCP server is at
https://mcp.asana.com/v2/mcp. You need an Asana MCP app for OAuth and a matching config for your opencode version.
1. Create an Asana MCP app
- Open My apps, select Create new app, and choose MCP app. A standard API app cannot authenticate with Asana's MCP server.
- Copy the Client ID and Client secret.
- On the OAuth tab, register this redirect URL:
http://127.0.0.1:3334/oauth/callback. - Under Manage distribution, choose Any workspace or select the specific workspaces that should use the app. Save the changes.
The redirect URL must match the one in your opencode config, including the host, port, and path.
2. Set the credentials
Export the values in the shell where you launch opencode:
export ASANA_CLIENT_ID="your-client-id"
export ASANA_CLIENT_SECRET="your-client-secret"
To keep them available in new terminals, put those exports in your shell's private startup configuration. Do not commit
client secrets to a project config. Opencode reads the variables through {env:ASANA_CLIENT_ID} and
{env:ASANA_CLIENT_SECRET} in the examples below.
3. Configure opencode
Run opencode --version to check whether you have version 1 or 2. Add one of the following examples to your
project's opencode.json. You can also put it in .opencode/opencode.json or your global opencode config.
Opencode 2
Use V2's mcp.servers format and snake_case OAuth fields:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"asana": {
"type": "remote",
"url": "https://mcp.asana.com/v2/mcp",
"oauth": {
"client_id": "{env:ASANA_CLIENT_ID}",
"client_secret": "{env:ASANA_CLIENT_SECRET}",
"redirect_uri": "http://127.0.0.1:3334/oauth/callback",
"callback_port": 3334
}
}
}
}
}
Opencode 1
Use V1's top-level mcp format and camelCase OAuth fields. This requires a V1
release that supports redirectUri and callbackPort; older V1 releases without those settings cannot reliably use a
pre-registered Asana redirect URL.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"asana": {
"type": "remote",
"url": "https://mcp.asana.com/v2/mcp",
"oauth": {
"clientId": "{env:ASANA_CLIENT_ID}",
"clientSecret": "{env:ASANA_CLIENT_SECRET}",
"redirectUri": "http://127.0.0.1:3334/oauth/callback",
"callbackPort": 3334
}
}
}
}
If your V1 installation rejects redirectUri or callbackPort, update opencode before continuing. Both examples use
Asana's current Streamable HTTP endpoint; the retired https://mcp.asana.com/sse endpoint will not work.
4. Authenticate and check the connection
Restart opencode after changing the config or environment variables, then run:
opencode mcp auth asana
opencode mcp list
The first command opens Asana's consent page. After signing in, opencode mcp list should show asana as connected.
You can also ask opencode:
What are my open tasks in Asana?
If authentication fails, check that the redirect URL registered in Asana matches the config exactly and that the MCP app is available to your workspace. If the server is missing, check that the credentials are exported in the environment of the opencode process and that you used the config format for your version.
