npm geojp-mcpstreamable-httpMITupdated 24d ago
An MCP (Model Context Protocol) server that exposes two Japan-specific geodata APIs as tools for AI agents (Claude Code, Claude Desktop, and other MCP clients):
What can you do with geojp?
geojp-mcp
ๆฅๆฌ่ช็ README ใฏใใกใ
An MCP (Model Context Protocol) server that exposes two Japan-specific geodata APIs as tools for AI agents (Claude Code, Claude Desktop, and other MCP clients):
- ChibanJP โ coordinates โ chiban (ๅฐ็ช, the official cadastral lot number recorded at Japan's Legal Affairs Bureau). Chiban rarely maps predictably to a residential address (ไฝๅฑ ่กจ็คบ) and is not exposed by most general-purpose geocoders.
- ReverseGeoJP โ coordinates โ Japanese address (reverse geocoding / forward geocoding).
Why chiban?
Japan uses two independent addressing systems: the residential address (ไฝๅฑ ่กจ็คบ) that appears on maps and mail, and the chiban โ the cadastral lot number used in property registries, land transactions, and legal documents. The two do not follow a predictable pattern, so converting between them requires a dedicated lookup against registry map data, not a lookup table.
Chiban matters for real estate due diligence, land transaction platforms, and any workflow that touches Japan's registry system โ a growing need as foreign investment in Japanese real estate rises. Most global geocoding APIs do not source chiban directly from registry map data, which is why this exists as a standalone tool.
Tools
| Tool | Backing API | Input | Returns |
|---|---|---|---|
get_parcel |
ChibanJP /parcel |
lat, lon |
Chiban (cadastral lot number), ลaza/aza, municipality, and survey precision class for the containing parcel |
reverse_geocode |
ReverseGeoJP /reverse |
lat, lon |
Nearest residential address (prefecture, municipality, district, postal code) |
geocode |
ReverseGeoJP /geocode |
address |
Up to 10 candidate locations for a partial address match |
lookup_location |
Both, in parallel | lat, lon |
Address and chiban together in one call (an orchestration example โ succeeds with address-only if the point falls outside ChibanJP's current coverage) |
All tools share a single API key. Get one at reversegeojp.com.
Two ways to run it
The tool definitions live in src/tools.ts and are shared by both entry points:
- Local (stdio) โ
src/index.ts. Your MCP client launches it as a child process on your machine. One user, one API key. - Remote (HTTP, Cloudflare Workers) โ
src/worker.ts. Already deployed athttps://mcp.reversegeojp.com; anyone can connect with their own API key, no build step required.
Setup (local/stdio)
npm install -g geojp-mcp
or, from source:
npm install
npm run build
The server reads the API key from the GEOJP_API_KEY environment variable. You normally don't run it directly โ your MCP client starts it as a subprocess (see below).
Register with Claude Code
claude mcp add --scope user geojp -e GEOJP_API_KEY=your-api-key-here -- npx geojp-mcp
--scope user makes it available across all projects on your machine (omit it to register for the current project only). Verify with claude mcp list.
Argument order matters: -e/--env accepts multiple values, so it will swallow subsequent arguments if placed before the server name. Keep the order: add, then the server name, then -e.
Or configure manually in .mcp.json / ~/.claude.json:
{
"mcpServers": {
"geojp": {
"type": "stdio",
"command": "npx",
"args": ["geojp-mcp"],
"env": {
"GEOJP_API_KEY": "your-api-key-here"
}
}
}
}
Register with Claude Desktop
Add the same block to the mcpServers section of claude_desktop_config.json, then restart Claude Desktop. Four tools (reverse_geocode, geocode, get_parcel, lookup_location) become available.
Setup (remote/HTTP)
Connect directly to the hosted server with your own API key โ no install or build required:
claude mcp add --scope user --transport http geojp-remote https://mcp.reversegeojp.com --header "Authorization: Bearer your-api-key-here"
Health check: GET https://mcp.reversegeojp.com/health.
Remote server design notes
- No bindings, stateless: the Worker holds no session state and uses no Durable Objects. Every call reads the API key from the
Authorizationheader and proxies straight through to the ReverseGeoJP/ChibanJP production APIs. This avoids the paid Workers plan that Durable Objects require, so it runs on the same free plan asreverse-geo-jp/chibanjpwith no added infrastructure cost (the more commonMcpAgentpattern fromagents-sdkassumes Durable Objects and a paid plan). - Web Standards transport: uses
@modelcontextprotocol/sdk'sWebStandardStreamableHTTPServerTransport, since the Node-onlyStreamableHTTPServerTransportdepends onhttp.IncomingMessage/ServerResponse, which don't exist in the Workers runtime. - Gotcha:
reversegeojp-client/chibanjp-clientdefault to holding a bare, unboundfetch(this.fetchImpl = options.fetch ?? fetch), which throws "Illegal invocation" on Cloudflare Workers. Fixed by passing an explicitly-boundfetchinto the client constructor options increateGeojpMcpServer()(seeboundFetchinsrc/tools.ts). Also fixed upstream ingeojp-api-clientsv0.1.1 (fetch.bind(globalThis));geojp-mcpdepends on that version, and keeps the localboundFetchas a harmless fallback.
Deploy / local dev
npm run worker:dev # local wrangler dev server (http://127.0.0.1:8787 etc.)
npm run worker:check # typecheck against the Workers tsconfig only
npm run worker:deploy # deploy to production
Smoke test (no API key required โ wiring check only)
npm run smoke-test
Starts the server with a dummy key and confirms the tool list loads and a real API call correctly returns an invalid_api_key error.
Why this exists
ReverseGeoJP/ChibanJP were already running as APIs meant to be called directly by developers reading the docs. This project exposes them as MCP tools so AI agents can discover and call them automatically โ reusing the existing production infrastructure while building hands-on MCP/agent-integration experience.
License
MIT
Install
Add geojp to your client. Pick the one you use.
{
"servers": {
"geojp-mcp": {
"type": "http",
"url": "https://mcp.reversegeojp.com"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add geojp-mcp -- npx -y geojp-mcpcodex mcp add geojp-mcp -- npx -y geojp-mcpamp mcp add geojp-mcp -- npx -y geojp-mcp{
"mcpServers": {
"geojp-mcp": {
"command": "npx",
"args": [
"-y",
"geojp-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"geojp-mcp": {
"command": "npx",
"args": [
"-y",
"geojp-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"geojp-mcp": {
"command": "npx",
"args": [
"-y",
"geojp-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"geojp-mcp": {
"command": "npx",
"args": [
"-y",
"geojp-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"geojp-mcp": {
"command": "npx",
"args": [
"-y",
"geojp-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"geojp-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"geojp-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"geojp-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"geojp-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y geojp-mcpRun `goose configure`, choose **Add Extension โ Command-line Extension**, and paste this command.
3 tools
geojp exposes 3 tools to a connected agent.
- get_parcel
- ChibanJP `/parcel`
- reverse_geocode
- ReverseGeoJP `/reverse`
- lookup_location
- Both, in parallel
Score
76 / 100
Good
- Documentation25/25
- Maintenance19/25
- Trust13/20
- Capability4/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 17 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 3 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint โ no local install
Version history
| Versions | Published |
|---|---|
| 0.1.0Latest | Aug 15, 2026 |