PAL
- typescript
1
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"theonlypal-pal-mcp": {
"command": "npx",
"args": [
"@pal/mcp-server"
]
}
}
}PAL enables you to securely manage API keys across platforms, auto-generate .env files and SDK client code, and integrate with Claude Code through an MCP server. This makes key management safer, faster, and seamless for your development workflow.
How to use
You will interact with the PAL MCP server through an MCP client like Claude Code. Start by initializing PAL in your project, add your API providers, and then generate local environment files and client integrations. PAL stores keys securely in your OS keychain and only reveals keys to your application through generated code and environment variables.
How to install
Prerequisites you already use in development projects include Node.js and npm. Ensure they are installed on your system before proceeding.
# Install PAL command-line interface globally
npm install -g @pal/cli
# Initialize PAL in your project
cd your-project
pal init
# Add an API service (securely stores the key)
pal add-api openai
# Generate .env file and SDK client code
pal generate
# Check overall health and configuration
pal doctor
Configuration and usage tips
PAL automatically detects your framework and recommended environment setup. It stores keys in the OS keychain (macOS Keychain, Windows Credential Manager) and falls back to an AES-256-GCM encrypted keystore if needed. Remember to keep environment files out of version control and verify security with the provided health checks.
MCP Server for Claude Code integration
You can run PAL’s MCP server locally and connect it to Claude Code. Use the explicit MCP configuration shown here to enable the integration.
MCP configuration example
json
{
"mcpServers": {
"pal": {
"command": "npx",
"args": ["@pal/mcp-server"]
}
}
}
MCP tools available
The PAL MCP server exposes a set of tools you can invoke from Claude Code to manage projects, environments, and client code.
- list_projects — List all PAL-registered projects
- inspect_project — Get project details, services, and environment status
- add_api_to_project — Add an API service programmatically
- generate_client_snippets — Get integration code for services
- summarize_env_state — Health check for environment and keystore
Example usage in Claude Code
Use natural-language prompts to interact with PAL through the MCP server, such as adding a provider to a project or generating the corresponding client code.
Security and best practices
Key storage prioritizes the OS keychain for native security with keytar integration. If keychain access isn’t available, PAL falls back to an encrypted keystore at ~/.pal/keystore.enc using AES-256-GCM. Do not commit .env files to version control; PAL automatically updates your .gitignore. Run pal doctor to verify security setup and rotate keys periodically.
Configuration example: pal.config.json
json
{
"projectName": "my-app",
"language": "node",
"framework": "nextjs",
"envFile": ".env.local",
"services": [
{
"id": "openai",
"provider": "openai",
"envVarKey": "OPENAI_API_KEY",
"scopes": ["chat", "embeddings"]
}
]
}
Framework auto-detection
PAL detects common frameworks and package managers to determine where to place environment files and how to generate code. It recognizes Next.js, Express, and TypeScript setups, and adapts to npm, yarn, pnpm, or bun as the package manager.
Packages you’ll use
Core library and tooling are split into multiple packages: @pal/core (keystore and codegen), @pal/cli (command-line interface), and @pal/mcp-server (MCP server for Claude Code).
Development notes
If you contribute, you can clone the MCP repository, install dependencies, build all packages, and run the CLI locally to test initialization and key management workflows.
Examples and starter projects
Starter examples illustrate simple Node.js + OpenAI usage and how PAL generates environment configurations and client code for integration.
Available tools
list_projects
List all PAL-registered projects in the MCP ecosystem and expose basic project metadata.
inspect_project
Retrieve detailed information about a project, including services and environment status.
add_api_to_project
Programmatically attach an API provider to a project, storing keys securely.
generate_client_snippets
Produce integration snippets and client code templates for the configured services.
summarize_env_state
Provide a health check of the current environment and keystore status.