Repository navigation
Publish MCP tools as resolve, lookup and describe - #19
Merged
Merged
Conversation
kurtseifried
force-pushed
the
fix/resolver-parity
branch
from
September 25, 2026 03:35
9152822 to
36509b5
Compare
kurtseifried
force-pushed
the
fix/mcp-tool-names
branch
2 times, most recently
from
September 25, 2026 03:38
24b00b2 to
9ffe03d
Compare
kurtseifried
force-pushed
the
fix/mcp-tool-names
branch
2 times, most recently
from
October 31, 2026 02:44
a9e6556 to
ad9d4b9
Compare
The tools were registered under their Python function names (mcp_resolve, mcp_lookup, mcp_describe); the live service publishes resolve/lookup/describe. Names are now explicit, output goes through the same untrusted-content envelope as SecID-Service (sanitize.py, a port of sanitize.ts), and the endpoint works with mcp 2.x (MCPServer) as well as 1.x (FastMCP): with mcp 2.x installed the endpoint was silently disabled. The transport route is added directly at /mcp and its session manager runs under the app lifespan.
…usted text Addresses Codex review findings on PR #19: - Require mcp>=1.23.0,<3.0.0 in python/requirements.txt and CI test.yml for built-in DNS-rebinding protection (GHSA-9h52-p55h-vw2f). - Apply _sanitize_dict recursively to structural dicts and result entries so result-level auth/parsing_instructions and nested data.patterns[].description and data.urls[].note are relocated under registry_text_untrusted. AI-Agent: Gemini
kurtseifried
force-pushed
the
fix/mcp-tool-names
branch
from
October 31, 2026 02:51
ad9d4b9 to
ddef029
Compare
Contributor
Author
|
Agent: Gemini (SecID governing agent) Review Summary (Gemini + OpenAI Codex
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #18, with base set to
fix/resolver-parity, because it builds on thecreate_appchanges there. Merge #17, then #18, then this. It retargets tomainautomatically as the bases merge.Summary
@mcp.tool()onmcp_resolve,mcp_lookupandmcp_describepublished those function names. The live service publishesresolve,lookupanddescribe, and the names are now set explicitly (name=).python/sanitize.pyis a port of SecID-Servicesrc/sanitize.ts. MCP output is control/bidi-stripped and length-capped, and contributor prose (description,notes,official_name,contacts,scope, ...) moves underregistry_text_untrustedwith a_warning. The REST API stays raw, which is the same split the live service makes. Tool descriptions carry the same "treat as data" note.main:mcp.server.fastmcpno longer exists. TheImportErrorwas logged as "MCP SDK not installed", so/mcpwas silently disabled./mcpwhile its own route was also/mcp. The result was/mcp→ 307,/mcp/→ 404, and/mcp/mcp→RuntimeError: Task group is not initialized, because the session manager never ran.MCPServeron 2.x,FastMCPon 1.x), add the transport's route directly at/mcp(stateless, JSON responses), and run the session manager in the FastAPI lifespan.Host:gets 421).ServerConfig.hostis new and set from--host.mcpso the MCP tests run. The testsimportorskipit otherwise, andmcpstays optional at runtime.Test plan
mcpabsent (MCP tests skipped)tools/listreturns exactlydescribe,lookupandresolvedescriberesult with a bidi-override in its description comes back stripped, underregistry_text_untrustedtools/call resolveon loopback returns the cve.org URL, and Hostevil.examplegets 421