Civic AI Tools

v1.0.0Search & Data Extractionstable

Open-source platform connecting AI assistants to government open data — MCP server, curated civic MCP directory, and anti-hallucination framework for all 559 Socrata portals

civic-techckandata-commonsgovernment-datallm
Share:
31
Stars
0
Downloads
0
Weekly
0/5

What is Civic AI Tools?

Civic AI Tools is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to open-source platform connecting ai assistants to government open data — mcp server, curated civic mcp directory, and anti-hallucination framework for all 559 socrata portals

Open-source platform connecting AI assistants to government open data — MCP server, curated civic MCP directory, and anti-hallucination framework for all 559 Socrata portals

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Open-source platform connecting AI assistants to government

Use Cases

Access government data
Query open datasets
Reduce hallucinations
npstorey

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx civic-ai-tools

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Civic AI Tools

Civic AI Tools is an open-source MCP server platform that connects AI assistants directly to government open data, covering all 559 Socrata data portals and Google Data Commons. It provides curated access to thousands of civic datasets including NYC 311 complaints, restaurant inspections, housing violations, traffic data, population statistics, income data, and demographics across cities, states, and countries. An anti-hallucination framework grounds AI responses in real, verified government data rather than model-generated estimates — making it a powerful tool for journalists, researchers, civic technologists, and policy analysts.

Prerequisites

  • Node.js 18 or higher installed
  • Python 3.11 or higher installed
  • uv package manager installed
  • A Socrata App Token (optional, free from data.cityofnewyork.us — increases rate limits)
  • A Google Data Commons API key (optional, free from apikeys.datacommons.org)
1

Clone the repository

Clone the Civic AI Tools repository to your local machine.

git clone https://github.com/npstorey/civic-ai-tools.git
cd civic-ai-tools
2

Copy the environment file and configure API keys

Copy the example environment file and add your optional API tokens. The server works without them but with lower rate limits.

cp .env.example .env
3

Run the setup script

Execute the provided setup script which installs all dependencies and configures the MCP servers automatically.

./scripts/setup.sh
4

Obtain optional API keys

For higher rate limits, register for a free Socrata App Token at data.cityofnewyork.us and a free Google Data Commons API key at apikeys.datacommons.org. Add these to your .env file as SOCRATA_APP_TOKEN and DC_API_KEY.

5

Open in your MCP client

The setup script configures MCP server entries automatically. Reload VS Code, Cursor, or run 'claude' in Claude Code to start using the civic data tools.

Civic AI Tools Examples

Client configuration

Add this to your claude_desktop_config.json to connect the Civic AI Tools Socrata MCP server. Adjust the path to match where you cloned the repository.

{
  "mcpServers": {
    "civic-ai-socrata": {
      "command": "uv",
      "args": ["run", "python", "socrata_mcp.py"],
      "cwd": "/path/to/civic-ai-tools",
      "env": {
        "SOCRATA_APP_TOKEN": "your-socrata-app-token",
        "DC_API_KEY": "your-data-commons-api-key"
      }
    }
  }
}

Prompts to try

Use these prompts to query real government datasets through Claude using the civic data tools.

- "What are the top 10 complaint types in NYC 311 data for the past 30 days?"
- "Show me restaurant inspection results for Brooklyn in the last 3 months"
- "Compare the population growth of New York City, Los Angeles, and Chicago over the last decade"
- "What are the median household income levels across New York State counties?"
- "Find housing violations filed in Manhattan in the past year and show the most common violation types"

Troubleshooting Civic AI Tools

Setup script fails with missing uv or Python version errors

Install uv first with 'curl -LsSf https://astral.sh/uv/install.sh | sh', then confirm Python 3.11+ is available. The setup script requires both Node.js 18+ and Python 3.11+ to be present.

Socrata API returns 429 rate limit errors

Register for a free Socrata App Token at data.cityofnewyork.us and add it to your .env file as SOCRATA_APP_TOKEN. Without a token, all queries share a very low anonymous rate limit.

Data Commons queries return no results or API errors

Obtain a free DC_API_KEY from apikeys.datacommons.org and add it to your .env file. Queries for specific geographic entities must use standard DCID identifiers (e.g., 'geoId/3651000' for NYC).

Frequently Asked Questions about Civic AI Tools

What is Civic AI Tools?

Civic AI Tools is a Model Context Protocol (MCP) server that open-source platform connecting ai assistants to government open data — mcp server, curated civic mcp directory, and anti-hallucination framework for all 559 socrata portals It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Civic AI Tools?

Follow the installation instructions on the Civic AI Tools GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Civic AI Tools?

Civic AI Tools works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Civic AI Tools free to use?

Yes, Civic AI Tools is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "civic-ai-tools": { "command": "npx", "args": ["-y", "civic-ai-tools"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Civic AI Tools?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides