io.github.cyanheads/switzerland-parliament-mcp-server
Search Swiss parliamentary business, votes, debates, members, and declared interests.
ماذا يمكنك أن تفعل مع io.github.cyanheads/switzerland-parliament-mcp-server؟
- Keyless, read-only access to business, procedural relationships, Nationalrat roll calls, debate passages, members, and declared interests
de(default),fr, anditmetadata with no translation fallback; Italian completeness is not established. Bulletin text stays in the language the speaker used- Published text and HTML are returned unchanged, with an index of their links and images carrying absolute HTTP(S) URLs where the source supplies one
- One 45-second deadline per complete workflow, covering joins and retries
- Provenance on every result: attribution to Parlamentsdienste der Bundesversammlung, plus the source URL and retrieval time of each upstream response
- Whole-record pages: replies fit a 24,000-byte budget by returning fewer records, never shorter fields, and report
returnedCount,hasMore,totalCountwhen known, and the continuation - One record on both surfaces:
content[]carries everystructuredContentfield, with multiline text and HTML in JSON-encoded fenced blocks that decode back losslessly - Unknown stays unknown: absent source values are omitted rather than defaulted, empty results carry next-step guidance, and failures carry typed reasons such as
upstream_rate_limited
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
claude mcp add --transport http switzerland-parliament-mcp-server 'https://switzerland-parliament.caseyjhand.com/mcp'
{
"mcpServers": {
"switzerland-parliament-mcp-server": {
"type": "http",
"url": "https://switzerland-parliament.caseyjhand.com/mcp"
}
}
}
@cyanheads/switzerland-parliament-mcp-serverclaude mcp add switzerland-parliament-mcp-server -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/switzerland-parliament-mcp-server@0.1.2
{
"mcpServers": {
"switzerland-parliament-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/switzerland-parliament-mcp-server@0.1.2"
],
"env": {
"MCP_LOG_LEVEL": "info"
}
}
}
}
متغيرات البيئة
MCP_LOG_LEVELSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
@cyanheads/switzerland-parliament-mcp-serverclaude mcp add switzerland-parliament-mcp-server -e 'MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE>' -e 'MCP_HTTP_HOST=127.0.0.1' -e 'MCP_HTTP_PORT=3010' -e 'MCP_HTTP_ENDPOINT_PATH=/mcp' -e 'MCP_AUTH_MODE=none' -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/switzerland-parliament-mcp-server@0.1.2
{
"mcpServers": {
"switzerland-parliament-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/switzerland-parliament-mcp-server@0.1.2"
],
"env": {
"MCP_TRANSPORT_TYPE": "<MCP_TRANSPORT_TYPE>",
"MCP_HTTP_HOST": "127.0.0.1",
"MCP_HTTP_PORT": "3010",
"MCP_HTTP_ENDPOINT_PATH": "/mcp",
"MCP_AUTH_MODE": "none",
"MCP_LOG_LEVEL": "info"
}
}
}
}
متغيرات البيئة
MCP_TRANSPORT_TYPESelects the HTTP transport.MCP_HTTP_HOSTThe hostname for the HTTP server.MCP_HTTP_PORTThe port to run the HTTP server on.MCP_HTTP_ENDPOINT_PATHThe endpoint path for the MCP server.MCP_AUTH_MODEAuthentication mode to use: 'none', 'jwt', or 'oauth'.MCP_LOG_LEVELSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
المحتويات
@cyanheads/switzerland-parliament-mcp-server
Search Swiss parliamentary business, votes, debates, members, and declared interests via MCP. STDIO or Streamable HTTP.
7 Tools • 0 Resources • 0 Prompts
Public Hosted Server: https://switzerland-parliament.caseyjhand.com/mcp
Overview
Swiss Federal Assembly records from Curia Vista and the Amtliches Bulletin. Find parliamentary business, read its original texts and procedural history, follow the debate in either council, inspect Nationalrat roll calls, and look up members and declared interests. Uses the public OData service without an API key; runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Results credit Parlamentsdienste der Bundesversammlung, Bern, with source URLs and download dates. This is an unofficial reproduction. The Parliament's open-data conditions apply to source content; underlying author rights remain intact.
Tools
| Tool | Description |
|---|---|
chparl_search_business | Find business by title, submitter, type, status, submission session, dates, or committee role |
chparl_get_business | Read business metadata, original texts, status history, bills, related business, committee consultations, or debate subjects |
chparl_get_votes | Find Nationalrat roll calls, page member decisions, or read complete vote and parliamentary-group counts |
chparl_search_transcripts | Find debate passages by business, subject, speaker, session, council, or dates; retrieve original text |
chparl_search_members | Find current or former parliamentary affiliation records by name, council, canton, party, or group |
chparl_get_member | Read parliamentary identity, council terms, committee memberships, or declared interests |
chparl_list_reference | Resolve identifiers, coverage, languages, codes, committees, and sessions |
Capability reference
chparl_search_business tool
query(title substring),author(published submitter label, not every co-signatory),typeId,statusId,sessionId(submission session),committeeId, and inclusivesubmittedFrom/submittedTo. Newest business IDs first, default 20/max 100- Continue with
nextCursorand unchanged filters; a cursor from other filters fails asinvalid_cursor.totalCountis reported only without author or committee filters. Author searches use an extra matching row to establish continuation; committee searches page role candidates, so pages can be short
chparl_get_business tool
- Canonical eight-digit
businessIdor an exact published short number such as99.1234. A short number matching several businesses fails asambiguous_business_number, and a miss returnsfound: false overview(default) returns metadata andavailableTextFieldswith UTF-8 sizes.textsreturnstextDocument.kind: "full" | "outline": several large fields become an outline, and namedtextFieldsalways return wholestatus_history,bills,related_business,preconsultations, andsubjectspage independently, default 20/max 100 withnextOffset.subjectsIDs narrowchparl_search_transcripts; linked bills are parliamentary records, not enacted law
chparl_get_votes tool
mode: "votes"withbusinessId,sessionId, or both lists roll calls (default 10/max 50). A returnedvoteIdfeedsmode: "members"(default 50/max 100, optionalpersonNumber) ormode: "groups"(unpaged). Paged modes continue withnextOffsetmode: "members"withpersonNumberand novoteIdpages that member's voting history, optionally narrowed bybusinessIdandsessionId. Each history row carries its published vote, business, session, and time fields; selected-vote pages carry that context once invote.cantonIduses the canton reference's numbering;votingCantonIdpreserves the source Voting identifiermemberscounts carrydecisionCounts.scope: "page".groupsreads every published member row and returnsscope: "vote",complete: true, and per-group totals by the affiliation recorded on the vote. Count buckets retain every distinct published label indecisionTexts. Decision codes: 1 yes, 2 no, 3 abstention, 4 present, 5 did not participate, 6 excused under Art. 57 para. 4, 7 president does not vote, 8 resigned- Nationalrat only, from the 2003 winter session. An empty result does not establish that no vote occurred
chparl_search_transcripts tool
- Both councils from the 1999 winter session. Scope with
businessIdorsubjectId(exclusive),personNumber,sessionId, or a date bound;councilonly narrows.query(original-text substring) also needssessionIdor a closed range of at most 31 calendar days - Metadata with
textSizeBytesby default (20/max 100);includeText: truereturns whole passages (3/max 10); an exacttranscriptIddefaults to full text. Continue withnextOffset - A business search covers up to 20 debate subjects; more fails as
business_scope_too_broad, so pagechparl_get_businesssectionsubjectsand pass onesubjectId.foundmarks exact-ID misses,scopeFounda missing business
chparl_search_members tool
query(first, last, or official name substring),membership(currentdefault,former,all),council(N/Sor the German, French, or Italian council name),cantonId,partyId,groupId. Default 20/max 100,nextOffset- Rows are MemberCouncil affiliation records, not deduplicated people. Their
personNumber, which need not equalPerson.ID, feedschparl_get_member,chparl_get_votes, andchparl_search_transcripts
chparl_get_member tool
- Requires
personNumber.overview(default) returns identity and every MemberCouncil affiliation, unpaged; a miss returnsfound: false council_terms,committees, andinterestspage independently, default 20/max 100 withnextOffset. Committee rows are published memberships, not a historical ledger. A missingpaidflag means unknown, and empty interests do not establish the absence of conflicts
chparl_list_reference tool
- Static topics
identifiers,coverage,languages, andstatuses(the official vocabulary effective 1 July 2023, each code taggedera: "legacy" | "current"). Live dictionariesbusiness_types,councils,cantons,parties,groups,committees, andsessions - Default 50/max 100,
nextOffset. Onlysessionsaccepts dates:dateFrombounds the start anddateTothe end, inclusively
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Swiss Parliament-specific:
- Keyless, read-only access to business, procedural relationships, Nationalrat roll calls, debate passages, members, and declared interests
de(default),fr, anditmetadata with no translation fallback; Italian completeness is not established. Bulletin text stays in the language the speaker used- Published text and HTML are returned unchanged, with an index of their links and images carrying absolute HTTP(S) URLs where the source supplies one
- One 45-second deadline per complete workflow, covering joins and retries
Agent-friendly output:
- Provenance on every result: attribution to Parlamentsdienste der Bundesversammlung, plus the source URL and retrieval time of each upstream response
- Whole-record pages: replies fit a 24,000-byte budget by returning fewer records, never shorter fields, and report
returnedCount,hasMore,totalCountwhen known, and the continuation - One record on both surfaces:
content[]carries everystructuredContentfield, with multiline text and HTML in JSON-encoded fenced blocks that decode back losslessly - Unknown stays unknown: absent source values are omitted rather than defaulted, empty results carry next-step guidance, and failures carry typed reasons such as
upstream_rate_limited
Getting started
Connect to the hosted instance, no install:
claude mcp add --transport http switzerland-parliament-mcp-server https://switzerland-parliament.caseyjhand.com/mcp
Or run it locally:
claude mcp add switzerland-parliament-mcp-server -- npx -y @cyanheads/switzerland-parliament-mcp-server
For other clients, add this to the MCP config file:
{
"mcpServers": {
"switzerland-parliament-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/switzerland-parliament-mcp-server"]
}
}
}
For Docker or a source build, see Running the server.
Configuration
No server-specific environment variables are required.
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_SESSION_MODE | HTTP session mode: stateless, stateful, or auto. | stateless |
MCP_AUTH_MODE | Authentication: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, warning, error, etc.). | info |
LOGS_DIR | Directory for log files (Node.js only). | <app-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry. | false |
See .env.example for the common framework overrides.
Running the server
Local development
Requires Bun v1.4.0 or higher (or Node.js v24+).
git clone https://github.com/cyanheads/switzerland-parliament-mcp-server.git
cd switzerland-parliament-mcp-server
bun install
cp .env.example .env
- Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdio - Run checks and tests:
bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite
Docker
docker run --rm -p 3010:3010 ghcr.io/cyanheads/switzerland-parliament-mcp-server:latest
The image defaults to HTTP transport, stateless sessions, and logs to /var/log/switzerland-parliament-mcp-server. For stdio, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/switzerland-parliament-mcp-server:latest"]. Build locally with docker build -t switzerland-parliament-mcp-server .; --build-arg OTEL_ENABLED=false omits OpenTelemetry peers.
Project structure
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point and service setup; seven tools, no resources or prompts. |
src/mcp-server/tools | Tool definitions, shared lossless rendering, and whole-record page fitting. |
src/services/parliament | OData client, workflow deadlines, domain schemas and services, provenance, and reference snapshots. |
tests/ | Unit and integration tests, mirroring the src/ structure. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor logging,ctx.statefor storage - Register new tools and resources in the
createApp()arrays insrc/index.ts - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
الأسئلة الشائعة
ما هو io.github.cyanheads/switzerland-parliament-mcp-server؟
Search Swiss parliamentary business, votes, debates, members, and declared interests.
كيف أثبّت io.github.cyanheads/switzerland-parliament-mcp-server؟
يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http switzerland-parliament-mcp-server 'https://switzerland-parliament.caseyjhand.com/mcp'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج io.github.cyanheads/switzerland-parliament-mcp-server إلى مفتاح API؟
لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.
هل io.github.cyanheads/switzerland-parliament-mcp-server مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص Apache-2.0.
من يصون io.github.cyanheads/switzerland-parliament-mcp-server؟
ينشره cyanheads. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.