Store an API key in the macOS Keychain
Retrieve an API key from the macOS Keychain
List all stored API keys in the macOS Keychain
Delete an API key from the macOS Keychain
ServeMyAPI is a macOS-specific tool that provides secure storage and retrieval of API keys through the macOS Keychain. It eliminates the need for storing sensitive credentials in .env files, allowing developers to access the same keys across multiple projects while maintaining security. With ServeMyAPI, you can use natural language to store and retrieve API keys when working with LLMs like Claude. This solves common problems like hidden context in Git repositories, LLM integration challenges, and cross-project consistency issues when managing API credentials.
ServeMyAPI is a personal Model Context Protocol (MCP) server designed specifically for macOS users who want to securely manage their API keys. By leveraging the macOS Keychain for storage, it provides a secure and convenient way to access credentials across multiple projects without exposing them in configuration files.
To install ServeMyAPI:
Clone the repository:
git clone https://github.com/Jktfe/serveMyAPI.git
cd serveMyAPI
Install dependencies:
npm install
Build the project:
npm run build
Optionally, install the CLI globally:
npm link
ServeMyAPI includes a command-line interface for quick key management:
# 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
For simple integration with tools like Claude Desktop:
npm start
For applications requiring HTTP access:
node dist/server.js
This starts the server on port 3000 (or the port specified in the PORT environment variable).
ServeMyAPI is available as a hosted service on Smithery. You can integrate it with your applications using the Smithery SDK:
import { createTransport } from "@smithery/sdk/transport.js"
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
const transport = createTransport("https://server.smithery.ai/@Jktfe/servemyapi")
const client = new Client({
name: "Test client",
version: "1.0.0"
})
await client.connect(transport)
const tools = await client.listTools()
To use ServeMyAPI with Claude Desktop:
Locate or create the Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
Add ServeMyAPI to the mcpServers
section:
{
"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:
ServeMyAPI is specifically designed for macOS and relies on the macOS Keychain for secure credential storage. It is not compatible with Windows or Linux operating systems. The macOS Keychain provides encrypted storage with access controls tied to your user account, ensuring that your API keys remain protected.