Social Media Post: Linkedin

Mappedin MCP Server and the navigation agent built on top of it are closely aligned with the Mappedin Grocery Demo Map.
You can view the demo map here:
https://app.mappedin.com/map/6679882a8298d5000b85ee89?floor=m_f62f718116360827

The Stock Tracker MCP Server also includes items that match the layout and content of this demo map.

If users want to work with a new or custom map they will need to use Mappedin services to generate and integrate that map properly.

Mappedin MCP Server πŸ—ΊοΈ

A Model Context Protocol (MCP) server that provides indoor navigation capabilities using the Mappedin API. This server enables AI agents to help users navigate indoor spaces such as shopping malls, airports, hospitals, and other large buildings.

🎯 Overview

This MCP server acts as a bridge between AI agents and the Mappedin indoor mapping platform, allowing users to receive turn-by-turn navigation instructions within indoor environments. The server maintains user location state and provides natural language directions that can be easily consumed by voice assistants or chatbots.

πŸŽ₯ Demo

Watch the server in action:

Demo Video

✨ Key Features

🧭 Indoor Navigation

πŸ” Smart Location Search

The server intelligently searches for destinations across multiple location types:

πŸ“ Location State Management

πŸŽ™οΈ Voice-Friendly Output

Navigation instructions are formatted for optimal voice delivery:

πŸ—οΈ Architecture

Technology Stack

Core Components

1. MCP Server (server.ts)

2. Navigation Tool (tool.ts)

3. Utilities (utils.ts)

πŸš€ Getting Started

Prerequisites

Installation

# Clone the repository
git clone <repository-url>
cd mappedin-mcp-server

# Install dependencies
npm install
# or
bun install

Configuration

Set the following environment variables (optional - defaults to demo credentials):

MAPPEDIN_API_KEY=your_api_key
MAPPEDIN_API_SECRET=your_api_secret
MAPPEDIN_MAP_ID=your_map_id
BL_SERVER_PORT=8000
BL_SERVER_HOST=0.0.0.0

Note: The server includes demo credentials for testing purposes. See Mappedin Demo API Keys for terms and conditions.

Running the Server

# Using Bun
bun run server.ts

# Using Node.js with ts-node
npx ts-node server.ts

The server will start on http://0.0.0.0:8000/mcp (or your configured host/port).

πŸ“‘ API Reference

MCP Tool: getMapInstructions

Retrieves navigation instructions from the user's current location to a specified destination.

Input Schema

{
  destination: string  // Name of the destination (min: 1, max: 100 characters)
}

Output

{
  "content": [
    {
      "type": "text",
      "text": "{\"totalDistance\": 45, \"voiceDirections\": \"Here are your directions: Begin walking. Turn left. Walk 20 meters. Take the elevator to change floors. Exit the elevator. Walk 15 meters. You have reached your destination.\"}"
    }
  ]
}

Response Fields

Special Cases

πŸ’‘ Usage Examples

Example 1: Navigate to a Store

{
  "destination": "Apple Store"
}

Response:

{
  "totalDistance": 120,
  "voiceDirections": "Here are your directions: Begin walking. Turn right. Walk 50 meters. Turn left. Walk 70 meters. You have reached your destination."
}

Example 2: Multi-floor Navigation

{
  "destination": "Food Court"
}

Response:

{
  "totalDistance": 85,
  "voiceDirections": "Here are your directions: Begin walking. Walk 30 meters. Take the escalator to change floors. Exit the escalator. Turn right. Walk 40 meters. You have reached your destination."
}

Example 3: Already at Destination

{
  "destination": "Entrance"
}

Response:

{
  "totalDistance": 0,
  "voiceDirections": "You are already at the destination."
}

πŸ”§ Integration with AI Agents

This MCP server is designed to be used by AI agents to provide indoor navigation assistance. Here's how it works:

  1. Agent receives user request: "How do I get to the Apple Store?"
  2. Agent calls MCP tool: getMapInstructions({ destination: "Apple Store" })
  3. Server processes request:
    • Retrieves current location from storage
    • Searches for "Apple Store" in the venue
    • Calculates route using Mappedin API
    • Formats directions for voice output
    • Updates current location to "Apple Store"
  4. Agent receives response: Voice-friendly navigation instructions
  5. Agent delivers to user: Via text-to-speech or chat interface

πŸ—‚οΈ Location State Persistence

The server maintains user location state in current-location.json:

{
  "currentLocation": "Apple Store"
}

🌐 Deployment

Docker Support

# Dockerfile included in repository
docker build -t mappedin-mcp-server .
docker run -p 8000:8000 mappedin-mcp-server

Blaxel Deployment

The server is configured for deployment on Blaxel with blaxel.toml:

[server]
port = 8000

πŸ› οΈ Development

Project Structure

mappedin-mcp-server/
β”œβ”€β”€ server.ts           # MCP server setup and Express app
β”œβ”€β”€ tool.ts             # Navigation tool implementation
β”œβ”€β”€ utils.ts            # Helper functions and formatters
β”œβ”€β”€ package.json        # Dependencies and scripts
β”œβ”€β”€ tsconfig.json       # TypeScript configuration
β”œβ”€β”€ Dockerfile          # Container configuration
└── blaxel.toml         # Blaxel deployment config

Key Dependencies

πŸ” Security Considerations

πŸ“ License

See repository license file for details.

πŸ™ Acknowledgments

🀝 Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.


Built with ❀️ for accessible indoor navigation