Back to Directory/Developer Tools

io.github.kozmos-tech/contactapi

An open-source API for collecting and managing contacts and signups.

Developer ToolsTypeScriptv0.1.1

contactapi

An open-source API to save contacts. Send a POST with an email and any other JSON fields you want, and they get saved as-is. Manage them with simple CRUD.

Built with Hono and deployed on Vercel.

API overview

The base URL is https://contactapi.dev and every request carries your API key as a Bearer token:

Authorization: Bearer YOUR_KEY
MethodPathKeyDescription
POST/v1/contactssecret or publishableCreate (or upsert) a contact by email
GET/v1/contactssecretList contacts, paginated
GET/v1/contacts/:idsecretFetch a single contact
PATCH/v1/contacts/:idsecretUpdate a contact
DELETE/v1/contacts/:idsecretDelete a contact

Contacts are keyed by email — creating one whose email already exists updates it in place rather than duplicating it. Full reference lives on the landing page and in /llms.txt.

There are two kinds of key:

  • ck_secret_… — secret key, for your backend. Full access to every endpoint.
  • ck_pub_… — publishable key, for the browser. Can only create contacts and is locked to your domains.

MCP server

AI clients (Claude Desktop, claude.ai custom connectors, Cursor, the MCP Inspector) can manage your contacts through an MCP server at:

https://contactapi.dev/mcp

Auth is OAuth 2.1 with dynamic client registration — point a client at the URL and it discovers the authorization server, registers itself, and sends you to log in and approve access; no API key to copy. The server exposes five tools that mirror the REST API: list_contacts, get_contact, create_contact (upsert-by-email), update_contact, and delete_contact. Everything is scoped to the account you log in as.

The OAuth provider is Better Auth's mcp plugin (src/auth.ts); the tools and endpoint wiring live in src/mcp/server.ts and src/index.ts.

Development

Prerequisites: Vercel CLI installed globally.

npm install
vc dev
open http://localhost:3000

Build

npm install
vc build

Deploy

npm install
vc deploy

License

MIT

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y @kozmos-tech/contactapi

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-kozmos-tech-contactapi": {
      "command": "npx",
      "args": [
        "-y",
        "@kozmos-tech/contactapi"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

@kozmos-tech/contactapinpm

Compatible MCP Clients

io.github.kozmos-tech/contactapi works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More