Skip to content

Instantly share code, notes, and snippets.

@ai2ys
Last active June 5, 2026 11:03
Show Gist options
  • Select an option

  • Save ai2ys/08e9e715264ef59165ef74fbaff005e0 to your computer and use it in GitHub Desktop.

Select an option

Save ai2ys/08e9e715264ef59165ef74fbaff005e0 to your computer and use it in GitHub Desktop.
Agent CLI Setup/Config
#!/usr/bin/env bash
# file location ~/.config/context7-mcp.sh
set -euo pipefail
# The key is stored securely in a separate file.
# `source` reads the file without printing its contents.
# `set -a` ensures that the variables are exported.
set -a
source "$HOME/.config/context7/credentials"
set +a
# Starts Context7.
# This keeps the key out of the process list because it is not passed as a CLI argument.
exec npx -y @upstash/context7-mcp
// ~/.config/mcp/mcp.json # common MCP definition for pi and other JSON-MCP clients
// ~/.codex/config.toml # Codex specific MCP definition
// ~/.pi/agent/mcp.json # in case only pi agents needs a other one
{
"mcpServers": {
"context7": {
"command": "~/.config/context7/context7-mcp.sh",
"startup_timeout_sec": 20
},
"openaiDocs": {
"url": "https://developers.openai.com/mcp"
}
}
}
// {
// "mcpServers": {
// "context7": {
// "command": "bash",
// "args": [
// "-lc",
// "$HOME/.config/context7/context7-mcp.sh"
// ],
// "startup_timeout_sec": 20
// },
// "openaiDocs": {
// "url": "https://developers.openai.com/mcp"
// }
// }
// }
// ~/.pi/agent/settings.json
{
"lastChangelogVersion": "0.78.0",
"defaultProvider": "openai-codex",
"defaultModel": "gpt-5.5",
"defaultThinkingLevel": "low",
"showHardwareCursor": true,
"enableInstallTelemetry": false,
"theme": "light",
"hideThinkingBlock": false,
"packages": [
"npm:toast-meter",
"npm:pi-mcp-adapter"
],
"enabledModels": [
"openai-codex/gpt-5.4",
"openai-codex/gpt-5.5",
"openai-codex/gpt-5.4-mini",
"github-copilot/claude-sonnet-4.6",
"github-copilot/gpt-5.4",
"github-copilot/gpt-5.5",
"github-copilot/gpt-5.4-mini"
],
"terminal": {
"showTerminalProgress": true
},
"enableSkillCommands": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment