Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/cli/utils/validate-project.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@

import { readFile } from "fs/promises";
import { findUp } from 'find-up';


export async function validateMCPProject() {
try {
const packageJsonPath = await findUp('package.json');

if (!packageJsonPath) {
throw new Error("Could not find package.json in current directory or any parent directories");
}

const packageJsonContent = await readFile(packageJsonPath, 'utf-8');
const package_json = JSON.parse(packageJsonContent);

const package_json = JSON.parse(await readFile(packageJsonPath, "utf-8"));
if (
!package_json.dependencies?.["mcp-framework"] &&
!package_json.devDependencies?.["mcp-framework"]
Expand Down