MCP Shipyard
← Guides

Build a remote MCP server for maps and geo: tools, auth and review-ready metadata

Design a remote MCP server for maps and geo: geocoding, nearby search and routing tools, auth, a TypeScript example and checks.

maps-geotoolsauthsubmissionleaderboardtypescript

Build a remote MCP server for maps and geo

Short answer: a maps server needs one tool per job (geocode, reverse geocode, nearby search, route), no authentication for public geodata, bounded results and descriptions that state the geography covered, the coordinate order and the units.

Basis: the MCP specification, the official TypeScript SDK docs (v2, package @modelcontextprotocol/server, read 2026-12-04) and our scanner rule pages. Tool sets are our recommendation, not a requirement. Anything marked (unverified) is not confirmed in those sources.

Separate tools by job, and bound radii and result counts.

geocode_address

  • Title: Geocode an address
  • Description: see the example below.
  • Input: address string, required; limit integer 1 to 5
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

reverse_geocode

  • Title: Reverse geocode
  • Description: "Use this to find the address at a latitude and longitude, given as decimal degrees (latitude first)."
  • Input: latitude number -90 to 90, longitude number -180 to 180, both required
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

search_nearby

  • Title: Search nearby places
  • Description: "Use this to list places of one category within a radius of a point, nearest first. Returns name, category, distance in meters and coordinates."
  • Input: latitude, longitude numbers; category enum; radius_m integer 100 to 5000; limit integer 1 to 20
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

get_route

  • Title: Get a route
  • Description: "Use this for travel distance and time between two points by car, bike or foot. Returns meters and seconds."
  • Input: origin, destination objects with latitude, longitude; mode enum driving, cycling, walking
  • Annotations: readOnlyHint true, destructiveHint false, openWorldHint false

Annotations are hints, not security (see annotations explained). Here openWorldHint is true only where a tool reaches arbitrary outside parties, and false for a fixed domain. Each reads a fixed geodata source, so all four are read-only and closed-domain.

Auth

Recommendation: no authentication. This is public read-only data, which the checks accept. Hold any upstream key on your server so no user ever types one (schema.secret-param). Add no write tools to a no-auth server, because auth.write-tools-unauthenticated warns when it lists create, update or delete tools. Without sign-in your protection is rate limiting and bounded results; see rate limits and 429s.

Transport

Serve Streamable HTTP on one HTTPS path such as https://mcp.example.com/mcp (auth.https). In the v2 SDK, createMcpHandler(factory) builds a fresh McpServer for every request, so the endpoint is stateless and needs no sticky sessions (sessions and serverless). The handler checks no Host, Origin or token itself, so put those checks in front of it. Still on SSE? See the migration guide. Keep the handshake fast (latency.handshake).

Minimal TypeScript example

This targets SDK v2; coming from v1, use the SDK's migration guide. In v2 inputSchema is a z.object(...). Replace lookup with your own code.

import { createMcpHandler, McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod/v4';

const handler = createMcpHandler(() => {
  const server = new McpServer({ name: 'acme-geo', version: '1.0.0' });
  server.registerTool(
    'geocode_address',
    {
      title: "Geocode an address",
      description:
        "Use this to convert a street address or place name to coordinates. Returns up to 5 matches with formatted address, latitude, longitude and confidence. Covers Canada only. For the reverse direction use reverse_geocode.",
      inputSchema: z.object({
        address: z.string().describe('Street address or place name'),
        limit: z.number().int().min(1).max(5).default(3)
      }),
      annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false }
    },
    async (args) => {
      const result = await lookup(args); // your upstream call
      if (!result) return { isError: true, content: [{ type: 'text', text: 'No match. Add a city or postal code to the address.' }] };
      return { content: [{ type: 'text', text: JSON.stringify(result) }] };
    }
  );
  return server;
});

export default handler; // web-standard runtimes; wrap with toNodeHandler on Node

Keep coordinate order and units in the description and in each parameter.

Errors, size and speed

Return isError: true with text that says what was wrong and how to fix it; messages such as "Internal Server Error" fail review (errors.unhelpful-message). Reviewers run every tool with valid input and reject failures (errors.fixture-failed). Keep a call under 3 seconds where you can: the scanner warns above 3 and fails above 15 (latency.tool-call). For slower work see tool timeouts, cap result size (response size limits) and never echo keys or tokens in output (errors.secrets-in-output). Run the same calls in CI so a regression never reaches review.

Getting models to pick your tools

The leaderboard method shows the model every tool in the category as a function named <server>__<tool>, with your description and input schema, and records the first tool it calls. Your name, description and schema are the whole pitch. In the December 4 2026 run, 15.7% (17 of 108) of maps and geo trials ended with no tool called. Maps prompts mix addresses, places and distances, so the verb in the name matters (geocode_address, search_nearby, get_route). Say the geography you cover; a tool that claims the world but answers one country wastes calls. Bounded numbers in the schema (radius, limit) tell the model what is valid without prose. Limits apply: the harness is offline, uses one model family, and measures selection, not correct answers. Rewrite method and prompt sets are in writing tool descriptions models pick; write about your own task and sibling tools, never about other servers (desc.injection-directive).

Pitfalls our rules catch

Submission checklist

Check your server against these rules at https://mcpshipyard.com/scan.

Check your server against these rules

Scan runs the checks from this guide against a live URL and lists each failing rule with its fix.

Scan a server