SkillAgentSearch skills...

connector

Provides an abstract interface that allows LLMs to connect to fact sources such as LSPs, code diagnostics, symbol definitions/references, links, and frontmatter.

Install / Use

claude mcp add OpticLM -- npx -y github:OpticLM/connector

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

78/100

Supported Platforms

Claude Code
Claude Desktop

Our assessment of connector

connector scores 78/100 on our quality scale, 381st of 549 AI & Machine Learning skills we index.

Its MCP Server is 20 KB long, well organised into 43 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
3/20
Freshness
11/15

Maintenance, license and trust

  • The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
  • Our last check on 2026-09-02 found the source still online.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 90/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the first 100 KB of the file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.

Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

connector compared with similar skills

All 4 of these similar skills score higher than connector; compare them before choosing.

SkillScoreStarsUpdatedFormat
connector (this skill)by OpticLM7834mo agoMCP Server
claude-memby thedotmack10094.6ktodayCLAUDE.md
Agent-Reachby Panniantong10085.2k8d agoCLAUDE.md
Understand-Anythingby Egonex-AI10084.0k12d agoCLAUDE.md
headroomby headroomlabs-ai10073.7ktodayCLAUDE.md

Frequently asked questions

How do I install connector?
Run claude mcp add OpticLM -- npx -y github:OpticLM/connector. The install tabs above show the steps for each supported agent.
Which AI agents does connector work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is connector safe to use?
Our scan of the first 100 KB of the file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 90/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is connector still maintained?
The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.

@opticlm/connector

[!WARNING] This library is intended solely for implementing Optic's Extension functionality and has not been designed with reliability in mind for other purposes.

Provides an abstract interface that allows LLMs to connect to fact sources such as LSPs, code diagnostics, symbol definitions/references, links, and frontmatter; includes both an MCP implementation and a Vercel AI SDK implementation.

Table of Contents

Installation

npm install @opticlm/connector
# or
pnpm add @opticlm/connector

MCP Quick Start

Providers are installed onto an MCP server using install() from @opticlm/connector/mcp. Each call registers the tools and resources for that specific provider. Providers that depend on file access (definition, references, hierarchy, edit) receive a fileAccess option.

You can pass a single provider or an array of providers of the same type. When an array is given, their results are merged automatically — array-returning methods (e.g. provideDefinition) are concatenated, void methods are called on all providers in parallel.

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
import { install } from '@opticlm/connector/mcp'
import * as fs from 'fs/promises'

// 1. Create your MCP server
const server = new McpServer({
  name: 'my-ide-mcp-server',
  version: '1.0.0'
})

// 2. Implement File Access
const fileAccess = {
  readFile: async (uri: string) => {
    return await fs.readFile(uri, 'utf-8')
  },
  readDirectory: (uri: string) => yourIDE.workspace.readDirectory(uri),
  isFile: ...,
  isDirectory: ...,
}

// 3. Implement Edit Provider
const edit = {
  // Show diff in your IDE and get user approval
  applyEdits: async (operation) => {
    // ...
  },
}

// 4. Implement LSP Capability Providers
const definition = {
  provideDefinition: async (uri, position) => {
    return await lspClient.getDefinition(uri, position)
  },
}

const diagnostics = {
  provideDiagnostics: async (uri) => {
    return await lspClient.getDiagnostics(uri)
  },
  getWorkspaceDiagnostics: async () => {
    return await lspClient.getWorkspaceDiagnostics()
  },
}

const outline = {
  provideDocumentSymbols: async (uri) => {
    return await lspClient.getDocumentSymbols(uri)
  },
}

// 5. Install providers onto the server
//    fileAccess is installed first; others receive it as an option when needed
install(server, fileAccess)
install(server, edit, { fileAccess })
install(server, definition, { fileAccess })
install(server, diagnostics, { fileAccess })
install(server, outline, { fileAccess })

// You can also pass an array to merge multiple providers of the same type:
// install(server, [definition, anotherDefinition], { fileAccess })
// install(server, [diagnostics, anotherDiagnostics], { fileAccess })

// 6. Connect to transport (you control the server lifecycle)
const transport = new StdioServerTransport()
await server.connect(transport)

Each install() call is independent — only install the providers your IDE actually supports. The fileAccess option is required for providers that read files (edit, definition, references, hierarchy) and is used optionally by others for path auto-complete.

AI SDK Quick Start

The @opticlm/connector/ai-sdk entry point exports typed tool factories for the Vercel AI SDK. Each factory takes the required providers and returns a tool that can be passed directly to generateText, streamText, or useChat.

Resources from the MCP implementation are replaced by explicit tool calls that accept the same parameters as query arguments.

import { generateText } from 'ai'
import { openai } from '@ai-sdk/openai'
import {
  gotoDefinition,
  findReferences,
  getDiagnostics,
  getWorkspaceDiagnostics,
  getOutline,
  requestFile,
  applyEdit,
  globalFind,
  getOutlinks,
  getBacklinks,
  getLinkStructure,
  addLink,
  getFrontmatter,
  getFrontmatterStructure,
  setFrontmatter,
} from '@opticlm/connector/ai-sdk'
import { SymbolResolver } from '@opticlm/connector'
import * as fs from 'fs/promises'

// 1. Set up providers
const fileAccess = {
  readFile: async (uri: string) => fs.readFile(uri, 'utf-8'),
  readDirectory: async (path: string) => yourIDE.readDirectory(path),
  isFile: ...,
  isDirectory: ...,
}
const edit = {
  applyEdits: async (operation) => yourIDE.applyEdits(operation),
}
const definition = {
  provideDefinition: async (uri, position) => lsp.getDefinition(uri, position),
}

// 2. Create a resolver (shared across tools)
const resolver = new SymbolResolver(fileAccess)

// 3. Build the tools object
const tools = {
  goto_definition: gotoDefinition(definition, resolver),
  apply_edit: applyEdit(edit, fileAccess),
  request_file: requestFile(fileAccess),
}

// 4. Use with any AI SDK call
const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'Find all usages of MyClass' }],
})

// 5. Render typed tools in UI
import type { ConnectorTools } from '@opticlm/connector/ai-sdk'
import type { UIMessage, UIDataTypes } from 'ai'

type ChatMessage = UIMessage<unknown, UIDataTypes, ConnectorTools>

MCP Tools

The SDK automatically registers tools based on which providers you install:

goto_definition

Navigate to the definition of a symbol.

find_references

Find all references to a symbol.

find_file_references

Find all references to a file across the workspace (e.g., all files that import or link to the given file).

Only registered when your ReferencesProvider implements the optional provideFileReferences method.

call_hierarchy

Get call hierarchy for a function or method.

apply_edit

Apply a text edit to a file using hashline references (requires user approval).

The files:// resource returns file content in hashline format — each line is prefixed with <line>:<hash>|, where the hash is a 2-char CRC16 digest of the line's content. To edit a file, reference lines by these hashes. If the file has changed since the last read, the hashes won't match and the edit is rejected, preventing stale overwrites.

global_find

Search for text across the entire workspace.

get_link_structure

Get all links in the workspace, showing relationships between documents.

add_link

Add a link to a document by finding a text pattern and replacing it with a link.

get_frontmatter_structure

Get frontmatter property values across documents.

set_frontmatter

Set a frontmatter property on a document.

AI SDK Tools

The AI SDK implementation provides the same capabilities as the MCP tools. Resources from MCP become explicit tool calls that accept their parameters directly.

Navigation & References

| Tool factory | Tool name | Description | |---|---|---| | gotoDefinition(provider, resolver) | goto_definition | Navigate to a symbol's definition | | gotoTypeDefinition(fn, resolver) | goto_type_definition | Navigate to a symbol's type definition | | findReferences(provider, resolver) | find_references | Find all references to a symbol | | findFileReferences(fn) | find_file_references | Find all imports/links to a file | | callHierarchy(provider, resolver) | call_hierarchy | Incoming or outgoing call hierarchy |

Optional tools (gotoTypeDefinition, findFileReferences) take the provider method directly — only create them if your provider supports it:

// Only add if your provider has provideTypeDefinition
if (definition.provideTypeDefinition) {
  tools.goto_type_definition = gotoTypeDefinition(definition.provideTypeDefinition, resolver)
}

Editing

| Tool factory | Tool name | Description | |---|---|---| | applyEdit(provider, fileAccess) | apply_edit | Apply a hash-verified edit to a file | | requestFile(fileAccess) | request_file | Read a file (hashline format) or list a directory |

requestFile replaces the files:// MCP resource. It accepts optional start_line, end_line, and pattern parameters instead of URI fragments/query strings:

// Read full file
{ path: 'src/index.ts' }

// Read lines 10–20
{ path: 'src/index.ts', start_line: 10, end_line: 20 }

// Filter to import lines only
{ path: 'src/index.ts', pattern: '^import' }

Diagnostics

| Tool factory | Tool name | Description | |---|---|---| | getDiagnostics(provider) | get_diagnostics | Get diagnostics for a specific file | | getWorkspaceDiagnostics(fn) | get_workspace_diagnostics | Get diagnostics across the workspace |

Returns structured { diagnostics: Diagnostic[] } — the full diagnostic objects, not markdown text.

Outline

| Tool factory | Tool name | Description | |---|---|---| | getOutline(provider) | get_outline | Get document symbols (outline) for a file |

Returns structured { symbols: DocumentSymbol[] } with the full nested symbol tree.

Graph / Links

| Tool factory | Tool name | Description | |---|---|---| | getOutlinks(provider) | get_outlinks | Get outgoing links from a file | | getBacklinks(provider) | get_backlinks | Get incoming links (backlinks) to a file | | getLinkStructure(provider) | get_link_structure | Get all links in the workspace | | addLink(provider) | add_link | Add a link to a document |

Frontmatter

| Tool factory | Tool name | Description | |---|---|---| | getFrontmatter(provider) | get_frontmatter | Get all frontmatter for a file | | getFrontmatterStructure(provider) | get_frontmatter_structure | Query a frontmatter property across documents | | setFrontmatter(provider) | set_frontmatter | Set a frontmatter property (use null to remove) |

Search

| Tool factory | Tool name | Description | |---|---|---| | globalFind(provider) | global_find | Search for text across the workspace |

Tool Callbacks

Each provider with tools accepts optional onInput and onOutput callbacks in its install options. These fire synchronously around each tool invocation — onInput before processing, onOutput after a successful result (not on errors).

Use them for logging, telemetry, or testing:

import { install } from '@opticlm/connector/mcp'

// EditProvider — apply_edit
install(server, editProvider, {
  fileAccess,
  onEditInput: (input) => {
    console.log('edit requested:', input.uri, input.description)
  },
  onEditOutput: (output) => {
    console.log('edit result:', output.success, output.message)
  },
})

// DefinitionProvider — goto_definition + goto_type_definition
install(server, definitionProvider, {
  fileAccess,
  onDefinitionInput: (input) => log('goto_definition', input),
  onDefinitionOutput: (output) => log('goto_definition result', output.snippets.length),
  onTypeDefinitionInput: (input) => log('goto_type_definition', input),
  onTypeDefinitionOutput: (output) => log('goto_type_definition result', output.snippets.length),
})

MCP Resources

The SDK automatically registers resources based on which providers you install:

diagnostics://{path}

Get diagnostics (errors, warnings) for a specific file.

Resource URI Pattern: diagnostics://{+path}

Example: diagnostics://src/main.ts

Returns diagnostics formatted as markdown with location, severity, and message information.

`diagnostics

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars3
CategoryAI
Updated4mo ago
Forks1

Languages

TypeScript

Trust signals

90/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 low1 info