{"id":51266046,"url":"https://github.com/bernoussama/mcplog","last_synced_at":"2026-06-29T15:02:17.352Z","repository":{"id":359218302,"uuid":"1245055311","full_name":"bernoussama/mcplog","owner":"bernoussama","description":"JSON-lines logger for MCP servers","archived":false,"fork":false,"pushed_at":"2026-05-20T23:53:18.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-21T04:00:08.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bernoussama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-20T21:37:51.000Z","updated_at":"2026-05-20T23:50:49.000Z","dependencies_parsed_at":"2026-05-21T04:00:23.187Z","dependency_job_id":null,"html_url":"https://github.com/bernoussama/mcplog","commit_stats":null,"previous_names":["bernoussama/mcplog"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bernoussama/mcplog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fmcplog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fmcplog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fmcplog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fmcplog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bernoussama","download_url":"https://codeload.github.com/bernoussama/mcplog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fmcplog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34931592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-29T15:02:16.279Z","updated_at":"2026-06-29T15:02:17.350Z","avatar_url":"https://github.com/bernoussama.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcplog\n\n[![lang: TypeScript](https://img.shields.io/badge/Language-TypeScript-Blue.svg?style=flat-square)](https://www.typescriptlang.org)\n![License: MIT](https://img.shields.io/npm/l/tslog?logo=tslog\u0026style=flat-square)\n![License: MIT](https://img.shields.io/npm/l/mcplog?style=flat-square)\n![CI: GitHub](https://github.com/bernoussama/mcplog/actions/workflows/ci.yml/badge.svg)\n[![codecov.io](https://codecov.io/github/bernoussama/mcplog/coverage.svg?branch=master)](https://codecov.io/github/bernoussama/mcplog?branch=master)\n\n\u003e Small JSON-lines logger for MCP servers.\n\n## Install\n\n```sh\npnpm add mcplog\n# or\nnpm install mcplog\n```\n\n## Usage\n\n```ts\nimport { McpLogger } from \"mcplog\";\n```\n\n## Usage\n\n```ts\nimport { McpLogger } from \"mcp-log\";\n\nconst logger = new McpLogger({ name: \"my-mcp-server\" });\n\nlogger.info(\"server started\", { port: 3000 });\nlogger.error(\"request failed\", { requestId: \"abc123\" });\n```\n\nLogs are written to `stderr` by default so MCP protocol messages on `stdout` stay untouched. Set `CLANKER_LOG_FILE` or pass `filePath` to write JSON lines to a file instead.\n\n## API\n\n```ts\nnew McpLogger({\n  name: string,\n  level?: \"debug\" | \"info\" | \"warn\" | \"error\",\n  filePath?: string,\n  stderr?: { write(chunk: string): unknown },\n})\n```\n\nMethods: `debug`, `info`, `warn`, and `error`.\n\nThe package also exports the `LogLevel` and `LogSink` types.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernoussama%2Fmcplog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernoussama%2Fmcplog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernoussama%2Fmcplog/lists"}