Skip to main content
Glama

sg-eli-mcp

An MCP server for Singapore Statutes Online (SSO, sso.agc.gov.sg), the Attorney-General's Chambers' official portal for Singapore legislation. It browses, fetches, and cites Acts, with a verifiable citation on every response.

Part of the MateMatic eu-legal-mcp production line, extended into Asia alongside jp-eli-mcp. Same citation contract (a stable identifier + a human-readable citation + a source URL), adapted for a jurisdiction with no ELI and no public search API.

Scope. SSO's robots.txt disallows /search; discovery here is by browsing the current Acts listing (sg_list_acts, paginated), not by title or keyword query. Fetch a specific section (sg_get_provision) or the full text (sg_get_full_text, truncated for very large Acts). Every response carries a dataset_note.

Licence. SSO legislation is official public information published by the Singapore government. This connector relays it with attribution and a source_url, respects robots.txt (no /search calls), and does not cache more aggressively than a normal browser visit would.

The tools

Tool

What it does

sg_list_acts

Browse the current Acts, paginated (no keyword search - see Scope above).

sg_get_provision

The text of one numbered section of an Act, by act_code and section number.

sg_get_full_text

The full text of an Act (truncated at ~300,000 characters).

sg_coverage

Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback.

Every response carries the contract: eli_uri (Singapore has no ELI - this is the durable SSO act URL, e.g. https://sso.agc.gov.sg/Act/CoA1967, see eli_note), human_readable_citation (the Act title as SSO itself renders it, e.g. Companies Act 1967), and source_url.

Related MCP server: ie-eli-mcp

Install

Not yet on PyPI - install from source until the first release ships:

git clone https://github.com/matematicsolutions/sg-eli-mcp
cd sg-eli-mcp
pip install -e .

Once released, this will be uvx sg-eli-mcp.

Configuration via env:

  • SG_ELI_BASE_URL - default https://sso.agc.gov.sg

  • SG_ELI_CACHE_DIR - default ~/.matematic/cache/sg-eli

  • SG_ELI_AUDIT_DIR - default ~/.matematic/audit

No API key. SSO is keyless.

Configure (Claude Code / any MCP client)

{
  "mcpServers": {
    "sg-eli-mcp": { "command": "sg-eli-mcp" }
  }
}

Windows 11 with Smart App Control

Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe and the sg-eli-mcp.exe launcher that pip writes at install time. The python.exe and py.exe from the python.org installer are signed by the Python Software Foundation, so running the module through the interpreter works:

python -m pip install sg-eli-mcp
python -m sg_eli_mcp

pip.exe is blocked for the same reason, so install with python -m pip, not pip install. If python is not on PATH, use the Windows launcher: py -3 -m sg_eli_mcp.

{ "mcpServers": { "sg-eli-mcp": { "command": "python", "args": ["-m", "sg_eli_mcp"] } } }

Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.

Governance

  • Public data only - read-only against SSO; no client data leaves the machine.

  • Robots-compliant - never calls /search (disallowed by SSO's robots.txt); discovery uses only the allowed /Browse listing.

  • Audit log - every tool call appends one JSON line to ~/.matematic/audit/sg-eli-mcp.jsonl.

  • Vendor-neutral - talks only to sso.agc.gov.sg; no LLM provider, no telemetry.

  • Verifiable citations - every response is independently checkable via source_url.

See CONSTITUTION.md and DISCOVERY.md.

Tests

pip install -e ".[dev]"
pytest tests/test_instructions_drift.py -v   # offline
pytest tests/test_smoke.py -v                # hits live SSO

Licence

Apache-2.0. © Matematic Solutions / Wieslaw Mazur.

Available Tools

4 tools
sg_coverageA
Read-onlyIdempotent

Declare what this connector covers, how it is sourced, and what it does NOT cover.

Call this before telling a user that the law "does not contain" something, and whenever a search comes back empty: the absence may be a gap in this connector rather than in the law. Every gap carries a fallback saying where to look instead.

Returns: Coverage with families, an as-of note, and a non-empty list of known gaps.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusNo
familiesNo
as_of_noteYesStates what the dates mean, and what they do not promise.
known_gapsNoNever empty. An empty list would mean 'not checked', not 'no gaps'.

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes beyond the annotations by explaining the open-world behavior: an empty result may indicate a coverage gap, not a true absence in the law. It also discloses that every gap carries a fallback direction, and the return includes families, an as-of note, and a non-empty gap list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a clear one-line purpose, explicit usage guidance, and a concise return summary. Every sentence earns its place, and the key caveat about gaps is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless tool with rich annotations and an output schema, the description is complete. It covers what the tool returns, when to call it, and why the open-world caveat matters. Nothing needed for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema coverage is 100%, so there are no parameter semantics to clarify. The description adds useful return-format context instead, which is appropriate for a no-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: declare what the connector covers, how it is sourced, and what it does NOT cover. It differentiates itself from siblings like sg_list_acts and sg_get_full_text by being about coverage rather than content retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-call guidance: before telling a user the law 'does not contain' something, and whenever a search returns empty, because absence may be a connector gap rather than a legal gap. This is highly actionable and leaves no ambiguity about when the tool is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sg_get_full_textA
Read-onlyIdempotent

Fetch the full text of an act. Large acts are truncated.

ParametersJSON Schema
NameRequiredDescriptionDefault
act_codeYesSSO's short act code, e.g. ``"CoA1967"`` (Companies Act 1967).

Output Schema

ParametersJSON Schema
NameRequiredDescription
titleNo
contentNo
eli_uriNo
act_codeYes
eli_noteNo
byte_sizeNo
truncatedNo
source_urlNo
dataset_noteNo
human_readable_citationNo

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, non-destructive, idempotent behavior. The description adds an important behavioral warning: 'Large acts are truncated.' This goes beyond annotations and is critical for agent expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—two short sentences—with no wasted words. It front-loads the core action and adds a critical caveat. Perfect size for its simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 required param, output schema exists), the description covers all necessary context: what it fetches, the truncation behavior, and the parameter. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a clear description for act_code. The tool description does not add further parameter meaning beyond 'act code.' Baseline 3 is appropriate since the schema already handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Fetch' and the resource 'full text of an act'. It also distinguishes from siblings: sg_get_provision retrieves a specific provision, and sg_list_acts lists acts, while this tool gets the entire act text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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. It does not mention situations where sg_get_provision might be more appropriate for shorter excerpts, nor any prerequisites or context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sg_get_provisionA
Read-onlyIdempotent

Fetch the text of one numbered section of an act.

ParametersJSON Schema
NameRequiredDescriptionDefault
act_codeYesSSO's short act code, e.g. ``"CoA1967"`` (Companies Act 1967).
provision_numYesthe plain section number, e.g. ``"1"``.

Output Schema

ParametersJSON Schema
NameRequiredDescription
textNo
captionNo
eli_uriNo
act_codeYes
eli_noteNo
source_urlNo
dataset_noteNo
provision_numYes
human_readable_citationNo

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint true and destructiveHint false, so the safety profile is clear. The description adds minimal behavioral context beyond fetching text, which is adequate given the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently conveys the tool's purpose with no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with full schema coverage, good annotations, and an output schema present. The description, combined with structured data, provides complete context for selecting and invoking the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters (act_code and provision_num). The tool description does not add further meaning, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the verb 'Fetch' and resource 'text of one numbered section of an act', clearly distinguishing it from siblings like sg_get_full_text (full act text) and sg_list_acts (list acts).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives, but the sibling names imply the use case for single sections. No exclusions or context about prerequisites are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sg_list_actsA
Read-onlyIdempotent

Browse Singapore's current Acts (paginated - SSO has no keyword search API).

ParametersJSON Schema
NameRequiredDescriptionDefault
page_sizeNoresults per page, 1-100 (default 20).
page_indexNo1-based page number (default 1).

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNo
page_sizeYes
page_indexYes
dataset_noteNo

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, idempotent, and open-world behavior. The description adds value by explaining pagination and the limitation of no keyword search API, which goes beyond the annotations. No contradiction found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that immediately communicates the purpose and key constraint. It is front-loaded and contains no redundant information, though it could be slightly more structured with minimal expansion.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of a full output schema, complete parameter descriptions, and informative annotations, the description adequately covers the tool's behavior and context. The limitation about keyword search is noted, making it sufficiently complete for a list tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with clear descriptions for both parameters. The description mentions pagination but does not add significant new meaning beyond what the schema already states, so it meets the baseline without exceeding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool browses Singapore's current Acts, using a specific verb and resource. It also mentions pagination and the limitation of no keyword search API, which distinguishes it from siblings like sg_get_full_text and sg_get_provision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context by noting pagination and the absence of a keyword search API, implicitly advising when to use this tool (for browsing) and avoiding search use cases. However, it lacks explicit exclusions or direct sibling comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev0.3.3
    • Addedsg_coverage
  2. 3 tool updatesv0.1.0
    • First observedsg_get_full_text
    • First observedsg_get_provision
    • First observedsg_list_acts

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct action: listing acts, retrieving a single provision, retrieving full act text, and exposing connector coverage. There is no meaningful overlap that would cause an agent to select the wrong tool.

Naming Consistency4/5

Three tools follow a consistent sg_<verb>_<noun> pattern: sg_list_acts, sg_get_provision, and sg_get_full_text. The outlier is sg_coverage, which uses a bare noun instead of a verb_noun form, but the naming remains predictable overall.

Tool Count5/5

Four tools is a well-scoped size for a focused read-only legal retrieval connector. Each tool covers a distinct core need, and there are no redundant or unnecessary additions.

Completeness4/5

The set covers listing acts, fetching full text, and fetching individual provisions, with an explicit coverage tool that documents known gaps and fallbacks. It lacks a section index and paginated full-text continuation for large acts, but those gaps are surfaced rather than hidden.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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/matematicsolutions/sg-eli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server