Skip to main content
Glama
Anwani MCP

Anwani MCP

Official
README.md
# Anwani MCP

[![mcptry](https://mcptry.com/badge/io.github.Anwani-app/anwani-mcp)](https://mcptry.com/servers/io.github.Anwani-app/anwani-mcp)

Anwani is a digital addressing platform that gives every physical location a permanent 9-digit address code.

This MCP connects AI agents to Anwani so they can create and manage those codes through OAuth — same account, ownership, and limits.

Create, list, update, share, and delete your Anwani addresses through OAuth, with the same ownership, permissions, and account limits used across Anwani.

Product page: https://9code.app/ai-agents

Sign-in uses Google OAuth + PKCE in the browser — approve once, then the bridge saves the token on this machine.

OAuth client id: `anwani-cursor`

This package is a **connection client only**. It does not contain Firebase project internals, Firestore paths, or server secrets.

## Requirements

- Node.js 18+
- [Cursor](https://cursor.com) (or another MCP client)
- An Anwani account (created automatically during Google consent if you are new)

## Install

```bash
npm install -g anwani-mcp
anwani-mcp-login
```

Or without a global install:

```bash
npx -y anwani-mcp-login
```

What happens:

1. A local callback server starts on this machine
2. Your browser opens the Anwani authorize page
3. You sign in with Google and click **Allow**
4. The browser returns to localhost — the bridge saves the token automatically

No JSON paste. Never paste codes or tokens into chat.

Fallback (rare): `anwani-mcp-login --paste` if loopback is blocked on your network.

## Cursor MCP config

Recommended (always uses the published package):

```json
{
  "mcpServers": {
    "anwani": {
      "command": "npx",
      "args": ["-y", "anwani-mcp"]
    }
  }
}
```

Then open a **new** chat and ask Anwani to create or update an address. Provide a real map pin (coordinates or Maps link) — the agent must not invent a location.

## Tools

| Tool | Needs scope | Notes |
|------|-------------|--------|
| `check_session` | — | Connection status + granted scopes (no internal IDs); legacy name `session` still works |
| `list_addresses` | `address:read` | Your addresses only, newest first |
| `get_address` | `address:read` | One owned address by its 9-digit code |
| `create_address` | `address:create` | Requires `idempotency_key` + real lat/lng from you |
| `patch_address` | `address:update` | Field patch; coordinates locked after create |
| `share_address` | `address:share` | Public `9code.app/code/…` link |
| `delete_address` | `address:delete` | Destructive |

Photo upload is not available via this bridge — use the Anwani app or Telegram for photos.

## Security

- Tokens live in `~/.anwani-mcp/` (never inside this package).
- Access tokens are opaque `anwani_at_…` values.
- Same account quota as the app / Telegram (usually 10 addresses).
- Revoke by running login again (re-consent invalidates prior tokens) or email support@9code.app.

## From source

```bash
git clone https://github.com/Anwani-app/anwani-mcp.git
cd anwani-mcp
node login.mjs
```

## Smoke test

From a clone:

```bash
node smoke.mjs
```

## Publish / directories

See [PUBLISH.md](./PUBLISH.md) for Official MCP Registry, Glama, Smithery, and npm.

- Local (Cursor): `npx -y anwani-mcp` after `anwani-mcp-login`
- Remote: `https://us-central1-nine-code-anwani.cloudfunctions.net/mcpRemote`

## License

MIT

TDQS

A4.6/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a distinct resource+action: session status, list, get, create, patch, share, delete. Descriptions explicitly cross-reference when to use a sibling tool (e.g. list_addresses vs get_address), leaving no plausible confusion.

Naming Consistency5/5

All seven names follow a strict verb_noun snake_case pattern (patch_address, check_session, list_addresses, get_address, create_address, share_address, delete_address). The only quirk is 'patch' instead of 'update', which is internally consistent with the tool's PATCH semantics.

Tool Count5/5

Seven tools is a tight, well-earned set: one per CRUD operation plus share and session check. Nothing feels redundant or missing at this scope.

Completeness4/5

Full lifecycle is covered — create, list, get, patch, delete, share, and auth status — with no dead ends. Minor gaps exist around ancillary resources such as photo management (photos are only mentioned as deleted) and no coordinate update path, though the latter is documented as intentional.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues