Skip to content

[integrations] Enhanced MCP server with alpha tool suite#6

Open
alanshurafa wants to merge 6 commits intomainfrom
contrib/alanshurafa/enhanced-mcp
Open

[integrations] Enhanced MCP server with alpha tool suite#6
alanshurafa wants to merge 6 commits intomainfrom
contrib/alanshurafa/enhanced-mcp

Conversation

@alanshurafa
Copy link
Copy Markdown
Owner

Summary

  • Adds a production-grade remote MCP server in integrations/enhanced-mcp/ expanding the tool surface from 4 to 14 tools
  • Includes enhanced search (semantic + full-text), full CRUD, content dedup via SHA-256 fingerprinting, automatic LLM classification, sensitivity detection, and operational monitoring
  • Schema-backed tools (graph_search, entity_detail, ops_capture_status, ops_source_monitor) gracefully degrade when optional schemas (smart-ingest, knowledge-graph) are absent
  • Original server/ is untouched — this deploys as a second remote connector

Dependencies

Files

integrations/enhanced-mcp/
  README.md              — Setup guide with 5 numbered steps
  metadata.json          — Passes .github/metadata.schema.json validation
  deno.json              — Import map matching server/ versions
  index.ts               — 14-tool MCP server (Hono + StreamableHTTPTransport)
  _shared/config.ts      — Constants, classifier prompt, sensitivity patterns
  _shared/helpers.ts     — embedText, extractMetadata, detectSensitivity, prepareThoughtPayload

Tool Surface (14 tools)

# Tool Schema
1-7 search_thoughts, list_thoughts, get_thought, update_thought, delete_thought, capture_thought, thought_stats Enhanced Thoughts
8-10 search_thoughts_text, count_thoughts, related_thoughts Enhanced Thoughts
11 ops_capture_status Smart Ingest
12-13 graph_search, entity_detail Knowledge Graph
14 ops_source_monitor Ops Views

Test Plan

  • All 15 OB1 PR Gate checks pass
  • metadata.json validates against .github/metadata.schema.json
  • README links resolve (../../docs/01-getting-started.md, ../../docs/05-tool-audit.md)
  • No credentials, no local MCP patterns
  • Deploy to test Supabase project and smoke-test core tools

Generated with Claude Code

Deploys as a new remote MCP integration alongside the stock server,
expanding the tool surface from 4 to 14 tools with enhanced search
(semantic + full-text), CRUD, content dedup, LLM classification,
sensitivity detection, and operational monitoring.

Schema-backed tools (graph_search, entity_detail, ops_capture_status,
ops_source_monitor) gracefully degrade when optional schemas are absent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7633681f7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +114 to +116
if (!response.ok) {
throw new Error(`OpenRouter embedding failed (${response.status}): ${await response.text()}`);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use OpenAI fallback when OpenRouter embeddings fail

The embedText helper currently throws as soon as OpenRouter returns a non-2xx response, which prevents execution from ever reaching the documented OpenAI fallback branch even when OPENAI_API_KEY is configured. In environments with both providers enabled, any transient OpenRouter failure will hard-fail embedding-dependent tools (search_thoughts semantic mode, capture_thought, update_thought) instead of degrading gracefully to OpenAI.

Useful? React with 👍 / 👎.

supabase: { from: (name: string) => { select: (cols: string) => { limit: (n: number) => Promise<{ error: unknown }> } } },
tableName: string,
): Promise<boolean> {
const { error } = await supabase.from(tableName).select("id").limit(0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make table existence checks column-agnostic

The schema guard utility claims to test whether a relation exists, but it probes by selecting id, which incorrectly returns false for any valid table/view that does not expose an id column. Because this helper is used to gate optional tools, a deployed schema can be present yet reported unavailable purely due to column shape. The existence check should not assume a specific column name.

Useful? React with 👍 / 👎.

alanshurafa and others added 2 commits April 6, 2026 11:37
Add blank lines around headings (MD022), fenced code blocks (MD031),
and between adjacent blockquotes (MD028). Fix broken link fragment
(MD051) and remove extra blank line (MD012). No content changes.

These errors were blocking CI on all open PRs since the lint check
runs repo-wide.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each section's numbered list now restarts at 1 instead of continuing
the global count (3-14), satisfying markdownlint MD029/ol-prefix rule.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation recipe labels Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation integration recipe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant