Get AgentStack working in ChatGPT in a few steps.
Flow: Create an anonymous project (no account) → get API key → add key in Custom GPT Action → use 60+ tools in chat. The MCP server allows GET /mcp/tools and projects.create_project_anonymous without X-API-Key so you can get a key first.
You can connect AgentStack to Custom GPT in two modes:
- Mode A — API Key (fastest setup, service-to-service style)
- Mode B — OAuth2 (user sign-in via AgentStack account)
Option A — No account (try first):
- Create an anonymous project to get keys (no signup). From a terminal:
curl -X POST https://agentstack.tech/mcp/tools/projects.create_project_anonymous \
-H "Content-Type: application/json" \
-d '{"params": {"name": "My GPT Project"}}'- From the JSON response, copy
user_api_key(orapi_key/project_api_key) — you will use it as the API key in Step 3.
Option B — With account:
- Sign in at AgentStack and create a project.
- In the project settings, create an API key.
- Use that key in Step 3.
- In ChatGPT, go to Explore → Create a GPT (or chat.openai.com → Create).
- In Configure, set Name (e.g. "AgentStack") and Description (e.g. "Create and manage AgentStack projects, API keys, and stats via the AgentStack backend.").
- In the Custom GPT editor, open Actions.
- Under Schema, paste the contents of
openapi/agentstack-mcp.yamlfrom this repo, or use a URL if you host the schema (e.g. raw GitHub link to the YAML file).- If pasting: ensure the schema uses server URL
https://agentstack.techand pathPOST /mcpas in the provided file.
- If pasting: ensure the schema uses server URL
- Under Authentication, choose API Key.
- Header name:
X-API-Key - Key: paste the API key from Step 1.
- Header name:
- Open Instructions in the Custom GPT editor.
- Copy the full text from GPT_INSTRUCTIONS.md (the block under "Copy the block below") and paste it into the Instructions field.
- Save the Custom GPT (e.g. "Only me" or share as needed).
- In chat, try:
- "Create a new project called Test App"
- "List my AgentStack projects"
- "Get stats for project 1025"
The GPT will call the AgentStack action with the right tool name and params.
Use this mode if you want users to click Sign in with AgentStack in your Custom GPT.
- Create or request OAuth client credentials (
client_id,client_secret) in AgentStack ecosystem. - Add your GPT callback URI to allowed redirect URIs, e.g.:
https://chat.openai.com/aip/g-<GPT_ID>/oauth/callback- or approved wildcard for trusted ecosystem clients.
- In Custom GPT editor → Actions → use the same schema
openapi/agentstack-mcp.yaml. - Under Authentication, choose OAuth and set:
- Authorization URL:
https://agentstack.tech/api/oauth2/authorize - Token URL:
https://agentstack.tech/api/oauth2/token - Client ID / Secret: from B1
- Authorization URL:
- Save and test sign-in in the GPT chat.
When submitting your app, OpenAI may ask you to justify the annotations for each tool (readOnlyHint, openWorldHint, destructiveHint, idempotentHint). Copy-paste text for each tool from:
- TOOL_JUSTIFICATIONS.md — one justification block per tool; use the "Justification" paragraph for the tool name that matches the form.
For all 60+ tools (Projects, Auth, Payments, Scheduler, Analytics, Rules, Webhooks, Notifications, Wallets), see:
- MCP Server Capabilities (in the AgentStack repo)
If you run the MCP server yourself, change the server URL in the OpenAPI schema (or use a schema that points to your server, e.g. https://your-host/mcp). Authentication (API key in header X-API-Key) is still required.
When adding or verifying the Action, OpenAI may show "Tool scan failed: Internal service error". This is a known issue; see OpenAI Community. Our MCP server returns 200 OK on the full verification sequence (initialize, tools/list, notifications/initialized), so the failure can be intermittent on OpenAI’s side.
Live check: From the repo you can run the scanner-sequence script to confirm the server responds as expected: python agentstack-core/scripts/mcp_gpt_scan_live_test.py (optionally with a different base URL).
What to do:
- Retry — Run verification again; it often succeeds on a second or third try.
- Server URL — Use exactly
https://agentstack.tech/mcpas the MCP/server base. Do not add paths like/toolsor/mcp/tools. - OAuth (Mode B) — If using OAuth for the Action, set:
- Authorization URL:
https://agentstack.tech/mcp/.well-known/oauth-authorize - Token URL:
https://agentstack.tech/mcp/.well-known/oauth-tokenUse the same Client ID/Secret as for the ecosystem; ensure your GPT’s callback URI is in the allowed redirect URIs.
- Authorization URL: