ts-project-indexer-mcp
Version:
A powerful MCP (Model Context Protocol) server that indexes and analyzes TypeScript/JavaScript projects, providing intelligent code exploration, dependency tracking, method discovery, and project structure analysis for AI assistants and development tools.
33 lines • 1.12 kB
JavaScript
export class FilesResource {
indexer;
constructor(indexer) {
this.indexer = indexer;
}
async read() {
const files = this.indexer.getAllFiles();
const stats = this.indexer.getProjectStats();
return {
contents: [
{
uri: 'project://files',
mimeType: 'application/json',
text: JSON.stringify({
summary: {
totalFiles: files.length,
lastIndexed: stats.lastIndexed,
},
files: files.map(file => ({
path: file.path,
relativePath: file.relativePath,
name: file.name,
extension: file.extension,
size: file.size,
lastModified: file.lastModified,
})),
}, null, 2),
},
],
};
}
}
//# sourceMappingURL=files-resource.js.map