A personal MCP (Model Context Protocol) server for securely storing and accessing API keys across projects using the macOS Keychain. 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: - Store API keys securely (they're never visible in .env files or config files) - Access the same keys across multiple pr
Add this skill
npx mdskills install Jktfe/servemyapiWell-documented MCP server for secure API key management via macOS Keychain with clear setup
1# ServeMyAPI23[](https://smithery.ai/server/@Jktfe/servemyapi)45A personal MCP (Model Context Protocol) server for securely storing and accessing API keys across projects using the macOS Keychain.67> **IMPORTANT**: ServeMyAPI is a macOS-specific tool that relies on the macOS Keychain for secure storage. It is not compatible with Windows or Linux operating systems. See the security notes section for more details.89## Overview1011ServeMyAPI allows you to store API keys securely in the macOS Keychain and access them through a consistent MCP interface. This makes it easy to:1213- Store API keys securely (they're never visible in .env files or config files)14- Access the same keys across multiple projects15- Use natural language to store and retrieve keys (when used with LLMs like Claude)16- Provide keys directly to your AI assistant when it needs to access services1718## Why ServeMyAPI over .ENV Files?1920Using ServeMyAPI instead of traditional .ENV files solves several common problems:21221. **GitHub Security Conflicts**:23 - .ENV files need to be excluded from Git repositories for security (via .gitignore)24 - This creates a "hidden context" problem where important configuration is invisible to collaborators and LLMs25 - New developers often struggle with setting up the correct environment variables26272. **LLM Integration Challenges**:28 - LLMs like Claude can't directly access your .ENV files due to security constraints29 - When LLMs need API keys to complete tasks, you often need manual workarounds30 - ServeMyAPI lets your AI assistant request keys through natural language31323. **Cross-Project Consistency**:33 - With .ENV files, you typically need to duplicate API keys across multiple projects34 - When keys change, you need to update multiple files35 - ServeMyAPI provides a central storage location accessible from any project3637This approach gives you the best of both worlds: secure storage of sensitive credentials without sacrificing visibility and accessibility for your AI tools.3839## Features4041- Secure storage of API keys in the macOS Keychain42- Simple MCP tools for storing, retrieving, listing, and deleting keys43- Convenient CLI interface for terminal-based key management44- Support for both stdio and HTTP/SSE transports45- Compatible with any MCP client (Claude Desktop, etc.)4647## Installation4849```bash50# Clone the repository51git clone https://github.com/yourusername/servemyapi.git52cd servemyapi5354# Install dependencies55npm install5657# Build the project58npm run build59```6061## Usage6263### CLI Interface6465ServeMyAPI comes with a command-line interface for quick key management directly from your terminal:6667```bash68# Install the CLI globally69npm run build70npm link7172# List all stored API keys73api-key list7475# Get a specific API key76api-key get github_token7778# Store a new API key79api-key store github_token ghp_123456789abcdefg8081# Delete an API key82api-key delete github_token8384# Display help85api-key help86```8788### Running as a stdio server8990This is the simplest way to use ServeMyAPI as an MCP server, especially when working with Claude Desktop:9192```bash93npm start94```9596### Running as an HTTP server9798For applications that require HTTP access:99100```bash101node dist/server.js102```103104This will start the server on port 3000 (or the port specified in the PORT environment variable).105106### Using Smithery107108ServeMyAPI is available as a hosted service on [Smithery](https://smithery.ai/server/@Jktfe/servemyapi).109110```javascript111import { createTransport } from "@smithery/sdk/transport.js"112113const transport = createTransport("https://server.smithery.ai/@Jktfe/servemyapi")114115// Create MCP client116import { Client } from "@modelcontextprotocol/sdk/client/index.js"117118const client = new Client({119 name: "Test client",120 version: "1.0.0"121})122await client.connect(transport)123124// Use the server tools with your LLM application125const tools = await client.listTools()126console.log(`Available tools: ${tools.map(t => t.name).join(", ")}`)127```128129For more details, see the [Smithery API documentation](https://smithery.ai/server/@Jktfe/servemyapi/api).130131### Configuring MCP Clients132133ServeMyAPI works with any MCP-compatible client. Example configuration files are provided in the `examples` directory.134135#### Claude Desktop136137To use ServeMyAPI with Claude Desktop:1381391. Locate or create the Claude Desktop configuration file:140 - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`141 - **Windows**: `%AppData%\Claude\claude_desktop_config.json`1421432. Add ServeMyAPI to the `mcpServers` section (you can copy from `examples/claude_desktop_config.json`):144 ```json145 {146 "mcpServers": {147 "serveMyAPI": {148 "command": "node",149 "args": [150 "/ABSOLUTE/PATH/TO/servemyapi/dist/index.js"151 ]152 }153 }154 }155 ```1561573. Replace `/ABSOLUTE/PATH/TO/servemyapi` with the actual path to your ServeMyAPI installation.1584. Restart Claude Desktop.159160#### Windsurf161162To use ServeMyAPI with Windsurf:1631641. Open Windsurf editor and navigate to Settings1652. Add ServeMyAPI to your MCP server configuration using the example in `examples/windsurf_config.json`1663. Adapt the paths to your local installation167168## MCP Tools169170ServeMyAPI exposes the following tools:171172### store-api-key173174Store an API key in the keychain.175176Parameters:177- `name`: The name/identifier for the API key178- `key`: The API key to store179180Example (from Claude):181```182Using serveMyAPI, store my API key ABC123XYZ as "OpenAI API Key"183```184185### get-api-key186187Retrieve an API key from the keychain.188189Parameters:190- `name`: The name/identifier of the API key to retrieve191192Example (from Claude):193```194Using serveMyAPI, get the API key named "OpenAI API Key"195```196197### delete-api-key198199Delete an API key from the keychain.200201Parameters:202- `name`: The name/identifier of the API key to delete203204Example (from Claude):205```206Using serveMyAPI, delete the API key named "OpenAI API Key"207```208209### list-api-keys210211List all stored API keys.212213No parameters required.214215Example (from Claude):216```217Using serveMyAPI, list all my stored API keys218```219220## Security Notes221222- All API keys are stored securely in the macOS Keychain223- Keys are only accessible to the current user224- The keychain requires authentication for access225- No keys are stored in plaintext or logged anywhere226227## Roadmap228229Future plans for ServeMyAPI include:230231- **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.232233- **Cross-Platform Support**: Investigating secure credential storage options for Windows and Linux to make ServeMyAPI more widely accessible.234235- **Integration with Popular Frameworks**: Providing easy integration with frameworks like Next.js, Express, and others.236237- **UI for Key Management**: A simple web interface for managing your stored API keys directly.238239Feel free to suggest additional features or contribute to the roadmap by opening an issue or pull request.240241## Development242243```bash244# Run in development mode with hot reload245npm run dev246247# Use the CLI during development248npm run cli list249250# Lint the code251npm run lint252253# Build for production254npm run build255```256257## License258259MIT
Full transparency — inspect the skill content before installing.