Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .beads/issues.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{"id":"efficient-gitlab-mcp-5zo","title":"Add pipeline/CI tools to efficient-gitlab-mcp","description":"Add GitLab pipeline-related tools: list pipelines, get pipeline details, trigger pipelines, get jobs, view job logs, retry/cancel jobs.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-24T18:38:34.590242+01:00","updated_at":"2025-12-24T18:39:30.349119+01:00","closed_at":"2025-12-24T18:39:30.349119+01:00","close_reason":"Pipeline tools already implemented: list_pipelines, get_pipeline, create_pipeline, retry_pipeline, cancel_pipeline, list_pipeline_jobs, get_pipeline_job_output, play_pipeline_job, retry_pipeline_job, cancel_pipeline_job. Tests exist in tools.test.ts.","labels":["feature","tools"]}
{"id":"efficient-gitlab-mcp-6am","title":"Publish to MCP Registry","description":"Register efficient-gitlab-mcp on the official MCP Registry for discoverability.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-29T12:49:57.881217+01:00","updated_at":"2025-12-29T13:23:50.513312+01:00","closed_at":"2025-12-29T13:23:50.513312+01:00","close_reason":"Published to MCP Registry"}
{"id":"efficient-gitlab-mcp-9af","title":"Enable NPM publishing for efficient-gitlab-mcp","description":"Configure semantic-release to publish to NPM. Update .releaserc.json to enable npmPublish.\n\n**After publishing:**\n- Update README installation instructions to use `npx @detailobsessed/efficient-gitlab-mcp` instead of cloning the repo\n- Remove instructions about pointing MCP clients to `.../dist/index.js`\n- Add npm badge to README","notes":"**Progress:**\n- ✅ Updated npm-publish.yml workflow with Bun build, provenance, and NPM_TOKEN\n- ✅ Added workflow_dispatch for manual runs\n- ⏳ Need to add NPM_TOKEN secret to GitHub repo\n\n**To complete:**\n1. Create NPM access token at https://www.npmjs.com/settings/tokens\n2. Add as GitHub secret: `gh secret set NPM_TOKEN --repo detailobsessed/efficient-gitlab-mcp`\n3. Trigger a release or run workflow manually to publish","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T18:38:32.177275+01:00","updated_at":"2025-12-25T14:01:09.344799+01:00","closed_at":"2025-12-25T14:01:09.344799+01:00","close_reason":"NPM publishing configured with Trusted Publishing (OIDC). Package published as efficient-gitlab-mcp-server v0.1.1. Workflow updated to use OIDC instead of NPM_TOKEN.","labels":["npm","publishing"]}
{"id":"efficient-gitlab-mcp-a3x","title":"Clean up unused upstream dependencies and test files","description":"knip identified unused code from upstream:\n\n**Unused dependencies (11) - REMOVED:**\n- fetch-cookie, form-data, http-proxy-agent, https-proxy-agent, node-fetch, open, pkce-challenge, socks-proxy-agent, tough-cookie, zod-to-json-schema, @types/express\n\n**Upstream test files (19) - NEED REVIEW:**\n- Some tests work with bun (readonly-mcp-tests.ts)\n- Some are broken (oauth-tests.ts imports non-existent ../oauth.js)\n- Some depend on removed packages (remote-auth-tests.ts uses node-fetch)\n\nNext steps:\n1. Review each test file\n2. Fix or remove broken tests\n3. Keep working integration tests for use on work laptop with GitLab access","status":"open","priority":2,"issue_type":"chore","created_at":"2025-12-30T10:15:21.899203+01:00","updated_at":"2025-12-30T10:27:08.725345+01:00"}
{"id":"efficient-gitlab-mcp-a3x","title":"Clean up unused upstream dependencies and test files","description":"knip identified unused code from upstream:\n\n**Unused dependencies (11) - REMOVED:**\n- fetch-cookie, form-data, http-proxy-agent, https-proxy-agent, node-fetch, open, pkce-challenge, socks-proxy-agent, tough-cookie, zod-to-json-schema, @types/express\n\n**Upstream test files (19) - NEED REVIEW:**\n- Some tests work with bun (readonly-mcp-tests.ts)\n- Some are broken (oauth-tests.ts imports non-existent ../oauth.js)\n- Some depend on removed packages (remote-auth-tests.ts uses node-fetch)\n\nNext steps:\n1. Review each test file\n2. Fix or remove broken tests\n3. Keep working integration tests for use on work laptop with GitLab access","status":"closed","priority":2,"issue_type":"chore","created_at":"2025-12-30T10:15:21.899203+01:00","updated_at":"2025-12-30T10:35:24.138971+01:00","closed_at":"2025-12-30T10:35:24.138971+01:00","close_reason":"Removed 11 unused dependencies (PR #36), deleted broken oauth-tests.ts, fixed remote-auth-tests.ts to use native fetch (PR #37)"}
{"id":"efficient-gitlab-mcp-b50","title":"Create server.json for MCP Registry","description":"Create server.json metadata file with environment variables","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-29T12:50:04.053915+01:00","updated_at":"2025-12-29T12:50:38.353663+01:00","closed_at":"2025-12-29T12:50:38.353663+01:00","close_reason":"Completed","dependencies":[{"issue_id":"efficient-gitlab-mcp-b50","depends_on_id":"efficient-gitlab-mcp-6am","type":"blocks","created_at":"2025-12-29T12:50:04.064925+01:00","created_by":"daemon"}]}
{"id":"efficient-gitlab-mcp-fbp","title":"Add DNS rebinding protection for HTTP transport","description":"When using StreamableHTTPServerTransport, enable DNS rebinding protection for security:\n\n```typescript\nnew StreamableHTTPServerTransport({\n enableDnsRebindingProtection: true,\n allowedHosts: ['localhost', '127.0.0.1'],\n allowedOrigins: ['http://localhost:3000']\n});\n```\n\nThis prevents malicious websites from making requests to the local MCP server.","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-24T16:20:34.579748+01:00","updated_at":"2025-12-24T16:38:33.572059+01:00","closed_at":"2025-12-24T16:38:33.572059+01:00","close_reason":"Added DNS rebinding protection with configurable allowedHosts and allowedOrigins","labels":["http-transport","mcp-sdk","security"]}
{"id":"efficient-gitlab-mcp-h2f","title":"Add mcpName to package.json","description":"Add mcpName property for MCP Registry verification","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-29T12:50:02.981651+01:00","updated_at":"2025-12-29T12:50:20.779683+01:00","closed_at":"2025-12-29T12:50:20.779683+01:00","close_reason":"Completed","dependencies":[{"issue_id":"efficient-gitlab-mcp-h2f","depends_on_id":"efficient-gitlab-mcp-6am","type":"blocks","created_at":"2025-12-29T12:50:02.987921+01:00","created_by":"daemon"}]}
Expand Down
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,29 @@ repos:
types: [ts]
priority: 1

- id: knip
name: knip
entry: bunx knip
language: system
pass_filenames: false
types: [ts]
priority: 2

- id: build
name: Build
entry: bun run build
language: system
pass_filenames: false
types: [ts]
priority: 2
priority: 3

- id: test
name: Run Tests
entry: bun test
language: system
pass_filenames: false
stages: [pre-push]
priority: 3
priority: 4

- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.3.0
Expand Down
6 changes: 6 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://unpkg.com/knip@5.30.6/schema.json",
"entry": ["src/server/index.ts"],
"project": ["src/**/*.ts"],
"ignore": ["test/**"]
}
6 changes: 2 additions & 4 deletions src/registry/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export { registerMetaTools } from "./meta-tools.js";
export type { ToolRegistrationTarget } from "./tool-adapter.js";
export { createRegistryAdapter, RegistryAdapter } from "./tool-adapter.js";
export type { CategoryInfo, ToolHandler, ToolInfo, ToolSummary } from "./tool-registry.js";
export { getRegistry, resetRegistry, ToolRegistry } from "./tool-registry.js";
export { createRegistryAdapter } from "./tool-adapter.js";
export { ToolRegistry } from "./tool-registry.js";
2 changes: 1 addition & 1 deletion src/registry/tool-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface ToolRegistrationTarget {
): void;
}

export class RegistryAdapter implements ToolRegistrationTarget {
class RegistryAdapter implements ToolRegistrationTarget {
constructor(
private registry: ToolRegistry,
private category: string,
Expand Down
17 changes: 2 additions & 15 deletions src/registry/tool-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* Pattern inspired by unblu-mcp and efficient-discord-agent-mcp servers.
*/

import type { ZodType } from "zod";
// biome-ignore lint/suspicious/noExplicitAny: Required for Zod v3/v4 compatibility
type ZodType = any;

export interface ToolInfo {
name: string;
Expand Down Expand Up @@ -393,17 +394,3 @@ interface ZodDef {
minLength?: { value: number };
maxLength?: { value: number };
}

// Global registry instance
let registryInstance: ToolRegistry | null = null;

export function getRegistry(): ToolRegistry {
if (!registryInstance) {
registryInstance = new ToolRegistry();
}
return registryInstance;
}

export function resetRegistry(): void {
registryInstance = null;
}
5 changes: 0 additions & 5 deletions src/utils/gitlab-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ export interface FetchOptions {
body?: string;
}

export interface GitLabClientConfig {
apiUrl: string;
token?: string;
}

export class GitLabClient {
private apiUrl: string;
private token: string;
Expand Down
9 changes: 0 additions & 9 deletions src/utils/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,3 @@ export class Logger {
}
}
}

// Default logger instance
let defaultLogger: Logger | null = null;

export function getLogger(): Logger {
if (!defaultLogger) {
const level = (process.env.LOG_LEVEL as LogLevel) || "info";
const format = (process.env.LOG_FORMAT as LogFormat) || "pretty";
defaultLogger = new Logger(level, format);
}
return defaultLogger;
}

export function setLogger(logger: Logger): void {
defaultLogger = logger;
}