NpcPy

v1.0.0Data Science & MLstable

The python library for research and development in NLP, multimodal LLMs, Agents, ML, Knowledge Graphs, and more.

agentsaillmmcpmcp-client
Share:
1,363
Stars
0
Downloads
0
Weekly
0/5

What is NpcPy?

NpcPy is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to python library for research and development in nlp, multimodal llms, agents, ml, knowledge graphs, and more.

The python library for research and development in NLP, multimodal LLMs, Agents, ML, Knowledge Graphs, and more.

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • The python library for research and development in NLP, mult

Use Cases

NLP and multimodal LLM research library
Knowledge graphs and agent development
NPC-Worldwide

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx npcpy

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use NpcPy

NpcPy is a Python library and MCP-compatible framework for research and development in NLP, multimodal LLMs, agents, machine learning, and knowledge graphs. It provides a unified interface to 20+ LLM providers including Ollama, OpenAI, Anthropic, Gemini, and DeepSeek through LiteLLM integration, and supports multi-agent team orchestration, dynamic knowledge graph construction, media generation (images, audio, video), and a rich set of built-in agent tools including shell execution, Python evaluation, web search, and file editing. Researchers and ML engineers use NpcPy to prototype multi-agent pipelines, run local LLM experiments with Ollama, and build knowledge-graph-backed retrieval systems.

Prerequisites

  • Python 3.10 or higher
  • pip for package installation; uv or conda recommended for environment management
  • At least one LLM provider: Ollama running locally, or an API key for OpenAI (OPENAI_API_KEY), Anthropic (ANTHROPIC_API_KEY), or Google Gemini (GEMINI_API_KEY)
  • System dependencies for audio/media features on Linux: espeak, portaudio19-dev, ffmpeg (optional, only for yap/all extras)
1

Install NpcPy

Choose the install variant that matches your use case. The base package is minimal; 'lite' adds API provider libraries; 'local' adds Ollama and Hugging Face transformers support; 'all' installs everything.

pip install npcpy              # minimal
pip install npcpy[lite]        # + API provider libraries
pip install npcpy[local]       # + ollama, diffusers, transformers
pip install npcpy[all]         # complete install
2

Install system dependencies (Linux)

On Linux, install system libraries for audio and graphics support before installing npcpy with the yap or all extras.

sudo apt-get install espeak portaudio19-dev python3-pyaudio ffmpeg libcairo2-dev libgirepository1.0-dev
3

Configure your API keys

Create a .env file in your project directory with your LLM provider credentials. NpcPy will load these automatically.

OPENAI_API_KEY=sk-your-openai-key
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key
GEMINI_API_KEY=your-gemini-key
4

Initialize a new agent team structure

Use the npc-init CLI command to scaffold a new project with the standard team directory layout, including example NPC definitions and tool configurations.

npc-init my-agent-project
cd my-agent-project
5

Launch the interactive shell

Start npcsh, the interactive terminal shell that gives you direct access to all NpcPy agents, tools, and LLM providers from the command line.

npcsh
6

Register an MCP server with your team

To connect external MCP servers to your NpcPy team, add them to your team.ctx configuration file. NpcPy will load them alongside built-in tools.

# In team.ctx:
mcp_servers:
  - path: ./tools/my_mcp_server.py

NpcPy Examples

Client configuration

Example MCP server registration in a team.ctx file for a NpcPy agent team that uses a custom database MCP server.

{
  "mcpServers": {
    "npcpy": {
      "command": "npcsh",
      "args": [],
      "env": {
        "OPENAI_API_KEY": "sk-your-openai-key",
        "ANTHROPIC_API_KEY": "sk-ant-your-anthropic-key"
      }
    }
  }
}

Prompts to try

Example prompts and CLI commands that showcase NpcPy's multi-agent and research capabilities.

- "Use a CodingAgent to write and execute a Python script that parses the CSV files in ./data and outputs a summary."
- "Build a knowledge graph from the documents in ./papers/ and find connections between AI safety and alignment research."
- "Run a debate workflow: have three agents argue for different approaches to the RAG pipeline design."
- "Search the web for the latest benchmarks on open-source LLMs and store the results in a semantic index."
- "Generate an image of a neural network diagram using the diffusers backend."

Troubleshooting NpcPy

ImportError for audio or media modules after install

Install the system dependencies first (espeak, portaudio19-dev, ffmpeg on Linux; 'brew install portaudio ffmpeg' on macOS), then reinstall with 'pip install npcpy[yap]' or 'pip install npcpy[all]'. Skipping system deps causes the Python audio bindings to fail at import time.

LLM provider returns 'API key not found' despite setting the key

NpcPy loads credentials from a .env file in the working directory. Make sure your .env file is in the directory where you run npcsh or your script. Also confirm the variable name exactly matches: OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY.

Ollama models are not discovered by NpcPy

Ensure the Ollama daemon is running with 'ollama serve' before starting npcsh. On macOS you can also start Ollama as a background app. NpcPy connects to Ollama at http://localhost:11434 by default.

Frequently Asked Questions about NpcPy

What is NpcPy?

NpcPy is a Model Context Protocol (MCP) server that python library for research and development in nlp, multimodal llms, agents, ml, knowledge graphs, and more. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install NpcPy?

Follow the installation instructions on the NpcPy GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with NpcPy?

NpcPy works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is NpcPy free to use?

Yes, NpcPy is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "npcpy": { "command": "npx", "args": ["-y", "npcpy"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use NpcPy?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides