{"id":28960243,"url":"https://github.com/lework/mcp-server-ip","last_synced_at":"2025-06-24T01:11:08.893Z","repository":{"id":280791741,"uuid":"943188389","full_name":"lework/mcp-server-ip","owner":"lework","description":"一个基于 Model Context Protocol (MCP) 的服务器，提供 IP 地址归属地查询功能","archived":false,"fork":false,"pushed_at":"2025-03-05T10:01:03.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T10:42:19.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-05T09:59:15.000Z","updated_at":"2025-03-05T10:01:07.000Z","dependencies_parsed_at":"2025-03-05T10:42:22.125Z","dependency_job_id":"dd0350dd-9758-4153-ab04-c4ba8f0a310a","html_url":"https://github.com/lework/mcp-server-ip","commit_stats":null,"previous_names":["lework/mcp-server-ip"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lework/mcp-server-ip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lework%2Fmcp-server-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lework%2Fmcp-server-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lework%2Fmcp-server-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lework%2Fmcp-server-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lework","download_url":"https://codeload.github.com/lework/mcp-server-ip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lework%2Fmcp-server-ip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261584234,"owners_count":23180675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-24T01:11:01.497Z","updated_at":"2025-06-24T01:11:08.884Z","avatar_url":"https://github.com/lework.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Server IP 归属地查询服务器\n\n这是一个基于 Model Context Protocol (MCP) 的服务器，提供 IP 地址归属地查询功能。它使用 [ip.sb](https://ip.sb/api/) 的 API 来获取 IP 地址的详细地理位置信息。\n\n## 功能特点\n\n- 查询指定 IP 地址的归属地信息\n- 如果不指定 IP 地址，则查询当前客户端的 IP 信息\n- 通过 HTTP SSE 方式提供数据传输\n- 符合 MCP 协议标准\n\n## 安装\n\n```bash\n# 克隆仓库\ngit clone https://github.com/yourusername/mcp-server-ip.git\ncd mcp-server-ip\n\n# 安装依赖\nnpm install\n\n# 构建项目\nnpm run build\n```\n\n## 使用方法\n\n### 启动服务器\n\n```bash\nnpm start\n```\n\n服务器将在 http://localhost:3000 上启动，并通过 SSE 提供 MCP 服务。\n\n### 开发模式\n\n```bash\nnpm run dev\n```\n\n### 与 Claude Desktop 集成\n\n1. 在项目下创建 `.cursor/mcp.json`：\n\n2. 添加服务器配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"sample-project-server\": {\n      \"url\": \"http://localhost:3000/sse\"\n    }\n  }\n}\n```\n\n## API 说明\n\n### query-ip\n\n查询指定 IP 地址的归属地信息。\n\n**参数**:\n\n- `ip` (可选): 要查询的 IP 地址。如果不提供，则查询当前客户端的 IP。\n\n**返回**:\n返回包含以下信息的文本：\n\n- IP 地址\n- 国家/地区\n- 省/州\n- 城市\n- 经纬度\n- 时区\n- ASN\n- 组织\n\n## 参考\n\n- [MCP 协议](https://www.anthropic.com/news/model-context-protocol)\n- [TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n- [Claude MCP](https://docs.cursor.com/context/model-context-protocol)\n- [ip.sb](https://ip.sb/api/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flework%2Fmcp-server-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flework%2Fmcp-server-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flework%2Fmcp-server-ip/lists"}