Introduction¶
When building agents based on DeepSeek Harness (DSH), calling external data is a common requirement. Geospatial data is often large in size and complex in storage, and direct integration typically requires handling the S3 protocol or complex APIs. This section introduces xby-source-coop, an MCP server that connects to Source Cooperative data sources, enabling AI clients to discover and access over 800TB of geospatial data through the JSON-RPC protocol.
Plugin Role¶
This is an online tool plugin maintained by xby-skill. It provides services through the MCP (Model Context Protocol) standard, allowing developers to interact with organizations, products, and files in Source Cooperative programmatically.
Core Features¶
The plugin provides a complete workflow from authentication and discovery to specific file operations.
1. Authentication and Account Discovery¶
Before use, set the API key in the chat. The key is automatically persisted and remains valid after restarting the process.
await set_xby_apikey()
After successful setup, you can list all organizations or account IDs in Source Cooperative.
await list_accounts()
2. Product (Dataset) Browsing¶
Supports listing products using a hybrid S3 and API mode. By default, it directly scans S3, which is faster and includes unpublished products.
await list_products(account_id="youssef-harby")
If you only need published products and want richer metadata, disable unpublished scanning and switch to API mode.
await list_products(account_id="youssef-harby", include_unpublished=False)
3. Retrieving Comprehensive Metadata¶
Retrieve detailed information for a specific product, including account information, storage configuration, and so on. If a README exists in the product root directory, it will also be returned.
await get_product_details("harvard-lil", "gov-data")
4. File Listing and Tree View¶
Lists all files in a product, including full S3 paths. Supports displaying results as a tree structure via the show_tree parameter, saving tokens and optimizing presentation.
# 列出特定前缀的文件
await list_product_files("harvard-lil", "gov-data", "metadata/")
# 以树状结构展示
await list_product_files("harvard-lil", "gov-data", show_tree=True)
5. File Metadata Retrieval¶
Fetch only file metadata (such as size, type, and modification time) without downloading the file itself, using obstore’s head operation for efficient querying.
await get_file_metadata("harvard-lil/gov-data/README.md")
6. Intelligent Fuzzy Search¶
Supports cross-account search for products with fuzzy matching, capable of handling spelling errors and partial matches. Search results return the top 5 most relevant accounts or products.
# 处理拼写错误
await search("climte")
# 模糊匹配
await search("geo")
Performance Reference¶
Depending on the use case, performance is as follows:
* S3 mode (default): approximately 240ms
* API mode: approximately 500ms
Installation and Activation¶
The plugin can be found in the DSH plugin ecosystem. Since explicit command-line installation instructions are not provided, use the following directory or repository to find and configure it:
* Ecosystem directory: https://www.skillhub.cn/plugins/xby-skill/xby-source-coop
* Repository: https://github.com/xby-skill/xby-source-coop
Notes¶
- Permissions: The plugin runs with the permissions of the current DSH process. Ensure that the key required to access Source Cooperative is configured correctly.
- License: MIT license, freely usable.
- Check source code: Before enabling, review the source code to confirm compatibility with the current DSH version.
Summary¶
With the above features, developers can efficiently discover, retrieve, and perform metadata analysis on geospatial data. This mechanism addresses the complexity of integrating large-scale data and is a practical tool for building geoinformation agents.