mylocation-mcp
by yhwancha
This is a Model Context Protocol (MCP) server implementation that provides location services. It demonstrates how to build an MCP server using TypeScript with real-world functionality for location lookups via coordinates or IP addresses.
Last updated: N/A
What is mylocation-mcp?
This is a TypeScript-based MCP server that provides location services. It allows users to look up location information using either coordinates or IP addresses, leveraging external APIs like IPInfo.io.
How to use mylocation-mcp?
To use this server, you need to install the package, configure an IPInfo.io API token in a .env
file, and then import and use the McpServer
class in your code. The server provides tools for getting location by coordinates, IP address, and a health check endpoint. You can integrate it into your project using the provided MCP server configuration.
Key features of mylocation-mcp
TypeScript configuration
Complete MCP server setup
Coordinate-based location lookup
IP-based location lookup (using IPInfo.io)
Health check endpoint
Use cases of mylocation-mcp
Integrating location services into applications
Building location-aware features
Geographic data analysis
IP address geolocation
FAQ from mylocation-mcp
What is the purpose of the IPINFO_TOKEN?
What is the purpose of the IPINFO_TOKEN?
The IPINFO_TOKEN is required to authenticate with the IPInfo.io API, which is used for IP-based location lookups.
What dependencies are required for this server?
What dependencies are required for this server?
This server depends on @modelcontextprotocol/sdk
, zod
, axios
, dotenv
, and TypeScript development tools.
How do I contribute to this project?
How do I contribute to this project?
You can contribute by cloning the repository, installing dependencies, setting up environment variables, building the project, and submitting pull requests with your changes.
What is the format of the responses returned by the tools?
What is the format of the responses returned by the tools?
All tools return responses in a JSON format with a content
array containing a JSON string with the response data. The response data includes a status
, source
, data
, and error
field.
What type of license is this project under?
What type of license is this project under?
This project is licensed under the MIT license.