Skip to content

Commit

Permalink
Merge pull request #5 from Braffolk/dev
Browse files Browse the repository at this point in the history
NPM info
  • Loading branch information
Braffolk authored Dec 15, 2024
2 parents 2c903d2 + dd0b74b commit d694850
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 27 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: NPM Publish

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test:ci

- name: Build
run: npm run build

- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
always-auth=true
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
[Features](#features)
[AI Agent Integration](#ai-agent-integration)
[Installation](#installation)
[Usage](#usage)
[Architecture](#architecture)
[Usage](#usage)

[![npm version](https://badge.fury.io/js/%40modelcontextprotocol%2Fsummarization-functions.svg)](https://www.npmjs.com/package/@modelcontextprotocol/summarization-functions)

</div>

Expand All @@ -18,6 +19,12 @@

A powerful MCP server that provides intelligent summarization capabilities through a clean, extensible architecture. Built with modern TypeScript and designed for seamless integration with AI workflows.

## Installation

```bash
npm install @modelcontextprotocol/summarization-functions
```

## AI Agent Integration

This MCP server was primarily developed to enhance the performance and reliability of AI agents like Roo Cline and Cline. It addresses a critical challenge in AI agent operations: context window management.
Expand Down Expand Up @@ -98,12 +105,6 @@ There is NO NEED to process perfect or complete output. Summarized content is AL
- **AI Agent Context Optimization**
Prevent context window overflow and improve AI agent performance through intelligent summarization

## Installation

```bash
npm install
```

## Configuration

The server supports multiple AI providers through environment variables:
Expand Down Expand Up @@ -182,9 +183,9 @@ Execute and summarize command output.
{
// Required
command: string, // Command to execute
cwd: string, // Working directory for command execution

// Optional
cwd?: string, // Working directory for command execution
hint?: string, // Focus area: "security_analysis" | "api_surface" | "error_handling" | "dependencies" | "type_definitions"
output_format?: string // Format: "text" | "json" | "markdown" | "outline" (default: "text")
}
Expand All @@ -195,7 +196,8 @@ Summarize file contents.
```typescript
{
// Required
paths: string[], // Array of file paths to summarize
paths: string[], // Array of file paths to summarize (relative to cwd)
cwd: string, // Working directory for resolving file paths

// Optional
hint?: string, // Focus area: "security_analysis" | "api_surface" | "error_handling" | "dependencies" | "type_definitions"
Expand All @@ -208,10 +210,11 @@ Get directory structure overview.
```typescript
{
// Required
path: string, // Directory path to summarize
path: string, // Directory path to summarize (relative to cwd)
cwd: string, // Working directory for resolving directory path

// Optional
recursive?: boolean, // Whether to include subdirectories
recursive?: boolean, // Whether to include subdirectories. Safe for deep directories
hint?: string, // Focus area: "security_analysis" | "api_surface" | "error_handling" | "dependencies" | "type_definitions"
output_format?: string // Format: "text" | "json" | "markdown" | "outline" (default: "text")
}
Expand Down Expand Up @@ -240,18 +243,6 @@ Retrieve the full content for a given summary ID.
}
```

## Architecture

Built with clean architecture principles and modern TypeScript features:

```
src/
├── models # AI model implementations
├── services # Core business logic
├── server # MCP server handling
└── types # Shared type definitions
```

## License

MIT
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "MCP-summarization-functions",
"name": "mcp-summarization-functions",
"version": "0.1.0",
"description": "Provides summarised output from various actions that could otherwise eat up tokens and cause crashes",
"type": "module",
Expand Down Expand Up @@ -31,5 +31,22 @@
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typescript": "^5.7.2"
}
},
"files": [
"build/**/*"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Braffolk/MCP-summarization-functions.git"
},
"keywords": [
"mcp",
"summarization",
"model-context-protocol"
],
"author": "Remi Sebastian Kits",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/server/mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class McpServer {
},
recursive: {
type: 'boolean',
description: 'Whether to include subdirectories',
description: 'Whether to include subdirectories, safe for large directories',
},
...formatParameters
},
Expand Down

0 comments on commit d694850

Please sign in to comment.