MCP server for fetching and analyzing annual reports from Swedish companies using Bolagsverket API, with vector indexing and LLM integration for report analysis
This server has critical structural issues that make it unsuitable for production use. While 4 tools are defined with basic descriptions and input schemas are present, the implementation suffers from severe gaps: (1) Tool #4 (extract_table_as_structured_data) accepts a 'table' parameter of type 'object' described as 'BeautifulSoup table element', this violates the secret-injection and input-validation patterns; passing complex Python objects as parameters is not serializable over MCP and cannot work with remote clients. (2) None of the 4 tools document their return/output schema, violating pattern:tool and pattern:response-shaper. (3) Parameter descriptions are present but minimal (9-25 chars on average), failing to meet the baseline of 72 chars and leaving ambiguities unresolved. (4) No error handling documentation; tools call external APIs (Bolagsverket, OAuth token manager) with timeout and HTTP error handling in code but no recovery guidance for LLMs. (5) Tool #1 and #2 require Swedish organization numbers but descriptions don't guide LLMs on format or what 'identitetsbeteckning' means. (6) The parse_xhtml tool (tool #3) accepts a file_path and implicitly assumes local filesystem access, no mention of security, path traversal prevention, or file size limits. (7) All tools are READ_ONLY but no tool annotations (readOnlyHint) are present in the schema. The server is STDIO-only and cannot be used with hosted MCP clients, capping protocol readiness at 50 before additional deductions.
Extract a BeautifulSoup table element as structured data
Fetch and download annual report for a specific organization and year from Bolagsverket API
Fetch organisation data from Bolagsverket API for a given organization number
Parse XHTML file from annual reports with improved handling of tables and structure, extracting text, numbers, and financial data
Tool #4 (extract_table_as_structured_data) accepts a BeautifulSoup object parameter, which is not JSON-serializable and cannot be passed over MCP protocol. This tool is unusable in its current form.
No tool documents its output/return schema. LLMs cannot plan downstream calls or parse responses without knowing the structure of returned data. This violates the tool and response-shaper patterns.
Parameter descriptions are minimal (9-25 chars) and lack actionable constraints. 'org_no' doesn't specify format; 'year' lacks range; 'file_path' doesn't mention security or constraints. Descriptions should average 72 chars and include format, range, and restrictions.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 39 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 52 | - | v1 |
parse_xhtml and fetch_annual_report accept file system paths without documented validation, size limits, or access restrictions. Agents could be tricked into reading arbitrary files.
No error handling guidance in tool definitions. Code contains try-catch blocks and raises HTTPError, ValueError, Timeout, but LLMs have no recovery instructions. Errors should include 'what went wrong' and 'what to try next'.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) present in definitions. All 4 tools are marked risk: READ_ONLY but no annotations in schema to signal this to clients.
Unclear what domains these tools serve. Names reference Swedish 'Bolagsverket' (Swedish Companies Registration Office) but descriptions don't explain the context. LLMs may not know when to call these tools or what data they retrieve.