Skip to content

Commit 4be9d99

Browse files
committed
chore: minor cleanup
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
1 parent a2703df commit 4be9d99

5 files changed

Lines changed: 17 additions & 14 deletions

File tree

bin/cli.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ try {
1010
console.log('Flipt MCP Server started. Press Ctrl+C to stop.');
1111
} catch (error) {
1212
console.error('Error starting Flipt MCP Server:', error.message);
13-
console.error('Make sure the package is properly built before running.');
1413
process.exit(1);
1514
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flipt-io/mcp-server-flipt",
3-
"version": "0.0.1-rc.4",
3+
"version": "0.0.1-rc.5",
44
"description": "Model Context Protocol server for Flipt",
55
"main": "dist/index.js",
66
"type": "commonjs",

src/index.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,26 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
44
import { z } from 'zod';
55
import dotenv from 'dotenv';
66
import { FliptClient } from './services/fliptClient';
7+
import { VERSION } from './version';
78

8-
// Load environment variables
99
dotenv.config();
1010

1111
const PORT = process.env.MCP_SERVER_PORT ? parseInt(process.env.MCP_SERVER_PORT) : 3000;
1212
const HOST = process.env.MCP_SERVER_HOST || 'localhost';
1313

14-
// Create Flipt client
1514
const fliptClient = new FliptClient();
1615

17-
// Create MCP server
18-
const server = new McpServer({
19-
name: 'Flipt MCP Server',
20-
version: '0.0.1',
21-
});
22-
23-
// Define tools for reading, creating, updating, and deleting resources
16+
const server = new McpServer(
17+
{
18+
name: 'Flipt MCP Server',
19+
version: VERSION,
20+
},
21+
{
22+
capabilities: {
23+
tools: {},
24+
},
25+
}
26+
);
2427

2528
// Namespace tools
2629
server.tool('list_namespaces', {}, async args => {
@@ -1260,7 +1263,7 @@ function startServer() {
12601263

12611264
// Start the HTTP server (for the status endpoint)
12621265
const httpServer = app.listen(PORT, HOST, () => {
1263-
console.log(`Flipt MCP Server running at http://${HOST}:${PORT}`);
1266+
console.log(`Flipt MCP Server running`);
12641267
console.log(`Status endpoint available at http://${HOST}:${PORT}/status`);
12651268
console.log('STDIO transport active for MCP communication');
12661269
});

src/version.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const VERSION = '0.0.1';

0 commit comments

Comments
 (0)