能力标签
🔌
MCP工具

CitySense

基于 Python · 让 AI 助手直接操作你的系统与工具
英文名:citysense
⭐ 11 Stars 🍴 1 Forks 💻 Python 📄 EUPL-1.2 🏷 AI 7.5分
7.5AI 综合评分
geopandasgeospatialopenstreetmappython
⚙️ 配置说明
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,CitySense 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。

📚 深度解析
CitySense 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 CitySense,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。CitySense 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 CitySense 评为 AI 评分 7.5 分,属于同类工具中的优质选择。
📋 工具概览

CitySense是一款开源的Python库,用于连接地理空间城市数据,提供地理空间数据处理和分析功能。它可以帮助开发者更好地理解城市数据,提高城市规划和管理的效率。

CitySense 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 11
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
EUPL-1.2
AI 综合评分
7.5 分
工具类型
MCP工具
Forks
1
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

CitySense是一款开源的Python库,用于连接地理空间城市数据,提供地理空间数据处理和分析功能。它可以帮助开发者更好地理解城市数据,提高城市规划和管理的效率。

CitySense 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/olaflaitinen/citysense

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "citysense": {
      "command": "npx",
      "args": ["-y", "citysense"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 CitySense 执行以下任务...
Claude: [自动调用 CitySense MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "citysense": {
      "command": "npx",
      "args": ["-y", "citysense"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 90/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

CitySense Logo

CitySense

<p><b>Geospatial RAG + MCP Toolkit for Urban Intelligence</b></p> <p><sub>Built for SDG 11 workflows, pilot countries, and research-grade city analytics.</sub></p>

<p><sub><b>QUICK LINKS</b></sub></p> <p> <a href="https://citysense.readthedocs.io">Documentation</a> | <a href="https://pypi.org/project/citysense/">PyPI</a> | <a href="https://github.com/olaflaitinen/citysense/issues">Issues</a> | <a href="https://modelcontextprotocol.io/">MCP</a> </p>

<p> <sub><b>PARTNERS</b></sub><br> <img src="docs/assets/partners/unh_sqr_logo.svg" alt="UN-Habitat Logo" height="34"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="docs/assets/partners/wuf-logo.svg" alt="World Urban Forum Logo" height="34"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="docs/assets/partners/arxkom_logo_en.svg" alt="Arxkom Logo" height="34"/> </p>

<p> <sub><b>PILOT COUNTRIES</b></sub><br> <img src="https://flagcdn.com/16x12/az.png" alt="Azerbaijan flag" width="16" height="12"/> <sub></sub>&nbsp;&nbsp; <img src="https://flagcdn.com/16x12/fi.png" alt="Finland flag" width="16" height="12"/> <sub></sub>&nbsp;&nbsp; <img src="https://flagcdn.com/16x12/se.png" alt="Sweden flag" width="16" height="12"/> <sub></sub>&nbsp;&nbsp; <img src="https://flagcdn.com/16x12/dk.png" alt="Denmark flag" width="16" height="12"/> <sub></sub>&nbsp;&nbsp; <img src="https://flagcdn.com/16x12/no.png" alt="Norway flag" width="16" height="12"/> <sub></sub> </p>

<br>

<p><sub><b>PACKAGE</b></sub></p> <p> <a href="https://pypi.org/project/citysense/"><img src="https://img.shields.io/pypi/v/citysense?logo=pypi&logoColor=white&style=flat&cacheSeconds=3600" alt="PyPI version"></a> <a href="https://pypi.org/project/citysense/"><img src="https://img.shields.io/pypi/pyversions/citysense?logo=python&logoColor=white&style=flat&cacheSeconds=3600" alt="PyPI - Python Version"></a> <a href="https://pypi.org/project/citysense/"><img src="https://img.shields.io/pypi/wheel/citysense?logo=pypi&logoColor=white&style=flat&cacheSeconds=3600" alt="PyPI - Wheel"></a> <a href="https://pypi.org/project/citysense/"><img src="https://img.shields.io/pypi/format/citysense?logo=pypi&logoColor=white&style=flat&cacheSeconds=3600" alt="PyPI - Format"></a> <a href="https://pypi.org/project/citysense/"><img src="https://img.shields.io/pypi/status/citysense?logo=pypi&logoColor=white&style=flat&cacheSeconds=3600" alt="PyPI - Status"></a> <a href="https://pepy.tech/projects/citysense"><img src="https://static.pepy.tech/badge/citysense/month" alt="PyPI - Downloads"></a> </p>

<p><sub><b>REPOSITORY</b></sub></p> <p> <a href="https://github.com/olaflaitinen/citysense/stargazers"><img src="https://img.shields.io/github/stars/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub stars"></a> <a href="https://github.com/olaflaitinen/citysense/network/members"><img src="https://img.shields.io/github/forks/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub forks"></a> <a href="https://github.com/olaflaitinen/citysense/issues"><img src="https://img.shields.io/github/issues/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub issues"></a> <a href="https://github.com/olaflaitinen/citysense/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub issues closed"></a> <a href="https://github.com/olaflaitinen/citysense/pulls"><img src="https://img.shields.io/github/issues-pr/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub PRs"></a> <a href="https://github.com/olaflaitinen/citysense/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub PRs closed"></a> <a href="https://github.com/olaflaitinen/citysense/graphs/contributors"><img src="https://img.shields.io/github/contributors/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub contributors"></a> <a href="https://github.com/olaflaitinen/citysense/commits/main"><img src="https://img.shields.io/github/last-commit/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub last commit"></a> <a href="https://github.com/olaflaitinen/citysense/commits/main"><img src="https://img.shields.io/github/commit-activity/m/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="GitHub commit activity"></a> <a href="https://github.com/olaflaitinen/citysense"><img src="https://img.shields.io/github/languages/code-size/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="Code size"></a> <a href="https://github.com/olaflaitinen/citysense"><img src="https://img.shields.io/github/languages/top/olaflaitinen/citysense?logo=python&logoColor=white&style=flat&cacheSeconds=3600" alt="Top language"></a> <a href="https://github.com/olaflaitinen/citysense"><img src="https://img.shields.io/github/repo-size/olaflaitinen/citysense?logo=github&logoColor=white&style=flat&cacheSeconds=3600" alt="Repo size"></a> </p>

<p><sub><b>QUALITY</b></sub></p> <p> <a href="https://github.com/olaflaitinen/citysense/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/olaflaitinen/citysense/ci.yml?branch=main&label=CI&logo=githubactions&logoColor=white&style=flat&cacheSeconds=3600" alt="CI"></a> <a href="https://github.com/olaflaitinen/citysense/actions/workflows/scorecard-analysis.yml"><img src="https://img.shields.io/github/actions/workflow/status/olaflaitinen/citysense/scorecard-analysis.yml?branch=main&label=Scorecard&logo=githubactions&logoColor=white&style=flat&cacheSeconds=3600" alt="Scorecard CI"></a> <a href="https://codecov.io/gh/olaflaitinen/citysense"><img src="https://img.shields.io/codecov/c/github/olaflaitinen/citysense?logo=codecov&logoColor=white&style=flat&cacheSeconds=3600" alt="Codecov"></a> <a href="https://scorecard.dev/viewer/?uri=github.com/olaflaitinen/citysense"><img src="https://img.shields.io/badge/dynamic/json?url=https://api.scorecard.dev/projects/github.com/olaflaitinen/citysense&query=$.score&label=OpenSSF%20Scorecard&suffix=%2F10&logo=securityscorecard&logoColor=white&style=flat&cacheSeconds=3600" alt="OpenSSF Scorecard"></a> <a href="https://app.deepsource.com/gh/olaflaitinen/citysense/?ref=repository-badge"><img alt="DeepSource" title="DeepSource" src="https://app.deepsource.com/gh/olaflaitinen/citysense.svg/?label=active+issues&show_trend=true"></a> <a href="https://opensource.org/licenses/EUPL-1.2"><img src="https://img.shields.io/badge/license-EUPL--1.2-green?logo=europeanunion&logoColor=white&style=flat&cacheSeconds=3600" alt="License"></a> </p>

<p><sub><b>STANDARDS</b></sub></p> <p> <a href="https://docs.astral.sh/ruff/"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat&cacheSeconds=3600" alt="Ruff"></a> <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg?logo=black&logoColor=white&style=flat&cacheSeconds=3600" alt="Code style: black"></a> <a href="https://mypy-lang.org/"><img src="https://img.shields.io/badge/type%20checker-mypy-2a6db2.svg?logo=python&logoColor=white&style=flat&cacheSeconds=3600" alt="mypy"></a> <a href="https://pycqa.github.io/isort/"><img src="https://img.shields.io/badge/imports-isort-1674B1?logo=pycqa&logoColor=white&style=flat&cacheSeconds=3600" alt="isort"></a> <a href="https://pre-commit.com/"><img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=precommit&logoColor=white&style=flat&cacheSeconds=3600" alt="Pre-commit"></a> <a href="https://github.com/editorconfig/editorconfig"><img src="https://img.shields.io/badge/EditorConfig-enabled-cyan?logo=editorconfig&logoColor=white&style=flat&cacheSeconds=3600" alt="EditorConfig"></a> <a href="https://pypi.org/project/bandit/"><img src="https://img.shields.io/badge/security-bandit-F29F05?logo=pycqa&logoColor=white&style=flat&cacheSeconds=3600" alt="Security: bandit"></a> </p>

<p><sub><b>TECH STACK</b></sub></p> <p> <a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/Protocol-MCP-6366F1?logo=modelcontextprotocol&logoColor=white&style=flat" alt="MCP"></a> <a href="https://sdgs.un.org/goals/goal11"><img src="https://img.shields.io/badge/UN--SDG-11-009EDB?logo=unitednations&logoColor=white&style=flat" alt="SDG 11"></a> <a href="https://www.openstreetmap.org/"><img src="https://img.shields.io/badge/Data-OpenStreetMap-7EBC6F?logo=openstreetmap&logoColor=white&style=flat" alt="OpenStreetMap"></a> <a href="https://www.mapillary.com/"><img src="https://img.shields.io/badge/Data-Mapillary-05CB63?logo=mapillary&logoColor=white&style=flat" alt="Mapillary"></a> <a href="https://sentinel.esa.int/"><img src="https://img.shields.io/badge/Data-Sentinel--2-4B6A9C?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8%2BIDwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPiA8c3ZnIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwO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gQyAzMzMuMzI4NTksNDQ4Ljk1MDc2IDMyNi4zNTE4NCw0NDIuMTY5OTIgMzI2LjM1MTg0LDQzMy43NTA1IEMgMzI2LjM1MTkxLDQyNS4zMzYzNSAzMzMuMzI4NTksNDE4LjU1MDIzIDM0MS43NDIxMSw0MTguNTUwMjMgeiIvPiAgIDwvZz4gPC9zdmc%2B&logoColor=white&style=flat" alt="Sentinel-2"></a> <a href="https://qdrant.tech/"><img src="https://img.shields.io/badge/Vector%20Store-Qdrant-DC244C?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNzMuMjEgMjAwIj4KICA8cG9seWdvbiBmaWxsPSIjREMyNDRDIiBwb2ludHM9Ijg2LjYgMCAwIDUwIDAgMTUwIDg2LjYgMjAwIDExOS4wOCAxODEuMjUgMTE5LjA4IDE0My43NSA4Ni42IDE2Mi41IDMyLjQ4IDEzMS4yNSAzMi40OCA2OC43NSA4Ni42IDM3LjUgMTQwLjczIDY4Ljc1IDE0MC43MyAxOTMuNzUgMTczLjIxIDE3NSAxNzMuMjEgNTAgODYuNiAwIi8%2BCiAgPHBvbHlnb24gZmlsbD0iIzlFMEQzOCIgcG9pbnRzPSIxMTkuMDggMTQzLjc1IDExOS4wOCAxODEuMjUgODYuNiAyMDAgODYuNiAxNjIuNSAxMTkuMDggMTQzLjc1Ii8%2BCiAgPHBvbHlnb24gZmlsbD0iIzlFMEQzOCIgcG9pbnRzPSIxNzMuMjEgNTAgMTczLjIxIDE3NSAxNDAuNzMgMTkzLjc1IDE0MC43MyA2OC43NSAxNzMuMjEgNTAiLz4KICA8cG9seWdvbiBmaWxsPSIjRkY1MTZCIiBwb2ludHM9IjE3My4yMSA1MCAxNDAuNzMgNjguNzUgODYuNiAzNy41IDMyLjQ4IDY4Ljc1IDAgNTAgODYuNiAwIDE3My4yMSA1MCIvPgogIDxwb2x5Z29uIGZpbGw9IiNEQzI0NEMiIHBvaW50cz0iODYuNiAxNjIuNSA4Ni42IDIwMCAwIDE1MCAwIDUwIDMyLjQ4IDY4Ljc1IDMyLjQ4IDEzMS4yNSA4Ni42IDE2Mi41Ii8%2BCiAgPHBvbHlnb24gZmlsbD0iI0ZGNTE2QiIgcG9pbnRzPSIxMTkuMDggODEuMjUgODYuNiAxMDAgNTQuMTMgODEuMjUgODYuNiA2Mi41IDExOS4wOCA4MS4yNSIvPgogIDxwb2x5Z29uIGZpbGw9IiNEQzI0NEMiIHBvaW50cz0iODYuNiAxMDAgODYuNiAxMzcuNSA1NC4xMyAxMTguNzUgNTQuMTMgODEuMjUgODYuNiAxMDAiLz4KICA8cG9seWdvbiBmaWxsPSIjOUUwRDM4IiBwb2ludHM9IjExOS4wOCA4MS4yNSAxMTkuMDggMTE4Ljc1IDg2LjYgMTM3LjUgODYuNiAxMDAgMTE5LjA4IDgxLjI1Ii8%2BCjwvc3ZnPg%3D%3D&style=flat" alt="Qdrant"></a> <a href="https://shapely.readthedocs.io/"><img src="https://img.shields.io/badge/Geometry-Shapely%202.1%2B-3776AB?logo=python&logoColor=white&style=flat" alt="Shapely"></a> <a href="https://geopandas.org/"><img src="https://img.shields.io/badge/Geospatial-GeoPandas%201.1%2B-3776AB?logo=geopandas&logoColor=white&style=flat" alt="GeoPandas"></a> <a href="https://numpy.org/"><img src="https://img.shields.io/badge/Compute-NumPy-013243?logo=numpy&logoColor=white&style=flat" alt="NumPy"></a> <a href="https://pandas.pydata.org/"><img src="https://img.shields.io/badge/Data-Pandas-150458?logo=pandas&logoColor=white&style=flat" alt="Pandas"></a> <a href="https://pydantic.dev/"><img src="https://img.shields.io/badge/Validation-Pydantic-E92063?logo=pydantic&logoColor=white&style=flat" alt="Pydantic"></a> <a href="https://h3geo.org/"><img src="https://img.shields.io/badge/Index-H3-FFFF00?logo=h3&logoColor=black&style=flat" alt="H3"></a> </p> <p><sub><b>PLATFORM</b></sub></p> <p> <a href="https://ubuntu.com/"><img src="https://img.shields.io/badge/OS-Linux-FCC624?logo=linux&logoColor=black&style=flat" alt="Linux"></a> <a href="https://www.apple.com/macos/"><img src="https://img.shields.io/badge/OS-macOS-000000?logo=macos&logoColor=white&style=flat" alt="macOS"></a> <a href="https://www.microsoft.com/windows/"><img src="https://img.shields.io/badge/OS-Windows-0078D6?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iODgiIHdpZHRoPSI4OCIgeG1sbnM6dj0iaHR0cHM6Ly92ZWN0YS5pby9uYW5vIj48cGF0aCBkPSJNMCAxMi40MDJsMzUuNjg3LTQuODYuMDE2IDM0LjQyMy0zNS42Ny4yMDN6bTM1LjY3IDMzLjUyOWwuMDI4IDM0LjQ1M0wuMDI4IDc1LjQ4TC4wMjYgNDUuN3ptNC4zMjYtMzkuMDI1TDg3LjMxNCAwdjQxLjUyN2wtNDcuMzE4LjM3NnptNDcuMzI5IDM5LjM0OWwtLjAxMSA0MS4zNC00Ny4zMTgtNi42NzgtLjA2Ni0zNC43Mzl6IiBmaWxsPSIjMDBhZGVmIi8%2BPC9zdmc%2B&logoColor=white&style=flat" alt="Windows"></a> <a href="https://hub.docker.com/r/olaflaitinen/citysense"><img src="https://img.shields.io/badge/Container-Docker-2496ED?logo=docker&logoColor=white&style=flat" alt="Docker"></a> <a href="https://conda.io/"><img src="https://img.shields.io/badge/Env-Conda-44A833?logo=anaconda&logoColor=white&style=flat" alt="Conda"></a> </p> </div>

---

Abstract

CitySense is an open-source Python library for geospatial retrieval-augmented generation (RAG) and MCP-based AI tooling for urban analysis. It combines natural-language intent parsing, geospatial indexing, and an MCP server so applications can query urban context with minimal boilerplate. The project aligns with SDG 11, the New Urban Agenda, and WUF13 framing. The current codebase includes active pilot configs for Azerbaijan and Finland, OSM-powered indexing, and modular connectors for Sentinel-2, Mapillary, and KartaView integrations.

---

Overview

Key Features

CapabilityDescription
Natural language queriesIntent parsing and semantic retrieval over geospatial knowledge bases
Multi-source architectureOSM active CLI path; Sentinel-2, Mapillary, and KartaView connector modules included
MCP integrationNative Model Context Protocol server for Cursor, Claude, VS Code
WUF13 alignmentPilot-aware schema and indicator model aligned to WUF13 framing
SDG 11 metricsLand consumption rate (11.3.1), urban resilience composite score
Spectral indicesNDVI, NDWI, NDBI, EVI, MNDWI, BSI from Sentinel-2 L2A
Reciprocal Rank FusionHybrid dense and sparse retrieval with configurable parameter k

Requirements

RequirementVersion
Python3.12 or 3.13
QdrantDefault endpoint http://localhost:6333
GDAL3.10+ (for rasterio, geopandas; conda recommended)

---

Optional: Enable Imagery Dependencies (Connector Modules)

pip install "citysense[clip]"
pip install "citysense[sentinelhub]"

Then set connector credentials (MAPILLARY_ACCESS_TOKEN, CDSE_CLIENT_ID, CDSE_CLIENT_SECRET) as needed.

---

Prerequisites

  1. Qdrant running at configured URL
  2. Index built: citysense index build --city Helsinki --sources osm
  3. Optional tokens for Mapillary and CDSE if imagery connectors are enabled

Dependencies

Core Dependencies

PackageVersionPurpose
shapely>=2.1.2, <3.0Geometry operations
geopandas>=1.1.2, <2.0Geospatial DataFrames
pyproj>=3.7.1, <4.0Coordinate transformations
pyogrio>=0.10.0Vector I/O
numpy>=2.2.0, <3.0Numerical arrays
pandas>=2.3.0, <4.0Tabular data
h3>=4.1.0, <5.0Hexagonal spatial index
rasterio>=1.4.3, <2.0Raster I/O
xarray>=2023.1.0Multidimensional arrays
pydantic>=2.12.0, <3.0Data validation
pydantic-settings>=2.7.0, <3.0Configuration
qdrant-client>=1.17.0, <2.0Vector store client
fastembed>=0.4.2, <1.0Embedding models
rank-bm25>=0.2.2BM25 sparse retrieval
litellm>=1.57.0, <2.0LLM abstraction
mcp>=1.4.0, <2.0Model Context Protocol
pystac-client>=0.8.5, <1.0STAC catalog access
rio-cogeo>=5.4.0, <8.0Cloud-optimized GeoTIFF
httpx>=0.28.0, <1.0HTTP client
Pillow>=11.1.0, <13.0Image processing
APScheduler>=3.11.0, <4.0Task scheduling
structlog>=25.1.0, <26.0Structured logging
typer>=0.15.0, <1.0CLI framework

Optional Dependencies

ExtraPackagesPurpose
cliptransformers, torchCLIP ViT-B/32 for street imagery
sentinelhubsentinelhubSentinel Hub Process API
devruff, mypy, pytest, mkdocs, pre-commitDevelopment tooling

---

Installation

Editable Install

git clone https://github.com/olaflaitinen/citysense.git
cd citysense
pip install -e ".[dev]"

---

2) build index (current CLI path: OSM)

citysense index build --city Helsinki --country fi --sources osm

Build index for Helsinki (OSM path)

citysense index build --city Helsinki --country fi --sources osm

Index Build Flow

City + country input
  |
  v
OSMConnector.fetch(bbox)
  |
  v
GeoDataFrame normalization
  |
  v
H3 assignment + chunk text
  |
  v
Embedding generation
  |
  v
Qdrant upsert

Setup

git clone https://github.com/olaflaitinen/citysense.git
cd citysense
pip install -e ".[dev,clip]"
pre-commit install

Quick Start

Example .env

CITYSENSE_PILOT_COUNTRY=fi
CITYSENSE_VECTOR_STORE_URL=http://localhost:6333
MAPILLARY_ACCESS_TOKEN=your_token
CDSE_CLIENT_ID=your_id
CDSE_CLIENT_SECRET=your_secret

---

CLI Examples

```bash

Optional Extras

ExtraPurpose
clipCLIP ViT-B/32 for street imagery embedding
sentinelhubSentinel Hub Process API
devruff, mypy, pytest, mkdocs, pre-commit
pip install "citysense[clip]"
pip install "citysense[dev]"

Configuration

Configuration is read in priority order: environment variables (prefix CITYSENSE_), .env file at project root, defaults.

Environment Variables

VariableDefaultDescription
CITYSENSE_PILOT_COUNTRYNonePilot key (az, fi fully available; se, dk, no reserved for upcoming profiles)
CITYSENSE_VECTOR_STORE_URLhttp://localhost:6333Qdrant URL
CITYSENSE_EMBEDDING_MODELBAAI/bge-m3Text embedding model
MAPILLARY_ACCESS_TOKENNoneMapillary API token
CDSE_CLIENT_IDNoneCopernicus Data Space client ID
CDSE_CLIENT_SECRETNoneCopernicus Data Space client secret

Pilot Configuration Attributes

AttributeDescription
countryISO2 code
languageIETF BCP 47 tag
national_crsEPSG string
default_citiesCity name to BBox mapping
connector_priorityOrdered connector IDs
wuf13_primary_dimensionsWUF13 dimension tags
data_gapsKnown gaps and fallback strategies
informality_heuristicSAR/spectral heuristic for tenure

---

Pilot Configuration

from citysense.pilot.az import AZ_CONFIG
from citysense.pilot.fi import FI_CONFIG

config = FI_CONFIG
print(config.country, config.national_crs, config.default_cities)

---

CLI Reference

CommandDescription
citysense --versionPrint package version
citysense pilot init &lt;country&gt;Initialize pilot country in .env (az, fi, se, dk, no)
citysense pilot statusShow active pilot country
citysense index build --city &lt;name&gt; [--country &lt;iso2&gt;]Build index for selected city
citysense index status [--country &lt;iso2&gt;]Show Qdrant collection point count
citysense query &lt;natural language&gt; [--country &lt;iso2&gt;] [--city &lt;name&gt;]Execute semantic spatial query
citysense serve --transport stdioStart FastMCP server for local MCP clients
citysense serve --transport sse --port 7832SSE transport placeholder (status output)

Notes: - index build currently uses the OSM connector path. - --sources is present for forward compatibility and not fully wired yet. - index build city routing is currently optimized for Helsinki and Baku.

Sentinel-2 Band Reference

All spectral indices are computed from Sentinel-2 L2A surface reflectance bands.

Band IDCentre Wavelength (nm)Resolution (m)
B02490 (Blue)10
B03560 (Green)10
B04665 (Red)10
B08842 (NIR broad)10
B111610 (SWIR-1)20
B122190 (SWIR-2)20

API Summary

Resolution Reference

ResolutionAvg hexagon area (km^2)Use case
5252.9City-scale analysis
636.1District-scale
75.2Neighborhood-scale
80.74Block-scale
90.11Building-scale

References

Module Structure

ModuleResponsibility
citysense.cliTyper-based command-line interface
citysense.coreConfiguration, session, logging, registry, exceptions
citysense.geoCRS, H3, bbox, geometry, OSM utilities
citysense.connectorsOSM, Mapillary, KartaView, Sentinel, base connector
citysense.ragIntent parsing, retriever, embedder, reranker, assembler
citysense.imageryStreet and satellite processing
citysense.housingHousing analytics primitives
citysense.governanceGovernance-related scoring hooks
citysense.urbanSDG 11 indicators
citysense.climateResilience scoring
citysense.realtimeRealtime stream utilities
citysense.pilotCountry-specific configurations
citysense.mcpMCP server and tools

5-Minute Workflow

```bash

MCP Integration

Troubleshooting

IssueCauseResolution
Qdrant connection refusedQdrant not runningStart Qdrant: docker run -p 6333:6333 qdrant/qdrant
Index empty after buildConnector returned no dataCheck city name, pilot config, OSM coverage
Mapillary 401Invalid or missing tokenSet MAPILLARY_ACCESS_TOKEN
CDSE auth failureInvalid credentialsSet CDSE_CLIENT_ID, CDSE_CLIENT_SECRET
CRS transform errorMismatched EPSGVerify pilot national_crs
H3 antimeridian errorQuery crosses date lineUse bbox that does not span antimeridian

---

Frequently Asked Questions

🇨🇳 中文文档镜像 AI 翻译 2026-05-26
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

CitySense 是一个专为城市智能分析设计的开源 Python 库,集成了地理空间检索增强生成(Geospatial RAG)与 MCP 工具集。它能够将自然语言意图解析与地理空间索引相结合,通过 MCP server 为 Cursor、Claude 和 VS Code 提供原生支持,让开发者能够以极低的样板代码量实现对城市上下文的智能查询。本项目紧密结合联合国可持续发展目标 SDG 11、新城市议程及 WUF13 框架,适用于研究级城市分析与试点国家的工作流。

⚡ 功能介绍

CitySense 提供强大的地理空间 AI 能力:支持通过自然语言进行语义检索,实现对地理空间知识库的意图解析;采用多源架构,内置了 OSM、Sentinel-2、Mapillary 和 KartaView 的连接器模块;原生集成 Model Context Protocol (MCP) server,完美适配主流 AI 编辑器;同时具备 WUF13 标准对齐的 Schema 设计,确保城市数据分析符合国际标准。

📋 环境依赖

运行 CitySense 需要 Python 3.12 或 3.13 环境。系统必须配置并运行 Qdrant 向量数据库(默认地址为 http://localhost:6333)。此外,由于涉及地理空间计算,建议通过 conda 安装 GDAL 3.10+ 版本以支持 rasterio 和 geopandas。如果需要使用卫星影像或街景功能,还需根据需求安装特定的 Connector Modules(如 clip 或 sentinelhub)并配置相应的 API 访问令牌。

🛠 安装步骤(Docker/pip/源码)

你可以通过多种方式安装 CitySense。对于开发者,推荐使用可编辑模式进行源码安装:通过 git clone 项目仓库后,执行 `pip install -e ".[dev]"`。对于普通用户,可以使用 pip 安装基础版或包含扩展功能的版本(如 `pip install "citysense[clip]"`)。安装完成后,请务必确保 Qdrant 服务已启动,并根据需���通过 CLI 命令构建索引(如使用 OSM 数据源)。

🚀 使用教程

快速上手指南:首先,请配置好 `.env` 文件,设置必要的环境变量(如 `CITYSENSE_PILOT_COUNTRY` 和 `CITYSENSE_VECTOR_STORE_URL`)。接着,使用 CLI 工具构建城市索引,例如:`citysense index build --city Helsinki --country fi --sources osm`。构建完成后,你即可通过命令行或集成 MCP 的 AI 工具对特定城市的地理空间数据进行交互式查询。

⚙️ 配置说明(含 MCP / env)

项目配置遵循优先级顺序:环境变量(以 `CITYSENSE_` 为前缀) > 项目根目录下的 `.env` 文件 > 系统默认值。你可以通过环境变量灵活配置 Qdrant URL、Embedding 模型(默认使用 BAAI/bge-m3)以及各类影像服务的 API 凭证(如 `MAPILLARY_ACCESS_TOKEN` 和 `CDSE_CLIENT_ID`)。对于开发环境,可以通过 `pip install "citysense[dev]"` 获取 ruff、mypy 等工具。

🔌 API 说明

CitySense 提供了一套完整的 CLI 命令行接口,用于管理试点国家配置、构建索引及查看状态。核心命令包括 `citysense pilot init <country>` 用于初始化试点环境,以及 `citysense index build` 用于数据索引构建。此外,系统内置了针对 Sentinel-2 卫星波段的参考标准,确保所有光谱指数的计算均基于 L2A ���表反射率波段,保证了地理空间分析的科学性。

🔄 工作流/模块

项目采用模块化设计:`citysense.cli` 基于 Typer 构建命令行界面;`citysense.core` 负责配置、会话、日志及异常处理;`citysense.geo` 处理 CRS、H3、bbox 及 OSM 工具函数;`citysense.connectors` 则负责与 OSM、Mapillary、KartaView 和 Sentinel 等外部数据源进行对接。这种结构确保了从数据采集到 RAG 检索再到 AI 交互的完整工作流能够高效运行。

❓ FAQ 摘要

常见问题解答:若遇到 Qdrant 连接拒绝,请检查 Docker 容器是否正常运行(建议使用 `docker run -p 6333:6333 qdrant/qdrant`);若构建索引后发现数据为空,请核对城市名称、试点国家配置及 OSM 数据覆盖范围;若 Mapillary 接口返回 401 错误,通常是由于 Access Token 无效或过期所致。通过检查环境变量与连接器状态,可以解决大部分集成问题。

🎯 aiskill88 AI 点评 A 级 2026-05-23

CitySense是一款开源的Python库,提供了地理空间数据处理和分析功能。它可以帮助开发者更好地理解城市数据,提高城市规划和管理的效率。然而,CitySense的使用和安装需要一定的技术基础。

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建企业知识库 / RAG 检索应用的团队
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • embedding 模型与查询模型不一致导致检索失效
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • Docker:citysense 提供官方镜像,docker compose up 一键启动
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
citysense 中文教程citysense 安装报错怎么办citysense MCP 配置citysense Docker 部署citysense 与同类工具对比citysense 最佳实践citysense 适合谁用
⚡ 核心功能
👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建企业知识库 / RAG 检索应用的团队
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • embedding 模型与查询模型不一致导致检索失效
👥 适合人群
Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师
🎯 使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
⚖️ 优点与不足
✅ 优点
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

该工具使用 EUPL-1.2 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

📄 EUPL-1.2 — 请查阅原始协议条款了解具体使用限制。

🔗 相关工具推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
citysense 是一款Python开发的AI辅助工具。开源MCP工具:CitySense is an open-source Python library that bridges geospatial urban data wi。⭐11 · Python 主要应用场景包括:CitySense主要用于城市数据分析、地理空间数据处理和城市规划等领域的开发和研究。它可以帮助开发者更好地理解城市数据,提高城市规划和管理的效率。。
💡 AI Skill Hub 点评

AI Skill Hub 点评:CitySense 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
📚 深入学习 CitySense
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 citysense
原始描述 开源MCP工具:CitySense is an open-source Python library that bridges geospatial urban data wi。⭐11 · Python
Topics geopandasgeospatialopenstreetmappython
GitHub https://github.com/olaflaitinen/citysense
License EUPL-1.2
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/olaflaitinen/citysense 🌐 官方网站  https://pypi.org/project/citysense

收录时间:2026-05-23 · 更新时间:2026-05-26 · License:EUPL-1.2 · AI Skill Hub 不对第三方内容的准确性作法律背书。