Skip to main content
Glama
innovaassolutions

Innovaas KMS MCP Server

Official

🧠 Innovaas KMS MCP Server

Enhanced Model Context Protocol (MCP) server for the Innovaas RAG Knowledge Management System. This server exposes powerful multi-modal search, RAG-powered chat with intelligent token management, and comprehensive document access to external systems via the standardized MCP protocol.

⚑ Latest v1.0.0 Features

🎯 Intelligent Token Management

  • Automatic Optimization: Prevents API token limit errors (65K+ β†’ 30K tokens)

  • Provider-Aware: Different limits for OpenAI (30K) vs Claude (200K)

  • Smart Document Selection: Prioritizes by relevance, includes summaries of excluded content

  • Zero Configuration: Works automatically with kms_chat tool

πŸ” Advanced Search Capabilities

  • Full Document Content: Complete text (4,000+ characters) instead of 200-char previews

  • Multi-Modal Search: Text, audio transcriptions, video frames, and technical content

  • Intelligent Routing: Enhanced RAG with query analysis and optimal strategy selection

  • Technical Content Detection: Find code, diagrams, and UI elements in video content

πŸ’¬ Enhanced RAG-Powered Chat

  • Comprehensive Responses: Based on complete source material with full content access

  • Source Citations: Precise document and timestamp references

  • Provider Choice: OpenAI GPT-4o-mini or Claude for different use cases

  • Context Filtering: Focus conversations by tags and document types

Related MCP server: mcp-business-bot

πŸš€ Quick Start

1. Installation

# Clone the repository
git clone https://github.com/innovaas/kms-mcp-server.git
cd kms-mcp-server

# Install dependencies
npm install

# Build the server
npm run build

2. Configuration

# Required: KMS API endpoint
export KMS_BASE_URL="https://your-kms-domain.com/kms"

# Required: Authentication key
export BACKGROUND_PROCESS_API_KEY="your-secure-api-key"
# OR use MCP-specific key
export MCP_API_KEY="your-mcp-api-key"

3. Run the Server

# Development mode
npm run dev

# Production mode
npm start

# With environment variables inline
KMS_BASE_URL="https://your-domain.com/kms" BACKGROUND_PROCESS_API_KEY="your-key" npm start

πŸ› οΈ Integration Examples

Claude Desktop Configuration

Add to your Claude Desktop config file (~/.claude_desktop_config.json):

{
  "mcpServers": {
    "innovaas-kms": {
      "command": "node",
      "args": ["/path/to/kms-mcp-server/dist/index.js"],
      "env": {
        "KMS_BASE_URL": "https://your-domain.com/kms",
        "BACKGROUND_PROCESS_API_KEY": "your-secure-api-key"
      }
    }
  }
}

Cline/VSCode Integration

Configure in your MCP settings:

{
  "name": "innovaas-kms",
  "serverPath": "/path/to/kms-mcp-server/dist/index.js",
  "environment": {
    "KMS_BASE_URL": "https://your-domain.com/kms",
    "MCP_API_KEY": "your-secure-api-key"
  }
}

Programmatic Integration

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

const transport = new StdioClientTransport({
  command: "node",
  args: ["/path/to/kms-mcp-server/dist/index.js"],
  env: {
    KMS_BASE_URL: "https://your-domain.com/kms",
    MCP_API_KEY: "your-api-key"
  }
});

const client = new Client(
  { name: "kms-client", version: "1.0.0" },
  { capabilities: {} }
);

await client.connect(transport);

// Use intelligent search with full content
const result = await client.callTool({
  name: "kms_intelligent_search",
  arguments: {
    query: "What are the best practices for implementing a Unified Namespace?",
    maxResults: 10
  }
});

🎯 Available Tools

kms_chat πŸš€ Primary Tool

Comprehensive knowledge queries with intelligent token management

{
  "message": "How do I implement OEE monitoring in a manufacturing environment?",
  "provider": "openai",
  "useMultiModal": true,
  "tags": ["OEE", "manufacturing"],
  "maxResults": 15
}

βœ… Key Benefits:

  • Token Optimization: Automatically prevents API limit errors

  • Full Content Access: Complete document text (4,000+ characters)

  • Provider-Aware: Adjusts context size for OpenAI vs Claude

  • Multi-Modal Context: Combines text, video, and web sources

Advanced RAG search with query analysis

{
  "query": "unified namespace MQTT implementation patterns",
  "maxResults": 15,
  "filters": {
    "type": "video",
    "tags": ["UNS", "MQTT"]
  },
  "includeAnalysis": true
}

Search across all content types

{
  "query": "user authentication flow diagrams",
  "searchMode": "multimodal",
  "maxResults": 10,
  "filters": {
    "hasVisualContent": true,
    "documentTypes": ["video", "whitepaper"]
  }
}

Basic semantic search

{
  "query": "manufacturing execution systems",
  "limit": 10,
  "threshold": 0.7
}

kms_get_document

Retrieve specific document

{
  "documentId": "uuid-of-document"
}

kms_get_stats

System analytics

{
  "includeProcessingDetails": true
}

kms_list_documents

Browse documents

{
  "limit": 25,
  "type": "video",
  "tags": ["training", "technical"],
  "mediaType": "video"
}

πŸŽ‰ What's Fixed in v1.0.0

❌ Before: Token Limit Errors

Error: Request too large for gpt-4o: Limit 30000, Requested 70239

βœ… After: Intelligent Optimization

{
  "tokenOptimization": {
    "enabled": true,
    "documentsIncluded": 8,
    "documentsExcluded": 7,
    "optimization": "Included 8/15 documents, using ~27,518 tokens",
    "estimatedTotalTokens": 27518
  }
}

πŸ”§ Improvements Made

  1. Automatic Token Management: No more API limit errors

  2. Smart Document Selection: Prioritizes most relevant content

  3. Full Content Access: 4,000+ character responses vs 200-char previews

  4. Provider Optimization: Different strategies for OpenAI vs Claude

  5. Transparent Operation: Shows what was included/excluded and why

πŸ“Š System Capabilities

Current KMS Status βœ…

  • 127+ documents processed with 100% success rate

  • 1,000+ video frames extracted and analyzed

  • Multi-modal search across text, audio, and video

  • Technical content detection for code, diagrams, UI elements

  • Real-time processing pipeline with error recovery

Content Coverage

  • Technical Documentation: API docs, system architecture, code examples

  • Training Videos: 105+ processed videos with transcription and frame analysis

  • Manufacturing Content: MES, OEE, UNS, MQTT, IoT, SCADA terminology

  • Web Resources: Crawled documentation and technical resources

AI Capabilities

  • AssemblyAI: High-quality transcription with technical term boosting

  • OpenAI Embeddings: 1536-dimensional vectors for semantic search

  • Claude Vision: Technical content analysis for diagrams and code

  • Multi-Provider Chat: OpenAI GPT-4o-mini and Claude support

πŸ›‘οΈ Authentication & Security

API Key Authentication

# Set authentication key
export BACKGROUND_PROCESS_API_KEY="secure-random-string"

# Or use MCP-specific key
export MCP_API_KEY="mcp-specific-secure-key"

Network Configuration

  • Protocol: HTTPS (secure connection)

  • Transport: STDIO (standard for MCP)

  • Authentication: Bearer token with API key

πŸ“‹ Development

Project Structure

kms-mcp-server/
β”œβ”€β”€ src/
β”‚   └── index.ts           # Main MCP server implementation
β”œβ”€β”€ dist/                  # Built files (generated by npm run build)
β”œβ”€β”€ examples/              # Configuration examples
β”œβ”€β”€ package.json           # Dependencies and scripts
β”œβ”€β”€ tsconfig.json          # TypeScript configuration
└── README.md             # This file

Scripts

npm run build              # Compile TypeScript to JavaScript
npm run dev                # Development mode with hot reload
npm start                  # Run compiled server
npm run clean              # Clean build directory
npm test                   # Run tests

Requirements

  • Node.js: 18.0.0 or higher

  • TypeScript: 5.0.0 or higher

  • KMS Server: Running Innovaas KMS instance

πŸ› Troubleshooting

Common Issues

  1. Connection Failed

    Error: KMS API request failed: 500 Internal Server Error
    • βœ… Ensure KMS server is running

    • βœ… Check KMS_BASE_URL environment variable

    • βœ… Verify network connectivity

  2. Authentication Errors

    Error: 401 Unauthorized
    • βœ… Verify API key is set correctly

    • βœ… Check Bearer token format

    • βœ… Ensure KMS server has matching API key

  3. Token Limit Errors (Should be fixed)

    Error: Request too large for gpt-4o: Limit 30000, Requested 65879
    • βœ… Update to v1.0.0 with token optimization

    • βœ… Use kms_chat tool (automatically optimized)

    • βœ… Check tokenOptimization in responses

Debug Mode

# Enable verbose logging
DEBUG=1 npm run dev

# Check KMS server status
curl -H "Authorization: Bearer your-api-key" https://your-domain.com/kms/api/dashboard-stats

🀝 Contributing

  1. Fork the repository

  2. Create a feature branch: git checkout -b feature/amazing-feature

  3. Make your changes

  4. Run tests: npm test

  5. Build: npm run build

  6. Commit changes: git commit -m 'Add amazing feature'

  7. Push to branch: git push origin feature/amazing-feature

  8. Create Pull Request

Development Guidelines

  • Follow existing code patterns for consistency

  • Add comprehensive error handling

  • Update tool schemas when modifying parameters

  • Test with multiple MCP clients before committing

  • Document new features in README

πŸ“„ License

MIT License - see the LICENSE file for details.

πŸ”— Links


πŸš€ Ready to integrate your knowledge management with any MCP-compatible system with intelligent token optimization!

Available Tools

7 tools
kms_chatC

πŸš€ Primary tool for comprehensive knowledge queries. RAG-powered conversational queries with multi-modal context, intelligent token management, and full document content access. Automatically optimizes for token limits while providing comprehensive responses.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNoFilter responses to documents with specific tags
typesNoFilter responses to specific document types
messageYesYour question or message to the AI assistant
providerNoAI provider to use - OpenAI (faster, 30K context) or Claude (larger context, 200K)openai
maxResultsNoMaximum number of context documents to consider (automatically optimized for token limits)
useMultiModalNoInclude video frame and visual content in search (default: true)

TDQS

C2.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose some behavior: token management/auto-optimization, multi-modal context, and full document content access. It omits anything about whether the call is read-only, whether it incurs provider cost or latency, and whether history is maintained across calls. Some useful traits, but the safety and cost profile is absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the tool's role, which is good, but the text is padded with an emoji and says 'comprehensive' twice ('comprehensive knowledge queries' / 'comprehensive responses'). 'Intelligent token management' and 'Automatically optimizes for token limits' restate the same idea. Roughly half the content earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six parameters, no annotations and no output schema, the description should explain what a call returns and how it behaves, but it stays at a marketing level. Nothing tells the agent the shape of the answer, whether citations/documents come back, or how multi-modal content is surfaced, leaving a real gap for a 6-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all six parameters (message, tags, types, provider, maxResults, useMultiModal) are already documented in the schema. The description only loosely gestures at 'multi-modal context' and token optimization, adding no syntax or format detail beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states it is a RAG-powered conversational query tool, which is a specific enough verb+resource to distinguish it from kms_get_document, kms_list_documents and kms_get_stats. However, it claims to be the 'Primary tool for comprehensive knowledge queries' without distinguishing itself from kms_search, kms_intelligent_search or kms_multimodal_search, all of which sound equally applicable. The πŸš€ and repeated 'comprehensive' are promotional rather than clarifying.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this tool versus the search siblings, and no prerequisites or exclusions. Claiming to be the 'Primary tool' is a mild routing hint but gives the agent no decision rule when several sibling search tools exist. An agent could not tell from this text whether kms_chat should be preferred over kms_intelligent_search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kms_get_documentA

Retrieve detailed information about a specific document by ID, including full content, transcriptions, and metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault
documentIdYesUUID of the document to retrieve

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'Retrieve' implies a read-only operation and the description usefully discloses the return payload (content, transcriptions, metadata), but it is silent on permissions, whether access is logged, and output format or pagination behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the action, key, and payload in order. Every clause earns its place and nothing is repeated from the name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter read tool with no annotations and no output schema, the description covers the essential retrieval semantics and return contents. It stops short of stating read-only guarantees or error behavior when an ID is not found, which would be the remaining value-add.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is one parameter with 100% schema coverage; the schema already documents documentId as a UUID string. The description adds only the redundant 'by ID' framing, so it neither compensates nor detracts β€” the baseline of 3 for a fully-covered single param applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (Retrieve) and resource (document) with the lookup key (by ID) and the payload returned (full content, transcriptions, metadata). It implicitly separates itself from the search/list siblings by being ID-based rather than query-based, but never names an alternative to sharpen that distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'by ID' implies the precondition (you must already have a documentId), which is the only usage guidance present. There is no explicit when-to-use versus kms_search or kms_list_documents, and no exclusions or prerequisites stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kms_get_statsB

Get comprehensive analytics and statistics about the KMS system including document counts, processing status, and performance metrics.

ParametersJSON Schema
NameRequiredDescriptionDefault
includeProcessingDetailsNoInclude detailed processing status information (default: true)

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose the categories of data returned (counts, processing status, performance metrics), which implies a read-only reporting operation. It stops short of stating cost, permissions, freshness, or whether the call is expensive, so it only partially compensates for the missing annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence with no filler sentences and the resource named early. 'Comprehensive analytics and statistics' is mildly redundant padding but not wasteful enough to hurt clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-required-parameter read tool with full schema coverage and no output schema, the description adequately previews return content (document counts, status, performance metrics). Adding the effect of includeProcessingDetails would make it airtight, but nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single parameter (includeProcessingDetails) is fully documented in the schema with its default. The description adds no syntax or meaning beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Get') and resource ('analytics and statistics about the KMS system') and enumerates the content returned: document counts, processing status, performance metrics. It is clearly not a search/chat tool, so it separates from the kms_search/kms_chat siblings by implication, though it never names them explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to call this versus kms_list_documents or kms_get_document for counts/status, and no prerequisites or conditions stated. The agent must infer that 'stats' means aggregate reporting rather than document retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

kms_list_documentsB

List recent documents with filtering options. Useful for browsing and discovering content in the knowledge base.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNoFilter by tags
typeNoFilter by document type (strategy, meeting, video, etc.)
limitNoMaximum number of documents to return (default: 20)
mediaTypeNoFilter by media type

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It implies a read-only listing and a recency order, but does not disclose pagination, sorting definition, default limit behavior, permissions, or result shape beyond 'documents'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences and front-loads the core action. The second sentence is somewhat generic, but it does provide a usage cue without unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only list tool with fully described optional filters, the definition is minimally adequate. However, without annotations or an output schema, it should say more about return behavior, ordering, and pagination to fully guide correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four filter parameters are already documented in the input schema. The description only says 'filtering options' and adds no parameter-level meaning beyond what the schema provides, making 3 the appropriate baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: list documents, scoped to recent ones, with filtering. This is clear enough to distinguish it from search-oriented siblings, but it does not explicitly name an alternative or contrast itself with kms_search or kms_intelligent_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'useful for browsing and discovering content' implies a usage context but gives no explicit when-to-use or when-not-to-use guidance. It does not tell the agent to prefer search tools for targeted queries or explain when listing is preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv1.0.0
    • First observedkms_chat
    • First observedkms_get_document
    • First observedkms_get_stats
    • First observedkms_intelligent_search
    • First observedkms_list_documents
    • First observedkms_multimodal_search
    • First observedkms_search

TDQS

B3/5.0

Scored across 7 tools

Disambiguation2/5

Four search tools (kms_search, kms_intelligent_search, kms_multimodal_search, kms_chat) have overlapping purposes and unclear boundaries. An agent cannot reliably choose among them without deep understanding of the server's internals.

Naming Consistency5/5

All tool names follow a consistent kms_verb_noun pattern (kms_search, kms_get_document, kms_list_documents). This is predictable and easy to parse.

Tool Count4/5

Seven tools is a reasonable count for a knowledge management server. However, the redundancy among search tools suggests some could be merged or better differentiated.

Completeness3/5

The server covers search, retrieval, chat, and stats, but lacks any write operations (create, update, delete documents). This is a notable gap for a KMS, though read-only functionality might be intentional.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to query and manage a document knowledge base via MCP, with RAG-powered search and grounded answers with citations.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to connect to hosted Knowz vaults via MCP for knowledge management, supporting operations like search, save, browse, and amend.
    MIT