specir-mcp
This server provides a structured query interface for technical specification documents, enabling exact entity resolution, data fetching with graph context, explanations, searches, and status reports.
specir_resolve: Resolve an exact domain entity (command, section, table, figure, etc.) by kind and ID, optionally constrained to a specific spec.
specir_fetch: Fetch a full entity record by its canonical UID, with an option to include graph edges (cross-references) to related entities; profile filtering options (e.g., test_points, generic) may be available.
specir_explain: Combine a named entity with its defining section to understand its context and purpose.
specir_search: Search for structured entities or raw passages using a query string, supporting hybrid, entity, or passage modes, with customizable result limits and spec filtering.
specir_status: Report the current state of loaded plugins and database coverage metadata.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@specir-mcpsearch for telemetry in acme-device spec"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
specir-mcp
specir-mcp is a data-neutral framework for turning technical documents into
a structured intermediate representation (SpecIR) and querying it through six
stable MCP tools.
The repository contains no standards PDFs, extracted specification text, knowledge-base databases, model weights, or vendor-specific protocol tables. All bundled demo content is fictional.
Features
Document, section, table, figure, entity, passage, provenance, and edge IR.
Extensible domain plugin manifests with dependency-aware loading.
PDF outline-based section extraction and reusable structure parsers.
Multi-engine PDF table candidates with deterministic arbitration, geometry, non-table rejection, cross-page matching, and auditable review decisions.
SQLite-backed exact lookup, fetch, explanation, search, and status APIs.
A six-tool FastMCP surface:
specir_resolve,specir_fetch,specir_explain,specir_search,specir_status, andspecir_validate.Product-ranked
related_entitiesplus evidence-completexrefs_raw.Data-neutral typed edges for definitions, listings, field membership, and named status mentions.
Explicit coverage metadata so missing extraction is not confused with absence from a source document.
Related MCP server: literature-agent-mcp
Quick start
python -m venv .venv
. .venv/bin/activate
pip install -e ".[test]"
# Generate a small database from the fictional Acme Device Interface fixture.
specir-demo --output data/demo.db
export SPEC_IR_DB="$PWD/data/demo.db"
specir-mcp-serverThe same server may be launched from a source checkout:
fastmcp run src/specir/query/server.pyExample MCP calls:
specir_resolve(kind="command", id="A1h", spec="acme-device")
specir_fetch(uid="acme-device:2.1", include_xrefs=true,
xref_profile="test_points")
specir_explain(name="Read Telemetry", kind="command", spec="acme-device")
specir_search(query="telemetry", spec="acme-device")
specir_status()
specir_validate(mode="summary")test_points is the default fetch profile: weak or boilerplate edges remain
auditable under xrefs_raw.suppressed_references but do not enter the ranked
related_entities list. Request xref_profile="generic" for an unfiltered
debug view.
When a database contains one document, spec="auto" selects it. With multiple
documents, exact lookups return candidates and request an explicit spec.
Using your own data
Create a database with specir.query.schema.create_database, then insert
documents and entities using the schema documented by the Python dataclasses.
Set SPEC_IR_DB to that database before starting the server. The framework
never downloads or bundles source documents.
The optional PDF extractor can build coordinate-clipped section records:
from specir.extractors.pdf import build_section_tree
sections = build_section_tree("my-spec", "path/to/your-document.pdf")You are responsible for having permission to process and store the documents you supply.
Optional table extraction
Install only the engines you need. PyMuPDF is included in the core package; the other engines are optional and unavailable engines are skipped safely.
pip install -e ".[tables]" # pdfplumber
pip install -e ".[table-camelot]" # Camelot; may need system libraries
pip install -e ".[table-docling]" # neural candidate adapterfrom specir.extractors import arbitrate_candidates, generate_candidates
candidates = generate_candidates(
"path/to/your-document.pdf",
pages=[10, 11],
engines=("pymupdf", "pdfplumber"),
)
results = arbitrate_candidates(candidates)Every candidate retains its engine, strategy, bounding box, cell geometry,
quality metrics, and deterministic ID. Arbitration never treats the first
engine result as authoritative. It reports TRUSTED_AUTOMATIC,
NEEDS_REVIEW, CONFLICTING_CANDIDATES, or REJECTED_NON_TABLE and preserves
alternatives as evidence.
table_continuations.assess_continuation scores adjacent-page fragments and
keeps disagreements in a review state. recover_outer_fragment repairs nested
fragments only when the smallest enclosing candidate passes semantic,
geometric, caption-boundary, and unrelated-table checks. Neural extraction is
configured with explicit DoclingTableProfile values; no document names or
vendor rules are built into the framework.
Use build_review_queue and apply_review_decisions to bind a human decision
to the exact candidate state. Stale decisions, duplicate decisions, and
unknown replacement candidates fail closed.
Development
pytest
python -m buildThe tests create temporary synthetic databases and do not require external specifications or network access.
License
Apache License 2.0. See LICENSE.
Available Tools
5 toolsspecir_explainD
Combine a named entity with its defining section.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | command | |
| name | Yes | ||
| spec | No | auto |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior, but it only states a vague operation. It does not mention whether the operation is read-only, what output to expect, or any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence, which is concise, but it is under-specified and lacks front-loaded informative content. It uses words vaguely without explaining the tool's behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 3 parameters and no annotations, and the description does not cover the semantics of parameters or the output format. It is inadequate for an agent to understand when and how to invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no descriptions, and the description only maps 'named entity' to 'name' and 'defining section' to 'spec' implicitly. It does not clarify the meaning of 'kind' or the defaults for 'kind' and 'spec'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description says 'Combine a named entity with its defining section,' but does not use the verb 'explain' and fails to specify what the tool actually produces. This is vague and does not distinguish from sibling tools like specir_fetch or specir_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives such as specir_resolve or specir_status. There is no mention of use cases, prerequisites, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
specir_fetchB
Fetch an entity by canonical UID, optionally with graph edges.
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | ||
| include_xrefs | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full transparency burden. It only says 'Fetch' (a read-like verb) and mentions output aspects like graph edges, but does not disclose behavior such as error handling, authentication requirements, rate limits, or any potential side effects. The minimal detail goes little beyond the action itself.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence: 'Fetch an entity by canonical UID, optionally with graph edges.' Every word contributes to conveying the core purpose and key optional behavior. It is neither verbose nor under-specified in structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema, return values are covered elsewhere. However, the description lacks usage guidance relative to siblings and leaves one parameter (include_xrefs) unexplained. It provides adequate context for the primary use case but has notable gaps for a complete understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate. It adds meaning to 'uid' as 'canonical UID', which is useful, but it does not explain 'include_xrefs'. The phrase 'graph edges' might loosely relate to xrefs, but the connection is not explicit, leaving the boolean parameter's semantics unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Fetch an entity by canonical UID, optionally with graph edges' clearly states the action (fetch), the resource (entity), and the key distinction (by canonical UID, optional graph edges). It differentiates from siblings like specir_search (query-based) and specir_resolve (likely URL/id resolution) by emphasizing canonical UID fetch.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when you have a canonical UID, but it does not explicitly state when not to use it or mention alternatives among siblings. There is no direct comparison such as 'use specir_search instead when you lack a UID'. This is implied context rather than explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
specir_resolveC
Resolve an exact domain entity, section, table, or figure.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| kind | Yes | ||
| spec | No | auto |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility for disclosing behavior. It does not state whether the operation is read-only, what happens on lookup failure, whether it is idempotent, or any error behavior. The brief phrasing leaves too much implicit for a tool with no annotation safety net.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that is easy to parse. It avoids fluff, though it may be too terse for the tool's complexity. Still, it earns high marks for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three parameters, zero schema descriptions, no annotations, and only a minimal description, it is inadequate. The output schema helps with return values, but parameter usage, edge cases, and selection criteria are missing, making this incomplete for an agent to reliably invoke.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description adds almost no parameter detail. It mentions kinds of entities but does not explain the 'kind' and 'id' parameters or the 'spec' parameter's role. With three parameters and no schema descriptions, this is a critical gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Resolve') and the target resource types ('exact domain entity, section, table, or figure'). This gives a clear sense of the tool's purpose and distinguishes it somewhat from siblings like 'search' by emphasizing exactness, though 'resolve' vs 'fetch' remains ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The word 'exact' implies this tool should be used when you have a precise identifier rather than when you need exploratory search, but it does not explicitly mention alternatives or conditions. There is no when-not guidance or reference to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
specir_searchC
Search structured entities or raw passages.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | hybrid | |
| spec | No | ||
| limit | No | ||
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It only states that it 'searches', but fails to mention whether it is read-only, any side effects, rate limits, or how it handles the 'mode' parameter. This lack of transparency is a significant gap for a tool with zero annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The single sentence is concise and front-loaded, but it is under-specification for a tool of this complexity. While there is no wasted wording, the description lacks critical details about parameters and behavior, making it less 'appropriately sized' than a truly concise yet informative description would be.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although an output schema exists (reducing the need to describe return values), the description still omits parameter semantics and behavioral details. With four parameters and no annotations, the description is too sparse to be considered complete for an agent to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description makes no mention of any parameters. The schema shows four parameters (mode, spec, limit, query) with defaults, but the description does not explain their meaning or usage, leaving the agent to guess. This is insufficient for a tool with multiple parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Search' and identifies the resource types ('structured entities or raw passages'), which clearly distinguishes it from sibling tools like resolve, fetch, explain, and status. However, it does not elaborate on what constitutes 'structured entities' or 'raw passages', leaving some ambiguity about the exact scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use this tool versus alternatives. There is no mention of preferred contexts, exclusions, or relationships to sibling tools like specir_resolve or specir_fetch. The agent receives no directional help for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
specir_statusB
Report plugin state and database coverage.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears the burden of disclosing behavioral traits. 'Report plugin state and database coverage' implies a read-only operation but does not mention potential side effects, required permissions, or output format. It adds minimal context beyond the function name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the verb 'Report' and the key resources. Every word contributes to the meaning, with no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no parameters and an existing output schema, the description is minimally adequate. However, 'plugin state' and 'database coverage' are vague phrases; giving examples of what these entail would improve completeness. The ambiguity may leave an agent unsure about the exact scope of the report.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema shows an empty object with 100% coverage, so there are no parameter semantics to explain. The baseline for 0 params is 4, and the description correctly avoids adding unnecessary parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the verb 'Report' and identifies the resources 'plugin state' and 'database coverage', clearly indicating the tool's purpose. It is distinct from sibling tools (resolve, fetch, explain, search) by focusing on status reporting, though it lacks explicit differentiation language.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like specir_resolve or specir_search. It simply states what the tool does, leaving the agent to infer appropriate use cases from the name and sibling context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct primary purpose: resolve by name, fetch by UID, explain with context, search broadly, and status for system info. Resolve and fetch are similar but differentiated by input type (name vs UID), while explain is a composite of entity and section.
All tools follow a consistent specir_ prefix followed by a clear action verb (resolve, fetch, explain, search, status). The pattern is uniform and predictable, making it easy to infer tool behavior from name alone.
Five tools is ideal for a focused specification entity retrieval service. Each tool covers a distinct interaction mode without redundancy, and the count is well within the typical range for a useful MCP server.
The tool set covers the core needs for querying a spec database: search, targeted retrieval by name or UID, contextual explanation, and system status. No obvious lifecycle operations are missing because the domain is read-only retrieval, and the provided methods form a complete workflow.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
SpecProof: Search standards specs with MCP-ready precision.
Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries
IEEE Xplore MCP — BYOK wrapper over the IEEE Xplore Metadata Search API
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to search, discover, and retrieve technical specifications from a SpecLib instance. It provides tools for full-text search, scope listing, and reading specs as markdown content.
- FlicenseCqualityDmaintenanceExposes a local biomedical literature pipeline as MCP tools for automated research workflows. Enables literature search, open-access paper retrieval, and draft generation for biomedical and pathology domains through standard MCP clients.6

Specifai MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for Specifai project integration and automation with any MCP-compatible AI tool. This server currently exposes tools to read all documents generated by the Specifai project.1913MIT- AlicenseAqualityBmaintenanceVendor-neutral MCP server for knowledge retrieval across repositories, offering stable tools for searching, getting, and listing documents with hybrid lexical and optional semantic search.3MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jietianliang/specir-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server