leanix-pathfinder-mcp-server
Version:
MCP Server for LeanIX Pathfinder API - Enterprise Architecture Management Platform
207 lines (154 loc) ⢠5.38 kB
Markdown
# LeanIX Pathfinder MCP Server
**Model Context Protocol (MCP) server for LeanIX Pathfinder API with 20+ enterprise architecture tools**
š **Ready for Microsoft Copilot Studio integration with native MCP protocol support**
## What This Is
This is a complete MCP server that connects to your LeanIX Pathfinder instance, providing 20+ tools for enterprise architecture management. It works with:
- ā
**Claude Desktop** (stdio transport)
- ā
**Microsoft Copilot Studio** (streamable HTTP transport)
- ā
**Any MCP-compatible client**
## Quick Start
### 1. Configuration
Create `.env` file:
```bash
LEANIX_BASE_URL=https://your-instance.leanix.net
LEANIX_CLIENT_ID=apitoken
LEANIX_CLIENT_SECRET=your-technical-user-token
```
### 2. Installation & Build
```bash
npm install
npm run build
```
### 3. Run the Server
**For Claude Desktop (stdio):**
```bash
npm start
# or in development:
npm run dev
```
**For Microsoft Copilot Studio (HTTP):**
```bash
npm run start:mcp
# or in development:
npm run dev:mcp
```
The HTTP server runs on `http://localhost:3001` with endpoints:
- `GET /health` - Health check
- `POST /mcp` - MCP protocol endpoint
## Available Tools (20+)
### š Search & Discovery
- `leanix_get_suggestions` - Search applications, services, fact sheets
- `leanix_search_nodes` - Advanced search with filtering
### š Fact Sheet Management
- `leanix_list_fact_sheets` - List all fact sheets
- `leanix_get_fact_sheet` - Get detailed information
- `leanix_create_fact_sheet` - Create new applications/services
- `leanix_update_fact_sheet` - Update existing fact sheets
- `leanix_delete_fact_sheet` - Remove fact sheets
### š Relationships & Dependencies
- `leanix_get_fact_sheet_relations` - Get relationships
- `leanix_create_relations` - Create new relationships
### š Advanced Operations
- `leanix_execute_graphql` - Custom GraphQL queries
- `leanix_get_data_model` - Workspace data model
- `leanix_get_meta_model` - Meta model information
### š Bookmarks & Views
- `leanix_list_bookmarks` - List saved views
- `leanix_get_bookmark` - Get bookmark details
- `leanix_create_bookmark` - Create bookmarks
- `leanix_update_bookmark` - Update bookmarks
- `leanix_delete_bookmark` - Remove bookmarks
### āļø System & Configuration
- `leanix_get_authorization` - Check permissions
- `leanix_get_settings` - Workspace settings
- `leanix_list_features` - Available features
## Integration Guides
### Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"leanix-pathfinder": {
"command": "node",
"args": ["C:/path/to/your/leanix-pathfinder-mcp-server/dist/index.js"],
"env": {
"LEANIX_BASE_URL": "https://your-instance.leanix.net",
"LEANIX_CLIENT_ID": "apitoken",
"LEANIX_CLIENT_SECRET": "your-technical-user-token"
}
}
}
}
```
### Microsoft Copilot Studio
1. **Deploy the HTTP server** (Azure, AWS, Render, etc.)
2. **Use the OpenAPI spec** in `leanix-pathfinder-mcp.yaml`
3. **Follow the native MCP integration** (see docs/copilot-studio-mcp-native.md for details)
## Development
```bash
# Install dependencies
npm install
# Run in development (stdio)
npm run dev
# Run HTTP server in development
npm run dev:mcp
# Build TypeScript
npm run build
# Run tests
npm test
```
## Deployment
### Local Testing
```bash
# Test stdio version
npm run build && npm start
# Test HTTP version
npm run build && npm run start:mcp
curl http://localhost:3001/health
```
### Production Deployment
1. Deploy to your cloud platform (Azure, AWS, Render, etc.)
2. Set environment variables
3. Ensure HTTPS is enabled
4. Update your MCP client configuration
## Project Structure
```
src/
āāā index.ts # Main stdio MCP server (Claude Desktop)
āāā streamable-server.ts # HTTP MCP server (Copilot Studio)
āāā client.ts # LeanIX API client with OAuth
āāā types.ts # TypeScript type definitions
āāā ...tool handlers...
```
## Files You Actually Need
**Essential files:**
- `README.md` - This file (main documentation)
- `package.json` - Dependencies and scripts
- `tsconfig.json` - TypeScript configuration
- `.env` - Your LeanIX credentials
- `src/` - Source code
- `leanix-pathfinder-mcp.yaml` - OpenAPI spec for Copilot Studio
**Ignore these outdated files:**
- `README-new.md` - Outdated
- `PROJECT_COMPLETE.md` - Outdated
- `SETUP_COMPLETE.md` - Outdated
- `GITHUB_SETUP.md` - Outdated
## Support & Issues
- **GitHub Issues**: [Report problems](https://github.com/coredev21/leanix-pathfinder-mcp-server/issues)
- **Repository**: https://github.com/coredev21/leanix-pathfinder-mcp-server
## License
MIT License - see LICENSE file for details.
---
## Quick Reference Commands
```bash
# Build and run for Claude Desktop
npm run build && npm start
# Build and run for Copilot Studio
npm run build && npm run start:mcp
# Development mode
npm run dev # stdio
npm run dev:mcp # HTTP server
# Test health endpoint
curl http://localhost:3001/health
```
**That's it!** Everything you need is in this README. Ignore the other .md files.