A community-driven registry for the Claude Code ecosystem. Not affiliated with Anthropic.
Are you the author? Sign in to claim
serveMyAPI
A personal MCP (Model Context Protocol) server for securely storing and accessing API keys across projects using the macOS Keychain.
🔒 SECURITY FIRST: ServeMyAPI is designed to run LOCALLY on your machine. API keys are NEVER transmitted over the internet and should NEVER be deployed to cloud services. Read the critical security guidelines before using.
Cross-Platform Support: ServeMyAPI now includes a storage abstraction layer that enables support for multiple platforms:
- macOS: Uses the native Keychain (default)
- Windows/Linux: Uses encrypted file storage
- Docker: Automatically uses encrypted file storage
- Memory: Available for testing and temporary storage
ServeMyAPI allows you to store API keys securely in the macOS Keychain and access them through a consistent MCP interface. This makes it easy to:
Using ServeMyAPI instead of traditional .ENV files solves several common problems:
GitHub Security Conflicts:
LLM Integration Challenges:
Cross-Project Consistency:
This approach gives you the best of both worlds: secure storage of sensitive credentials without sacrificing visibility and accessibility for your AI tools.
# Clone the repository
git clone https://github.com/yourusername/servemyapi.git
cd servemyapi
# Install dependencies
npm install
# Build the project
npm run build
ServeMyAPI comes with a command-line interface for quick key management directly from your terminal:
# Install the CLI globally
npm run build
npm link
# List all stored API keys
api-key list
# Get a specific API key
api-key get github_token
# Store a new API key
api-key store github_token ghp_123456789abcdefg
# Delete an API key
api-key delete github_token
# Display help
api-key help
This is the simplest way to use ServeMyAPI as an MCP server, especially when working with Claude Desktop:
npm start
For applications that require HTTP access:
node dist/server.js
This will start the server on port 3000 (or the port specified in the PORT environment variable).
DO NOT USE THE SMITHERY HOSTED VERSION for storing real API keys. The Smithery deployment exists for demonstration purposes only. Using it would:
ServeMyAPI is designed to run LOCALLY on your machine only. The entire security model depends on keys never leaving your local environment.
ServeMyAPI works with any MCP-compatible client. Example configuration files are provided in the examples directory.
To use ServeMyAPI with Claude Desktop:
Locate or create the Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%AppData%\Claude\claude_desktop_config.jsonAdd ServeMyAPI to the mcpServers section (you can copy from examples/claude_desktop_config.json):
{
"mcpServers": {
"serveMyAPI": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/servemyapi/dist/index.js"
]
}
}
}
Replace /ABSOLUTE/PATH/TO/servemyapi with the actual path to your ServeMyAPI installation.
Restart Claude Desktop.
To use ServeMyAPI with Windsurf:
examples/windsurf_config.jsonServeMyAPI exposes the following tools:
Store an API key in the keychain.
Parameters:
name: The name/identifier for the API keykey: The API key to storeExample (from Claude):
Using serveMyAPI, store my API key ABC123XYZ as "OpenAI API Key"
Retrieve an API key from the keychain.
Parameters:
name: The name/identifier of the API key to retrieveExample (from Claude):
Using serveMyAPI, get the API key named "OpenAI API Key"
Delete an API key from the keychain.
Parameters:
name: The name/identifier of the API key to deleteExample (from Claude):
Using serveMyAPI, delete the API key named "OpenAI API Key"
List all stored API keys.
No parameters required.
Example (from Claude):
Using serveMyAPI, list all my stored API keys
ServeMyAPI automatically selects the best storage provider for your platform:
You can override the automatic detection:
# Force a specific storage type
export SERVEMYAPI_STORAGE_TYPE=file # or 'keychain', 'memory'
# Configure file storage location
export STORAGE_DIR=/path/to/secure/directory
Keychain Storage (macOS only)
File Storage (Cross-platform)
~/.servemyapi/keys.json.enc by defaultENCRYPTION_KEY environment variableMemory Storage (Testing)
When using the HTTP/SSE transport:
# Set authentication key
export SERVEAPI_AUTH_KEY="your-secure-api-key"
# Set encryption key for Docker
export ENCRYPTION_KEY="your-encryption-key"
# Configure CORS origins
export ALLOWED_ORIGINS="https://app1.com,https://app2.com"
Include the Bearer token in requests:
Authorization: Bearer your-secure-api-key
openssl rand -base64 32 to generateFor detailed security configuration, see docs/SECURITY.md.
Future plans for ServeMyAPI include:
Code Scanner Tool: A tool that automatically scans your codebase for API endpoints, sensitive URLs, and environment variables, then suggests names to store them in the Keychain. This would allow developers to continue using .ENV files in their regular workflow while ensuring credentials are also available to LLMs and other tools when needed.
Cross-Platform Support: Investigating secure credential storage options for Windows and Linux to make ServeMyAPI more widely accessible.
Integration with Popular Frameworks: Providing easy integration with frameworks like Next.js, Express, and others.
UI for Key Management: A simple web interface for managing your stored API keys directly.
Feel free to suggest additional features or contribute to the roadmap by opening an issue or pull request.
# Run in development mode with hot reload
npm run dev
# Use the CLI during development
npm run cli list
# Lint the code
npm run lint
# Build for production
npm run build
MIT
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
MCP server integration for DaVinci Resolve Studio
Secure MCP server for MySQL database interaction, queries, and schema management