多伦多 MCP 服务器:多伦多开放数据工具 logo

多伦多 MCP 服务器:多伦多开放数据工具

Organization
Toronto-inc

MCP Server for data from open.toronto.ca

PublisherToronto-inc
Repositorytoronto-mcp
LanguageTypeScript
Forks
2
Stars
12
Available tools
0
Transport typestdio, streamable-http
Categories
Links
  • Connect tools to AI workflows

    多伦多 MCP 服务器:多伦多开放数据工具 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    12 stars and 2 forks from the linked repository.

Toronto MCP Server: Toronto Open Data Tools

This project implements a Model Context Protocol (MCP) server for Toronto Open Data, deployable on Cloudflare Workers. It exposes a comprehensive set of tools for intelligently querying, analyzing, and retrieving datasets from Toronto's CKAN-powered open data portal, making them accessible to MCP-compatible clients like Claude Desktop, Cursor, and other AI assistants.

🚀 Live Server

Deployed at: https://toronto-mcp.s-a62.workers.dev

  • SSE Endpoint: https://toronto-mcp.s-a62.workers.dev/sse (for Claude Desktop)
  • MCP Endpoint: https://toronto-mcp.s-a62.workers.dev/mcp (for other clients)

What does it do?

  • Provides a remote MCP server exposing tools for Toronto's Open Data via the CKAN API
  • Intelligently discovers relevant datasets using advanced relevance scoring
  • Analyzes data freshness patterns with comprehensive update frequency tracking
  • Provides deep data structure insights including field analysis and schema information
  • Enables natural language querying of Toronto's 500+ open datasets
  • Supports comprehensive data analysis combining multiple analytical dimensions

🛠️ Features

Basic CKAN Tools

  • list_datasets: List all available datasets
  • search_datasets: Search datasets by keyword
  • get_package: Retrieve complete metadata for a dataset
  • get_first_datastore_resource_records: Get records from the first active resource
  • get_resource_records: Get records from a specific resource by ID

🧠 Advanced Analysis Tools

  • find_relevant_datasets: Intelligently find and rank datasets using relevance scoring (title, description, tags, organization)
  • analyze_dataset_updates: Analyze update frequencies with categorization (daily, weekly, monthly, quarterly, annually, irregular)
  • analyze_dataset_structure: Deep-dive into dataset structure with field definitions, data types, record counts, and optional data previews
  • get_data_categories: Explore all available organizations and topic groups
  • get_dataset_insights: Comprehensive analysis combining relevance ranking, update frequency, and data structure insights

💡 Use Cases

For AI Assistants & Researchers

  • "What traffic data is available in Toronto?" → Ranked datasets with relevance scores and update frequencies
  • "How current is Toronto's environmental data?" → Update frequency analysis across environmental datasets
  • "What fields are in the building permits dataset?" → Complete schema analysis with data types and sample records
  • "Give me insights about Toronto's budget data" → Comprehensive analysis with relevance, freshness, and structure
  • "Which datasets update daily?" → Frequency-based filtering and categorization

For Data Scientists & Analysts

  • Discover datasets relevant to specific research questions
  • Assess data quality and reliability through update patterns
  • Understand data structure before detailed analysis
  • Find related datasets across different city departments
  • Evaluate data completeness and field availability

🏗️ Tech Stack

  • Cloudflare Workers: Serverless deployment platform
  • Model Context Protocol (MCP): Standard for AI tool integrations
  • TypeScript: Type safety and modern development
  • Zod: Runtime parameter validation
  • CKAN API: Direct integration with Toronto Open Data

📁 Project Structure

toronto-mcp/
├── src/
│   ├── index.ts                 # MCP server setup and routing
│   └── ckanTools.ts            # Toronto Open Data tools implementation
├── test-runner.ts              # Automated testing framework
├── test-deployment.ts          # Deployment validation script
├── claude-mcp-config.json      # Claude Desktop configuration
├── evaluation-guide.md         # Comprehensive testing strategies
├── example-usage.md            # Usage examples and patterns
├── testing-guide.md            # Automated testing documentation
└── README.md                   # This file

🚀 Quick Start

1. Deploy Your Own Instance

bash
# Clone and deploy
git clone <your-repo>
cd toronto-mcp
npm install
wrangler deploy

2. Test Deployment

bash
# Install testing dependencies
npm install tsx

# Test your deployment
npx tsx test-deployment.ts https://your-worker.workers.dev

3. Connect to Claude Desktop

Create or edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "toronto-mcp": {
      "command": "npx",
      "args": ["mcp-remote", "https://toronto-mcp.s-a62.workers.dev/sse"]
    }
  }
}

Restart Claude Desktop and start asking questions about Toronto's open data!

🧪 Testing & Validation

Quick Connectivity Test

bash
npx tsx test-deployment.ts https://toronto-mcp.s-a62.workers.dev

Automated Testing Framework

bash
# Run mock tests (validates framework)
npm test

# Test specific deployment
npm run test:deployment https://your-url.workers.dev

Manual Testing in Claude Desktop

Try these test queries to verify functionality:

  1. Basic Search: "Find datasets about parking in Toronto"
  2. Update Analysis: "How often does Toronto update traffic data?"
  3. Data Structure: "What fields are in Toronto's building permits data?"
  4. Comprehensive: "Give me insights about Toronto's environmental data"
  5. Categories: "What departments provide open data in Toronto?"

📊 Success Metrics

Your MCP server is working correctly when:

  • ✅ Claude consistently selects appropriate tools for queries
  • ✅ Results include relevance scores and rankings
  • ✅ Update frequency information is categorized correctly
  • ✅ Data structure analysis shows complete field information
  • ✅ Response times are under 10 seconds for complex queries
  • ✅ Error handling provides helpful messages

📚 Documentation

📘 Example Usage Guide

Concrete examples of how to use each MCP tool, including JSON parameters and expected responses. Essential for understanding tool capabilities and integration patterns.

📊 Evaluation & Testing Guide

Comprehensive testing strategies, quality metrics, and evaluation criteria. Includes manual test queries, performance benchmarks, and success metrics for validating MCP server functionality.

🧪 Automated Testing Framework

TypeScript test framework for programmatic validation, performance monitoring, and automated quality assurance. Includes executable test cases and CI/CD integration patterns.

⚙️ Claude Desktop Configuration

Ready-to-use MCP server configuration for Claude Desktop integration.

🎯 Example Tool Usage

Natural Language Queries (via AI Assistant)

"What traffic data is available in Toronto and how current is it?"
"Find housing development datasets with field information"
"Which Toronto datasets update daily?"
"Give me insights about budget and financial data"

Direct Tool Calls (for developers)

typescript
// Intelligent dataset discovery
await find_relevant_datasets({
  query: "traffic accidents",
  maxResults: 5,
  includeRelevanceScore: true,
});

// Update frequency analysis
await analyze_dataset_updates({
  query: "transportation",
  groupByFrequency: true,
});

// Complete data structure analysis
await analyze_dataset_structure({
  packageId: "building-permits",
  includeDataPreview: true,
  previewLimit: 10,
});

// Comprehensive insights
await get_dataset_insights({
  query: "housing development",
  maxDatasets: 3,
  includeUpdateFrequency: true,
  includeDataStructure: true,
});

🔧 Available Scripts

bash
npm run dev           # Start development server
npm run deploy        # Deploy to Cloudflare Workers
npm run test          # Run automated tests
npm run test:deployment  # Test specific deployment
npm run lint:fix      # Fix linting issues
npm run format        # Format code

🌟 Key Features

Intelligent Relevance Scoring

  • Weighted algorithm: Title (10pts) > Description (5pts) > Tags (3pts) > Organization (2pts)
  • Context-aware ranking: Matches user intent with appropriate datasets
  • Multi-keyword support: Handles complex queries effectively

Comprehensive Update Analysis

  • Frequency categorization: Daily, weekly, monthly, quarterly, annually, irregular
  • Metadata inference: Analyzes patterns when explicit schedules aren't available
  • Quality assessment: Identifies stale vs. actively maintained datasets

Deep Data Structure Insights

  • Complete schema analysis: Field names, types, constraints
  • Record statistics: Counts, completeness, data quality indicators
  • Sample data: Optional previews for quick assessment
  • Multi-resource support: Handles datasets with multiple files/formats

🚀 Extending

To add more tools or data sources:

  1. Edit src/ckanTools.ts to add new tool functions
  2. Register new tools in src/index.ts
  3. Update type definitions and validation schemas
  4. Add corresponding tests in the testing framework

Example:

typescript
server.tool("new_analysis_tool", { param: z.string() }, async ({ param }) => {
  // Implementation
  return { content: [{ type: "text", text: result }] };
});

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass: npm test
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.


Built for intelligent open data discovery • Powered by Toronto Open Data & CKAN API • Enhanced for AI assistant integration

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "toronto-inc-toronto-mcp": {
      "command": "",
      "args": []
    }
  }
}

Use 多伦多 MCP 服务器:多伦多开放数据工具 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once 多伦多 MCP 服务器:多伦多开放数据工具 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add 多伦多 MCP 服务器:多伦多开放数据工具 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the 多伦多 MCP 服务器:多伦多开放数据工具 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "toronto-inc-toronto-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "toronto-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the 多伦多 MCP 服务器:多伦多开放数据工具 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the 多伦多 MCP 服务器:多伦多开放数据工具 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use 多伦多 MCP 服务器:多伦多开放数据工具 to help me with this task?
多伦多 MCP 服务器:多伦多开放数据工具
Sure. I read it.
Here is what I found using 多伦多 MCP 服务器:多伦多开放数据工具.

Option 2: Add an MCP server URL

Use this when 多伦多 MCP 服务器:多伦多开放数据工具 is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for 多伦多 MCP 服务器:多伦多开放数据工具.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the 多伦多 MCP 服务器:多伦多开放数据工具 connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the 多伦多 MCP 服务器:多伦多开放数据工具 tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the 多伦多 MCP 服务器:多伦多开放数据工具 tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use 多伦多 MCP 服务器:多伦多开放数据工具 to help me with this task?
多伦多 MCP 服务器:多伦多开放数据工具
Sure. I read it.
Here is what I found using 多伦多 MCP 服务器:多伦多开放数据工具.

Frequently asked questions

What is the 多伦多 MCP 服务器:多伦多开放数据工具 MCP server used for?

多伦多 MCP 服务器:多伦多开放数据工具 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use 多伦多 MCP 服务器:多伦多开放数据工具 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use 多伦多 MCP 服务器:多伦多开放数据工具 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use 多伦多 MCP 服务器:多伦多开放数据工具 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With 多伦多 MCP 服务器:多伦多开放数据工具 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect 多伦多 MCP 服务器:多伦多开放数据工具 MCP to TypingMind?

多伦多 MCP 服务器:多伦多开放数据工具 can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does 多伦多 MCP 服务器:多伦多开放数据工具 MCP provide in TypingMind?

多伦多 MCP 服务器:多伦多开放数据工具 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use 多伦多 MCP 服务器:多伦多开放数据工具 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If 多伦多 MCP 服务器:多伦多开放数据工具 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇