Nia Codebase MCP server

Enables AI to access and understand codebases indexed in Nia's system through a lookup tool that retrieves relevant code snippets and context based on user queries.
Back to servers
Setup instructions
Provider
Nozomio Labs
Release date
Mar 18, 2025
Language
TypeScript
Package
Stats
503 downloads
5 stars

The Nia Codebase MCP server enables integration with Nia's codebase understanding capabilities through function calling in tools like Cursor, Claude Desktop, and other MCP-compatible clients. It allows you to query and analyze your codebase to retrieve relevant context and information.

Installation

You can use the Nia Codebase MCP server without installing it by running it with npx:

npx -y [email protected] --api-key=YOUR_NIA_API_KEY --transport=stdio

Transport Options

Standard Input/Output (stdio)

This is the default transport method when no transport is specified:

npx -y nia-codebase-mcp --api-key=YOUR_NIA_API_KEY

Server-Sent Events (SSE)

To use SSE transport, specify the --transport=sse flag and optionally a port (default is 3000):

npx -y nia-codebase-mcp --api-key=YOUR_NIA_API_KEY --transport=sse --port=3000

Client Configuration

Cursor

  1. Open Cursor Settings > Features > MCP Servers
  2. Add a new MCP server
  3. Name: nia-codebase
  4. Type: command
  5. Command: npx -y [email protected] --api-key=YOUR_NIA_API_KEY

Claude Desktop

Add to your Claude Desktop configuration:

For macOS:

{
  "mcpServers": {
    "nia-codebase": {
      "command": "npx",
      "args": ["-y", "[email protected]", "--api-key=YOUR_NIA_API_KEY"]
    }
  }
}

Configuration path:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Using the Tools

The MCP server provides a tool called lookup_codebase_context that retrieves relevant code snippets based on your queries.

Example Prompts

Use these prompts in your MCP-compatible client:

Using the lookup_codebase_context tool, please analyze my project structure and tell me what the main components are.
Using the lookup_codebase_context tool, search the codebase to understand how the authentication system works and explain its key components.

Configuration Options

Command-line Arguments

You can configure the server using these command-line arguments:

  • --api-key: Your Nia API key
  • --transport: Transport method (stdio or sse)
  • --port: Port for SSE transport (default: 3000)
  • --debug: Enable debug mode for troubleshooting

Example with debug mode:

npx -y [email protected] --api-key=YOUR_NIA_API_KEY --debug=true

Environment Variables

Alternatively, use environment variables for configuration:

  • NIA_API_KEY: Your Nia API key
  • TRANSPORT: The transport method (stdio or sse)
  • PORT: The port for SSE transport (default: 3000)
  • TOOL_TIMEOUT_MS: Custom timeout for tool execution (default: 300000ms)
  • DEBUG: Enable debug mode (true or false)

Requirements

  • Node.js 18 or higher
  • A valid Nia API key
  • A codebase indexed in Nia

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "nia-codebase" '{"command":"npx","args":["-y","[email protected]","--api-key=YOUR_NIA_API_KEY"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "nia-codebase": {
            "command": "npx",
            "args": [
                "-y",
                "[email protected]",
                "--api-key=YOUR_NIA_API_KEY"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "nia-codebase": {
            "command": "npx",
            "args": [
                "-y",
                "[email protected]",
                "--api-key=YOUR_NIA_API_KEY"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later