
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

A Cloudflare Workers-based MCP server that exposes tools for querying the CIViC cancer variant interpretation API, staging large GraphQL results into SQLite tables for SQL analysis.
CIViC MCP Server is cataloged as an MCP server attributed to quentincody. A Cloudflare Workers-based MCP server that exposes tools for querying the CIViC cancer variant interpretation API, staging large GraphQL results into SQLite tables for SQL analysis. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for CIViC MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Responses over the staging threshold are stored in a temporary SQLite database via Durable Objects and can be inspected and queried with the schema and data query tools.
It serves MCP over stateless Streamable HTTP with no MCP session Durable Object; the Durable Objects kept are application and data staging objects.
README.md · 427611242782 · 采集于 2026-11-13 12:18:30 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
This is a Cloudflare Workers-based Model Context Protocol (MCP) server that provides tools for querying the CIViC (Clinical Interpretation of Variants in Cancer) API. The server converts GraphQL responses into queryable SQLite tables using Durable Objects for efficient data processing.
The CIViC database is a crowd-sourced repository of clinical interpretations of cancer variants. This MCP server enables structured queries and data analysis of cancer genomics information through natural language interactions with AI assistants.
This server implements MCP 2026-07-28 through the fleet's stateless SDK v2 adapter:
server/discover replaces initialization and every request carries its protocol/capability envelope.Mcp-Session-Id.Mcp-Method / Mcp-Name, stamps resultType and serverInfo, and supplies cache hints.content and structuredContent on success and error, with isError: true for errors.The server defines comprehensive tool annotations for MCP clients:
// GraphQL Query Tool
annotations: {
readOnlyHint: false, // Creates/modifies data in SQLite
destructiveHint: false, // Non-destructive data staging
idempotentHint: false, // Different queries produce different results
openWorldHint: true // Interacts with external CIViC API
}
// SQL Query Tool
annotations: {
readOnlyHint: true, // Only reads data
destructiveHint: false, // Cannot modify data (read-only SQL)
idempotentHint: true, // Same query produces same results
openWorldHint: false // Operates on closed SQLite database
}
// MCP 2026-07-28 stateless Streamable HTTP
CivicMCP.serve("/mcp").fetch(request, env, ctx)
The only Durable Objects retained are application/data objects used for staging; they are not MCP transport sessions.
civic_graphql_query: Executes GraphQL queries and stages large datasetscivic_query_sql: Enables SQL-based analysis of staged datacivic_execute: Code Mode — runs JavaScript in a V8 isolate with gql.query() and schema helpers for full GraphQL accessClone this repository:
git clone <repository-url>
cd civic-mcp-server
Install dependencies:
npm install
Deploy to Cloudflare Workers:
npm run deploy
After deployment, you'll get a URL like: https://civic-mcp-server.YOUR_SUBDOMAIN.workers.dev
Add this configuration to your claude_desktop_config.json file:
{
"mcpServers": {
"civic-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://civic-mcp-server.quentincody.workers.dev/mcp"
]
}
}
}
Replace quentincody with your actual Cloudflare Workers subdomain.
Once configured, restart Claude Desktop. The server provides three main tools:
civic_graphql_query: Execute GraphQL queries against the CIViC APIcivic_query_sql: Query staged data using SQLcivic_execute: Code Mode — write JavaScript against the CIViC GraphQL API in a V8 isolatecivic_execute now includes civic.profiles, civic.profile, civic.evidence,
civic.assertions and civic.assertionEvidence alongside arbitrary gql.query().
These use the existing CIViC GraphQL API.
They are workflow additions, not a claim that new endpoints were released.
Discover candidates first:
return await civic.profiles({name: "BRAF", first: 10});
The name search is a prefix/alias match. Review all candidates and page through
pageInfo before choosing a profile ID. A feature or variant match does not mean
the whole molecular profile matches a sample. Use civic.profile(id) to inspect
the complete rawName, ordered parsedName, isComplex, isMultiVariant and
variant membership. Preserve Boolean operators, negation and parentheses. The
helper retains Gene, Factor, Fusion and Region feature types, and region ISCN
notation, without converting every feature into a gene.
Then query evidence and assertions by that exact ID. Optional diseaseId and
therapyId filter each connection without automatic fallback to broader matches:
// Replace 123 with a profile ID selected after inspecting discovery results.
const profileId = 123;
const evidence = await civic.evidence(profileId, {first: 5, status: "ACCEPTED"});
const assertions = await civic.assertions(profileId, {first: 5, status: "ACCEPTED"});
return {evidence, assertions};
Evidence underlying a selected assertion is a distinct relationship. Fetch it by
assertion ID; preserve each evidence row's own molecular profile and disease even
when they differ from the assertion. This helper defaults to ALL moderation
statuses so its linked evidence is not silently hidden. The other evidence and
assertion helpers default to ACCEPTED.
// Replace 456 with an assertion ID selected from the preceding results.
const assertionId = 456;
const options = {first: 5, after: null, status: "ALL"};
const result = await civic.assertionEvidence(assertionId, options);
if (result.__staged || result.__errors) return result;
return {...result, next: result.evidenceItems.pageInfo.hasNextPage
? {assertionId, options: {...options, after: result.evidenceItems.pageInfo.endCursor}}
: null};
Each connection has its own cursor and filtered total. Page sizes are 1–50; pass the unchanged filters and returned cursor explicitly. No helper downloads all pages or silently selects the first profile. Source citations/retraction state, moderation status, flagged/deprecated state, evidence direction/level/rating, assertion AMP level, variant origin and therapy interaction types are retained. A list of therapies is not automatically a combination treatment.
The existing 1KiB staging setting still applies, with an explicit UTF-8 check at
30KiB for helper results. Staged handles are not entity objects: return the handle
or inspect it through api.query/result tools before reading fields. The complete
response, including partial GraphQL errors and pagination, is retained in storage.
_workflow records the request and retrieval timestamp; CIViC's current API is
not an immutable historical-release selector. Reads stop at 8MB/30 seconds with
an explicit error so callers can narrow a request.
The focused tests check provider-documented fields/arguments and leaf fragments,
execute the recipe through the real shared GraphQL/staging proxies with fixture
storage, and exercise malformed responses, ambiguous matches and pagination.
The checked-in civic-schema.graphql predates Region support; the selected-field
fixture records the current documentation. Separate live acceptance on September
30, 2026 verified Gene, Factor, Fusion and Region profiles, AND/OR/parenthesized
expressions, independent evidence/assertion pagination, and disease/therapy
filters. All 19 evidence IDs retrieved for assertion 101 matched its native
linked-evidence list. Negation, cross-profile differences and retracted-source
cases retain fixture coverage; these selected live samples do not cover every
possible profile or evidence combination.
The legacy GraphQL, SQL and revision tools return both MCP response fields and
mark errors explicitly. Full responses over 30 KiB are staged with _staging;
civic_get_schema and civic_query_data (also available with the mcp_ prefix)
inspect and query them. The payloads table preserves the original response.
Standard query_data returns rows, while legacy civic_query_sql retains its
native results shape. Its optional params use native SQLite bindings on a
bounded, read-only route; that route does not expand chunk references. Live
acceptance recovered a 39,984-byte evidence response and a 60,000-character SQL
result exactly. These changes are locally verified; deployment remains pending.
pnpm exec vitest run servers/civic-mcp-server/src/utils
This server exposes three MCP Prompts that guide the model to use the civic_graphql_query tool with correct GraphQL syntax and robust search strategies:
get-variant-evidence — Generates GraphQL for Evidence Items only (no variantName filter - not supported by CIViC schema)get-variant-assertions — Generates GraphQL for Assertions only with systematic fallback strategiesget-variant-data — Executes both Evidence Items AND Assertions queries for comprehensive variant analysisExamples (VS Code Copilot Chat / slash-commands):
/get-variant-evidence molecularProfileName:"TP53 Mutation" diseaseName:"Lung Adenocarcinoma" evidenceType:"PROGNOSTIC" first:"200"/get-variant-assertions molecularProfileName:"TPM3-NTRK1 Fusion" therapyName:"Larotrectinib" status:"ALL"/get-variant-data molecularProfileName:"BRAF V600E" diseaseName:"Melanoma" therapyName:"Trametinib" status:"ALL"/evidence/{id}, assertions: /assertions/{id})These prompts provide complete GraphQL queries with proper CIViC v2 schema compliance and systematic search methodologies that ensure data discovery even when users provide imperfect parameters.
You can ask Claude questions like:
Claude will use the server (and its civic_graphql_query tool) to fetch the relevant data from the CIViC database and present it to you. The server is designed to query version 2 of the CIViC API, ensuring you get up-to-date information.
If you encounter issues or Claude doesn't seem to be using the CIViC data, double-check the configuration steps above.
The server intelligently optimizes context usage by storing large results in a temporary SQLite database. When GraphQL responses meet certain criteria, the raw response is returned directly instead of creating a database:
__schema, __type, or other introspection patterns are returned directly since they contain metadata rather than data suitable for SQL conversionThis optimization makes the server more efficient and provides better error visibility while still enabling powerful SQL-based analysis for substantial datasets.
MIT License with Academic Citation Requirement - see LICENSE.md
The code in this repository is licensed under the Apache License 2.0 (see LICENSE).
If you use it in your work, please cite it (see CITATION.cff). Citation is requested, not required.
The license covers the code only. Data that this server returns comes from CIViC and stays under the terms of that source: CC0. You are responsible for your use of the data under those terms.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for CIViC MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/civic-mcp-server-quentincody)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.