MCP server for interacting with Civis Platform through Agentic AI
1.9K
A Model Context Protocol server that provides an interface to the Civis Platform
Add the following to your Claude settings:
{
"mcpServers": {
"civis": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "CIVIS_API_KEY" "civisanalytics/mcp-server"],
"env": {
"CIVIS_API_KEY": "Put a valid API key here"
}
}
}
}
The settings file is at ~/Library/Application\ Support/Claude/claude_desktop_config.json on MacOS.
You'll need to add a valid Civis API key to the file, so make sure to run chmod 600 to restrict access to that file, and never commit it to version control.
Add the following JSON block to your User Settings (JSON) file in VS Code.
You can do this by pressing Ctrl + Shift + P and
typing Preferences: Open User Settings (JSON).
Optionally, you can add it to a file called .vscode/mcp.json in your
workspace. This will allow you to share the configuration with others.
Note that the
mcpkey is needed when using themcp.jsonfile.
{
"mcp": {
"inputs": [{
"type": "promptString",
"id": "CIVIS_API_KEY",
"description": "CIVIS API Key",
"password": true
}],
"servers": {
"civis": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "CIVIS_API_KEY",
"civisanalytics/mcp-server",
],
"env": {
"CIVIS_API_KEY": "${input:CIVIS_API_KEY}"
}
}
}
}
The --schema parameter limits the server to read-only data exploration within a specific schema, disabling workflow tools and access to other schemas.
When enabled:
run_query, list_tables, get_table, pull_data_list, publish_html_reportBEGIN READ ONLY;To enable, add "--schema", "your_schema" to the args. You can optionally add "--description", "context about your data" to help the AI understand the data.
{
"mcpServers": {
"civis": {
"command": "docker",
"args": [
"run", "-i", "--rm", "-e", "CIVIS_API_KEY",
"civisanalytics/mcp-server",
"--schema", "analytics_mart"
],
"env": {
"CIVIS_API_KEY": "your-api-key"
}
}
}
}
When using uvâ no specific installation is needed. We will
use uvxâ to directly run mcp-server-civis.
Alternatively you can install mcp-server-civis via pip:
pip install mcp-server-civis
After installation, you can run it as a script using:
python -m mcp_server_civis
You can use the MCP inspector to debug the server. For uvx installations:
npx @modelcontextprotocol/inspector uvx mcp-server-civis
Or if you've installed the package in a specific directory or are developing on it:
cd path/to/servers/src/time
npx @modelcontextprotocol/inspector uv run mcp-server-civis
Docker build:
docker build -t civisanalytics/mcp-server .
We encourage contributions to help expand and improve mcp-server-civis. Whether you want to add new time-related tools, enhance existing functionality, or improve documentation, your input is valuable.
For examples of other MCP servers and implementation patterns, see: (https://github.com/modelcontextprotocol/serversâ )
Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-civis even more powerful and useful.
mcp-server-civis is licensed under the 3-Clause BSD License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of that license. For more details, please see the LICENSE.md file in the project repository.
Content type
Image
Digest
sha256:9d2ba19f0âĤ
Size
52.4 MB
Last updated
4 months ago
docker pull civisanalytics/mcp-server