Agents
AI agents connected through the MCP server (OAuth). The dashboard approves and disconnects them; agents use https://api.marsial.dev/mcp.
See who asks for access
Section titled “See who asks for access”/v1/oauth/requests/{id}Dashboard only. The id comes from the request parameter of the consent page; requests last 10 minutes.
Parameters
idstringrequired
Response 200
data
clientNamestringrequiredThe name the agent registered with.
redirectHoststringrequiredWhere the user goes back to after deciding.
workspaceNamestringrequired
curl "https://api.marsial.dev/v1/oauth/requests/authz_…" \ -H "Authorization: Bearer $MARSIAL_API_KEY"const res = await fetch('https://api.marsial.dev/v1/oauth/requests/authz_…', { headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});const { data } = await res.json();import os, requests
res = requests.get( "https://api.marsial.dev/v1/oauth/requests/authz_…", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)data = res.json()["data"]Let the agent in
Section titled “Let the agent in”/v1/oauth/requests/{id}/approveDashboard only. The agent acts as the caller, with their role, until disconnected.
Parameters
idstringrequired
Response 200
data
redirectTostringrequiredSend the browser here: the agent gets a code or an error.
curl -X POST "https://api.marsial.dev/v1/oauth/requests/authz_…/approve" \ -H "Authorization: Bearer $MARSIAL_API_KEY"const res = await fetch('https://api.marsial.dev/v1/oauth/requests/authz_…/approve', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});const { data } = await res.json();import os, requests
res = requests.post( "https://api.marsial.dev/v1/oauth/requests/authz_…/approve", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)data = res.json()["data"]Refuse the agent
Section titled “Refuse the agent”/v1/oauth/requests/{id}/denyDashboard only.
Parameters
idstringrequired
Response 200
data
redirectTostringrequiredSend the browser here: the agent gets a code or an error.
curl -X POST "https://api.marsial.dev/v1/oauth/requests/authz_…/deny" \ -H "Authorization: Bearer $MARSIAL_API_KEY"const res = await fetch('https://api.marsial.dev/v1/oauth/requests/authz_…/deny', { method: 'POST', headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});const { data } = await res.json();import os, requests
res = requests.post( "https://api.marsial.dev/v1/oauth/requests/authz_…/deny", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)data = res.json()["data"]List connected agents
Section titled “List connected agents”/v1/oauth/grantsDashboard only.
Response 200
data []
idstringrequiredclientNamestringrequiredcreatedAtstring (date-time)requiredlastUsedAtstring (date-time)The last day the agent called Marsial.
yoursbooleanrequiredWhether the caller let it in.
curl "https://api.marsial.dev/v1/oauth/grants" \ -H "Authorization: Bearer $MARSIAL_API_KEY"const res = await fetch('https://api.marsial.dev/v1/oauth/grants', { headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});const { data } = await res.json();import os, requests
res = requests.get( "https://api.marsial.dev/v1/oauth/grants", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)data = res.json()["data"]Disconnect an agent
Section titled “Disconnect an agent”/v1/oauth/grants/{id}Dashboard only. Its tokens stop working at once. Members disconnect their own; owners and admins any.
Parameters
idstringrequired
Response 204
No content
curl -X DELETE "https://api.marsial.dev/v1/oauth/grants/grt_5k2j8h" \ -H "Authorization: Bearer $MARSIAL_API_KEY"await fetch('https://api.marsial.dev/v1/oauth/grants/grt_5k2j8h', { method: 'DELETE', headers: { Authorization: `Bearer ${process.env.MARSIAL_API_KEY}`, },});import os, requests
requests.delete( "https://api.marsial.dev/v1/oauth/grants/grt_5k2j8h", headers={"Authorization": f"Bearer {os.environ['MARSIAL_API_KEY']}"},)© 2026 Marsial by TWOFACES ·marsial.dev ·Dashboard ·soporte@twofacesco.com