npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-server-code-mapper

v1.0.11

Published

MCP server for code mapping and analysis

Readme

MCP Server for Code Mapper

A Model Context Protocol (MCP) server implementation for the Code Mapper tool, designed to analyze TypeScript/React project structures.

Features

  • Implements the MCP protocol for integration with Cursor and other MCP-compatible clients
  • Provides tools for analyzing project structure and generating reports
  • Enhanced logging for debugging and monitoring
  • JSON-RPC 2.0 compliant API

Installation

# Install globally
npm install -g mcp-server-code-mapper

# Or run directly with npx
npx mcp-server-code-mapper

Usage

Basic Usage

# Start the MCP server
mcp-server-code-mapper

# Or use the cursor-test version with enhanced logging
mcp-server-code-mapper-cursor-test

Integration with Cursor

To use this MCP server with Cursor:

  1. Open Cursor
  2. Go to Settings > Extensions > MCP
  3. Add a new MCP server with the command:
    npx mcp-server-code-mapper-cursor-test@latest
  4. Name it "Code Mapper"
  5. Save and activate the server

Available Tools

analyze_project

Analyzes the project structure and generates a report.

Parameters:

  • include: Comma-separated list of glob patterns to include (e.g., "src//*.{ts,tsx},functions//*.{ts,tsx}")
  • exclude: Comma-separated list of glob patterns to exclude (e.g., "/node_modules/,/dist/")
  • output: Path to save the report (default: code-mapper-report.json)
  • verbose: Enable verbose logging

check_report

Checks a report for issues.

Parameters:

  • report: Path to the report file (default: code-mapper-report.json)
  • error_threshold: Maximum number of errors allowed (default: 0)
  • warning_threshold: Maximum number of warnings allowed (default: 10)

Enhanced Logging

The cursor-test.js script provides enhanced logging capabilities:

Log Files

When running mcp-server-code-mapper-cursor-test, two log files are created in the current working directory:

  1. cursor-test-debug.log: Detailed debug logs for troubleshooting
  2. cursor-mcp.log: Structured, human-readable logs for monitoring

Log Format

The cursor-mcp.log file uses a structured format:

[TIMESTAMP] [LOG_TYPE] Message
{
  "json": "data if available"
}
--------------------------------------------------------------------------------

Log Types

  • STARTUP: Server initialization events
  • ENV: Environment information
  • REQUEST: Incoming requests
  • METHOD: Method processing
  • RESPONSE: Outgoing responses
  • ERROR: Error information
  • TOOL: Tool execution details
  • RESOURCE: Resource handling
  • CRITICAL: Critical errors
  • SIGNAL: Process signals
  • SHUTDOWN: Server shutdown events
  • HEARTBEAT: Regular server heartbeats

Troubleshooting

If you encounter issues with the MCP server:

  1. Check the log files in your current working directory
  2. Ensure you're using the latest version
  3. Verify your Cursor configuration is correct
  4. Check for any error messages in the logs

Development

To contribute to this project:

# Clone the repository
git clone https://github.com/derekzar/mcp-server-code-mapper.git

# Install dependencies
cd mcp-server-code-mapper
npm install

# Run the server
npm start

# Test the cursor version
npm test

License

MIT