OAuth-for-agents: an MCP-native OAuth token broker that lets AI agents act on a user's behalf across third-party APIs. TypeScript & Python SDKs.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add grantd --env GRANTD_API_KEY='<GRANTD_API_KEY>' -- npx -y grantd-mcp~/.codex/config.toml
[mcp_servers.grantd]
command = "npx"
args = ["-y", "grantd-mcp"]
env = { GRANTD_API_KEY = "<GRANTD_API_KEY>" }
# codex mcp add grantd --env GRANTD_API_KEY='<GRANTD_API_KEY>' -- npx -y grantd-mcp~/.cursor/mcp.json
{
"mcpServers": {
"grantd": {
"command": "npx",
"args": [
"-y",
"grantd-mcp"
],
"env": {
"GRANTD_API_KEY": "<GRANTD_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"grantd": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"grantd-mcp"
],
"env": {
"GRANTD_API_KEY": "<GRANTD_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"grantd": {
"command": "npx",
"args": [
"-y",
"grantd-mcp"
],
"env": {
"GRANTD_API_KEY": "<GRANTD_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"grantd": {
"command": "npx",
"args": [
"-y",
"grantd-mcp"
],
"env": {
"GRANTD_API_KEY": "<GRANTD_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"grantd": {
"command": "npx",
"args": [
"-y",
"grantd-mcp"
],
"env": {
"GRANTD_API_KEY": "<GRANTD_API_KEY>"
}
}
}
}Environment variables
GRANTD_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.