Skip to main content

📦 Installation

1

Prerequisites

  • Python 3.8+
  • pipx (recommended) or uvx or pip
  • Your Nia API key from app.trynia.ai
2

Install the Package

# Install globally for use across all projects
pipx install nia-mcp-server
3

Configure Your MCP Client

Choose your coding agent below for specific configuration steps
4

Replace Your API Key

Get your API key from app.trynia.ai and replace YOUR_API_KEY in the configuration
5

Restart Your Client

Restart your coding assistant to load the new MCP server

⚙️ Configuration for Your Coding Assistant

  • Cursor
  • Windsurf
  • Claude Desktop
  • VS Code
  • Continue.dev
  • Claude Code
  • Codex
Add Nia MCP server to Cursor
1

Open MCP Configuration

Open your Cursor MCP configuration file:
  • macOS: ~/.cursor/mcp.json
  • Windows: %APPDATA%\Cursor\mcp.json
  • Linux: ~/.config/cursor/mcp.json
2

Add NIA Configuration

{
  "mcpServers": {
    "nia": {
      "command": "pipx",
      "args": ["run", "--no-cache", "nia-mcp-server"],
      "env": {
        "NIA_API_KEY": "YOUR_API_KEY",
        "NIA_API_URL": "https://apigcp.trynia.ai/"
      }
    }
  }
}

🚀 Try It Out!

After restarting your coding agent, you’re good to go:
1

Search Package Source Code (No indexing required!)

Ask your coding agent: “Use package search to find how error handling is implemented in the requests Python library” or “Search the numpy package for array manipulation examples”
2

Index Documentation or a Repository

Try indexing public documentation or a repository:
3

Monitor Progress & Explore

Check your indexed resources:
  • “List my resources” or “Check the status of my indexing jobs”
  • Visit app.trynia.ai to see all your indexed content

🛠️ Available Tools

Package Search (No indexing!)

  • nia_package_search_grep - Regex-based code search in 3,000+ packages
  • nia_package_search_hybrid - AI-powered semantic package search
  • nia_package_search_read_file - Read specific file sections
  • Supports: PyPI, NPM, Crates.io, Go modules

Repository Management

  • index_repository - Index GitHub repositories for intelligent search
  • search_codebase - Search code with natural language queries
  • visualize_codebase - Open interactive graph visualization

Documentation Management

  • index_documentation - Index websites and documentation
  • search_documentation - Search docs with natural language

Unified Resource Management

  • list_resources - List all indexed repositories and documentation
  • check_resource_status - Monitor indexing progress
  • rename_resource - Rename resources for better organization
  • delete_resource - Remove indexed resources

Web Search & Research

  • nia_web_search - AI-powered search for repos, docs, and content
  • nia_deep_research_agent - Deep multi-step research and analysis

Project & Development Tools

  • initialize_project - Set up NIA-enabled projects with IDE configs
  • read_source_content - Read full content of specific sources
  • nia_bug_report - Submit feedback directly to the development team

📋 Complete Tool Reference

nia_package_search_grep

Regex-based deterministic code search across packages from PyPI, NPM, Crates.io, and Go modules.Parameters:
  • registry (str): One of “py_pi”, “npm”, “crates_io”, “golang_proxy”
  • package_name (str): Package name (for Go: “org/repo” format)
  • pattern (str): Regex pattern to search for
  • version (str, optional): Specific package version
  • language (str, optional): Filter by programming language
  • output_mode (str): “content” (default), “files_with_matches”, “count”
Best for: Finding specific code patterns, function definitions, API usage examples.

nia_package_search_hybrid

AI-powered semantic search combined with optional regex filtering.Parameters:
  • registry (str): Package registry
  • package_name (str): Package name
  • semantic_queries (List[str]): 1-5 natural language questions
  • pattern (str, optional): Regex pre-filter
  • version (str, optional): Specific version
Best for: Understanding implementation patterns, finding usage examples, exploring architecture.

nia_package_search_read_file

Read exact lines from a package source file using its SHA256 hash.Parameters:
  • registry (str): Package registry
  • package_name (str): Package name
  • filename_sha256 (str): File hash from search results
  • start_line (int): Starting line (1-based)
  • end_line (int): Ending line (max 200 lines)
Best for: Getting complete context around code snippets found in searches.

index_repository

Index a GitHub repository for AI-powered code search and analysis.Parameters:
  • repo_url (str): GitHub repository URL
  • branch (str, optional): Specific branch to index
Usage: Monitor progress with check_resource_status.

search_codebase

Search indexed repositories using natural language queries.Parameters:
  • query (str): Natural language search question
  • repositories (List[str]): List of repositories to search (owner/repo format)
  • include_sources (bool, default=True): Include source code snippets
Returns: AI-analyzed results with code snippets and explanations.

visualize_codebase

Open an interactive graph visualization of repository structure.Parameters:
  • repository (str): Repository in owner/repo format
Features: Interactive force-directed graph, click-to-chat with code elements, relationship visualization.

index_documentation

Index websites, documentation, or API references for intelligent search.Parameters:
  • url (str): URL of documentation site
  • url_patterns (List[str], optional): Include patterns (e.g., [“/docs/*”])
  • exclude_patterns (List[str], optional): Exclude patterns (e.g., [“/blog/*”])
  • only_main_content (bool, default=True): Extract main content only

search_documentation

Search indexed documentation with natural language queries.Parameters:
  • query (str): Natural language question
  • sources (List[str]): List of documentation source UUIDs/names/URLs
  • include_sources (bool, default=True): Include source references

list_resources

List all indexed repositories and documentation with their status.Parameters:
  • resource_type (str, optional): Filter by “repository”, “documentation”, or None for all

check_resource_status

Check indexing progress and status of any resource.Parameters:
  • resource_type (str): “repository” or “documentation”
  • identifier (str): Repository name or documentation UUID

rename_resource & delete_resource

Manage your indexed resources with rename and delete operations.Parameters:
  • resource_type (str): “repository” or “documentation”
  • identifier (str): Resource identifier
  • new_name (str): New display name (for rename only)
AI-powered search for discovering repositories, documentation, and content.Use Cases: Finding specific repos/docs, trending technologies, similar contentParameters:
  • query (str): Natural language search query
  • num_results (int, default=5): Number of results (max: 10)
  • category (str, optional): Filter by type (“github”, “company”, etc.)
  • days_back (int, optional): Recent content only

nia_deep_research_agent

Comprehensive multi-step research and analysis.Use Cases: Comparative analysis, pros/cons evaluation, technology selectionParameters:
  • query (str): Research question
  • output_format (str, optional): Structure hint (e.g., “comparison table”)
Tool Selection Guide:
  • Use nia_web_search for: Simple discovery, finding specific items
  • Use nia_deep_research_agent for: Complex analysis, comparisons, evaluations

initialize_project

Set up NIA-enabled projects with IDE-specific configurations.Parameters:
  • project_root (str): Absolute path to project directory
  • profiles (List[str], optional): IDE profiles [“cursor”, “vscode”, “claude”, etc.]

read_source_content

Read full content of specific sources found in search results.Parameters:
  • source_type (str): “repository” or “documentation”
  • source_identifier (str): Source path or URL
  • metadata (dict, optional): Additional context from search results

nia_bug_report

Submit feedback, bug reports, or feature requests directly to the development team.Parameters:
  • description (str): Detailed description (10-5000 chars)
  • bug_type (str): “bug”, “feature-request”, “improvement”, “other”
  • additional_context (str, optional): Extra details

Need Help? Join our community or reach out through app.trynia.ai for support and updates.
I