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.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
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>"
}
}
}
}需要的环境变量
GRANTD_API_KEY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。